/* ==========================================================================
   Michelle MacKinnon — Studio Admin Portal Styles
   ========================================================================== */

:root {
  --bg-warm: #faf7f2;
  --bg-surface: #ffffff;
  --bg-dark: #1f1d18;
  --bg-subtle: #f3eee3;
  --bg-muted: #eae3d2;

  --text-dark: #22201c;
  --text-muted: #5e5a52;
  --text-subtle: #6f6a61;
  --text-faded: #6f6a61;
  --text-light: #f5f2eb;

  --border-light: #e8e3d8;
  --border-medium: #d4cebf;
  --border-dark: #2a2822;

  --accent-gold: #765d1e;
  --accent-gold-hover: #604a15;
  --accent-gold-bg: rgba(118, 93, 30, 0.1);

  --color-success: #2b7a4b;
  --color-success-bg: #edf7f0;
  --color-warning: #9e631b;
  --color-warning-bg: #fdf5ea;
  --color-danger: #a32a2a;
  --color-danger-bg: #faebeb;

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 1px 3px rgba(34, 32, 28, 0.05);
  --shadow-md: 0 4px 12px rgba(34, 32, 28, 0.08);
  --shadow-lg: 0 8px 24px rgba(34, 32, 28, 0.12);

  --radius-sm: 3px;
  --radius-md: 4px;
}

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

html, body {
  background-color: var(--bg-warm);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* Accessibility utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.admin-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 12px;
}

.header-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.brand-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  background-color: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Eight buttons and two counts share one row inside the 1200px container
   (two-step sign-in lives in the Account dialog to keep it that way),
   so the header buttons are a little narrower than the ones in the page. */
.header-nav .btn-outline-sm,
.header-nav .btn-primary-sm {
  padding-left: 8px;
  padding-right: 8px;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Buttons & Links
   -------------------------------------------------------------------------- */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.btn-primary, .btn-primary-sm, .btn-outline, .btn-outline-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.btn-primary {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 13px;
  background-color: var(--bg-dark);
  color: var(--text-light);
  border: 1px solid var(--bg-dark);
}

.btn-primary:hover:not(:disabled) {
  background-color: #332f25;
  border-color: #332f25;
}

.btn-primary-sm {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 11px;
  background-color: var(--bg-dark);
  color: var(--text-light);
  border: 1px solid var(--bg-dark);
}

.btn-primary-sm:hover:not(:disabled) {
  background-color: #332f25;
  border-color: #332f25;
}

.btn-outline {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 13px;
  background-color: transparent;
  color: var(--text-dark);
  border: 1px solid var(--border-medium);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--text-dark);
  background-color: var(--bg-subtle);
}

.btn-outline-sm {
  min-height: 38px;
  padding: 6px 12px;
  font-size: 11px;
  background-color: transparent;
  color: var(--text-dark);
  border: 1px solid var(--border-medium);
}

.btn-outline-sm:hover:not(:disabled) {
  border-color: var(--text-dark);
  background-color: var(--bg-subtle);
}

.btn-block {
  width: 100%;
}

button:disabled, .btn-primary:disabled, .btn-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Forms & Inputs
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 18px;
  width: 100%;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--text-dark);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px var(--accent-gold-bg);
}

.form-alert {
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  word-break: break-word;
}

/* One refused photo per line, each naming its file and reason. */
.upload-failure-list,
.upload-resized-list {
  margin: 6px 0 0;
  padding-left: 18px;
}

.form-alert.alert-danger {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
  border-left-color: var(--color-danger);
}

.form-alert.alert-warning {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
  border-left-color: var(--color-warning);
}

.form-alert.alert-success {
  background-color: var(--color-success-bg);
  color: var(--color-success);
  border-left-color: var(--color-success);
}

/* --------------------------------------------------------------------------
   Main Content Layout & Views
   -------------------------------------------------------------------------- */
.admin-main {
  padding-top: 28px;
  padding-bottom: 56px;
  width: 100%;
}

.view-panel {
  width: 100%;
}

/* Login Panel */
.login-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  padding: 16px 0;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.login-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
}

/* Catalog View */
.catalog-header {
  margin-bottom: 20px;
}

.page-heading {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.page-subheading {
  font-size: 13px;
  color: var(--text-muted);
}

/* Catalog Toolbar */
.catalog-toolbar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.toolbar-search {
  width: 100%;
}

.toolbar-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.filter-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 150px;
  min-width: 120px;
}

.filter-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-reload {
  align-self: flex-end;
}

/* --------------------------------------------------------------------------
   Catalog Cards & Items
   -------------------------------------------------------------------------- */
.catalog-content-area {
  width: 100%;
}

/* Public announcement manager */
.banner-manager {
  width: 100%;
  margin-top: 36px;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.banner-modal-card .banner-manager {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}

.section-subheading {
  max-width: 720px;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.banner-form {
  padding: 16px;
  margin-bottom: 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.banner-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.banner-message-field,
.banner-cta-fields .form-group:last-child {
  margin-bottom: 0;
}

.banner-message-input {
  min-height: 92px;
  resize: vertical;
}

.banner-cta-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.banner-cta-fields .form-group:first-child,
.banner-cta-fields .form-group:nth-child(2) {
  margin-bottom: 12px;
}

.banner-order-field {
  max-width: 150px;
}

.form-hint {
  color: var(--text-faded);
  font-size: 11px;
  font-weight: 400;
}

.banner-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.banner-list {
  display: grid;
  gap: 10px;
}

.banner-admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
}

.banner-admin-content {
  min-width: 0;
}

.banner-admin-message {
  color: var(--text-dark);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.banner-admin-meta {
  margin-top: 5px;
  color: var(--text-faded);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.banner-admin-actions {
  display: flex;
  align-items: center;
}

.banner-empty-state {
  padding: 14px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.banner-error-state {
  padding: 18px 0;
}

.banner-state-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
}

.banner-state-description {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 13px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
}

.catalog-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  align-items: start;
  width: 100%;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.catalog-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.catalog-card.state-updating {
  opacity: 0.75;
}

.catalog-thumb-container {
  width: 80px;
  height: 80px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.catalog-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-thumb-placeholder {
  font-size: 10px;
  color: var(--text-faded);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 4px;
}

.catalog-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.catalog-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.catalog-item-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: break-word;
  transition: color 0.15s ease;
}

.catalog-item-title:hover {
  color: var(--accent-gold);
}

.catalog-price-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
}

.catalog-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-draft {
  background-color: var(--bg-muted);
  color: var(--text-dark);
}

.badge-published {
  background-color: var(--color-success-bg);
  color: var(--color-success);
}

.badge-archived {
  background-color: var(--bg-subtle);
  color: var(--text-subtle);
}

.catalog-updated-time {
  font-size: 11px;
  color: var(--text-faded);
}

.catalog-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
  width: 100%;
}

.availability-control-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.availability-label {
  font-size: 11px;
  color: var(--text-subtle);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.availability-select {
  min-height: 34px;
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  max-width: 130px;
}

.availability-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.links-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.link-live {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-gold);
  text-decoration: none;
  padding: 4px 0;
}

.link-live:hover {
  text-decoration: underline;
}

.link-edit {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
}

.link-edit:hover {
  color: var(--accent-gold);
}

/* Conflict and Error Banners on Cards */
.card-alert {
  grid-column: 1 / -1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.card-alert.alert-conflict {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid rgba(158, 99, 27, 0.2);
}

.card-alert.alert-error {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid rgba(163, 42, 42, 0.2);
}

.btn-inline-action {
  font-size: 11px;
  font-weight: 600;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 2px 4px;
}

/* --------------------------------------------------------------------------
   Loading, Empty, and Error States
   -------------------------------------------------------------------------- */
.state-container {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 48px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.state-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.state-description {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 18px;
}

.skeleton-card {
  height: 110px;
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-subtle) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: 14px;
  width: 100%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   Modals & Dialogs
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(31, 29, 24, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 24px 20px;
}

.banner-modal-card {
  max-width: 760px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--text-dark);
}

.modal-subtitle {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-subtle);
  cursor: pointer;
  width: 44px;
  min-height: 44px;
  padding: 4px;
  transition: color 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--text-dark);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .header-brand {
    justify-content: space-between;
  }

  .header-nav {
    width: 100%;
    display: flex;
    gap: 6px;
  }

  .header-nav > * {
    flex: 1 1 0;
    min-height: 44px;
    padding: 6px 4px;
    font-size: 11px;
    text-align: center;
  }

  .catalog-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .catalog-thumb-container {
    width: 100%;
    height: 140px;
  }

  .filter-control {
    flex: 1 1 100%;
    width: 100%;
    min-width: 100%;
  }

  .btn-reload {
    width: 100%;
    align-self: stretch;
  }

  .catalog-actions-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .availability-control-group {
    justify-content: space-between;
    width: 100%;
  }

  .availability-select {
    min-height: 44px;
    max-width: none;
    flex: 1 1 auto;
  }

  .links-group {
    width: 100%;
    justify-content: space-between;
  }

  .links-group a,
  .btn-inline-action {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .btn-reload {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Artwork editor
   ========================================================================== */
.editor-main {
  max-width: 1080px;
  padding-bottom: 128px;
}

.editor-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.editor-tabs {
  position: sticky;
  top: 64px;
  z-index: 60;
  display: flex;
  align-items: stretch;
  min-height: 52px;
  margin: 0 -16px;
  padding: 0 16px;
  gap: 24px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-light);
  background: rgba(250, 247, 242, 0.97);
  box-shadow: 0 3px 10px rgba(34, 32, 28, 0.05);
  scrollbar-width: none;
}

.editor-tabs::-webkit-scrollbar {
  display: none;
}

.editor-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 4px 0 0;
  border: 0;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.editor-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: '';
}

.editor-tab:hover:not(:disabled),
.editor-tab:focus-visible,
.editor-tab.is-active {
  color: var(--accent-gold);
}

.editor-tab.is-active::after {
  background: var(--accent-gold);
}

.editor-tab:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.editor-section[data-editor-panel] {
  scroll-margin-top: 132px;
}

.editor-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-top: 8px;
}

.editor-breadcrumb {
  margin-bottom: 8px;
  font-size: 12px;
}

.editor-breadcrumb a {
  color: var(--text-muted);
}

.editor-section {
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.editor-section-heading {
  margin-bottom: 20px;
}

.editor-section-heading h2 {
  margin: 0;
  color: var(--text-dark);
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.2;
}

.editor-section-heading p {
  max-width: 680px;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 13px;
}

.editor-subsection-heading {
  margin: 24px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.editor-subsection-heading h3 {
  margin: 0;
  color: var(--text-dark);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.editor-subsection-heading p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

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

.editor-field-grid {
  display: grid;
  gap: 16px;
}

.editor-field-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-field-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editor-field-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.editor-field-full {
  grid-column: 1 / -1;
}

.editor-textarea-short {
  min-height: 88px;
  resize: vertical;
}

.editor-textarea {
  min-height: 180px;
  resize: vertical;
}

.form-help {
  margin-top: 5px;
  color: var(--text-subtle);
  font-size: 11px;
}

.editor-disclosure {
  margin-top: 18px;
  border-top: 1px solid var(--border-light);
}

.editor-disclosure summary {
  min-height: 44px;
  padding: 13px 0 8px;
  color: var(--text-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.editor-disclosure-body {
  padding-top: 12px;
}

.editor-fieldset {
  margin: 20px 0 0;
  padding: 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.editor-fieldset legend {
  padding: 0 6px;
  color: var(--text-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.editor-check-row {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
}

.editor-check-row input,
.editor-check-card input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--bg-dark);
}

#structured-dimensions,
#frame-description-group {
  margin-top: 14px;
}

/* The original's signing and shipping, one per line as on each merchandise card. */
.editor-check-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 6px;
}

.editor-check-card {
  display: flex;
  align-items: flex-start;
  min-height: 72px;
  padding: 14px;
  gap: 12px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.editor-check-card input {
  margin-top: 2px;
}

.editor-check-card span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.editor-check-card strong {
  font-size: 13px;
  font-weight: 600;
}

.editor-check-card small {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.money-input-wrap {
  position: relative;
}

.money-input-wrap > span {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  color: var(--text-subtle);
  transform: translateY(-50%);
}

.money-input-wrap .form-input {
  padding-left: 30px;
}

.photo-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  padding: 24px;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-warm);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.photo-dropzone:hover,
.photo-dropzone.is-dragging {
  border-color: var(--accent-gold);
  background: var(--bg-subtle);
}

.photo-dropzone-title {
  color: var(--text-dark);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
}

.photo-dropzone-copy {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.upload-queue {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
  gap: 10px;
}

.upload-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 12px;
  gap: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
}

.upload-task-main {
  min-width: 0;
}

.upload-task-name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-task-status {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

.upload-progress {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 8px;
  appearance: none;
  border: 0;
  border-radius: 2px;
  background: var(--bg-muted);
}

.upload-progress::-webkit-progress-bar {
  border-radius: 2px;
  background: var(--bg-muted);
}

.upload-progress::-webkit-progress-value {
  border-radius: 2px;
  background: var(--accent-gold);
}

.upload-progress::-moz-progress-bar {
  border-radius: 2px;
  background: var(--accent-gold);
}

.card-alert-actions {
  display: flex;
  gap: 8px;
}

.upload-task.is-error {
  border-color: rgba(163, 42, 42, 0.35);
  background: var(--color-danger-bg);
}

.upload-task.is-success {
  border-color: rgba(43, 122, 75, 0.3);
}

.upload-task-actions {
  display: flex;
  gap: 6px;
}

.upload-task-actions button {
  min-height: 38px;
}

.editor-empty-note {
  padding: 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: var(--bg-warm);
  font-size: 12px;
  text-align: center;
}

.gallery-editor-list,
.sizes-editor-list,
.revisions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-editor-list:not(:empty),
.sizes-editor-list:not(:empty),
.revisions-list:not(:empty) {
  margin-top: 14px;
}

.gallery-editor-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.gallery-editor-card[draggable="true"] {
  cursor: grab;
}

.gallery-editor-card.is-dragging {
  opacity: 0.55;
}

.gallery-editor-image-wrap {
  position: relative;
  width: 132px;
  height: 132px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.gallery-editor-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-cover-label {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  background: var(--bg-dark);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-editor-content {
  min-width: 0;
}

.gallery-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gallery-editor-fields .editor-field-full {
  grid-column: 1 / -1;
}

.gallery-editor-actions,
.size-row-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
  gap: 6px;
}

.gallery-editor-actions button,
.size-row-actions button {
  min-height: 38px;
}

.removed-gallery {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-warm);
}

.removed-gallery-title {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.removed-gallery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 12px;
  font-size: 12px;
}

.size-editor-card {
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.size-fields {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.size-material-field {
  margin-top: 12px;
}

.size-bonus-field {
  margin-top: 14px;
}

.bonus-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.bonus-token-list:empty {
  display: none;
}

.bonus-token {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 7px 5px 10px;
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  background: var(--bg-warm);
  color: var(--text-dark);
  font-size: 12px;
  line-height: 1.35;
}

.bonus-token > span {
  overflow-wrap: anywhere;
}

.bonus-token-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-subtle);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.bonus-token-remove:hover,
.bonus-token-remove:focus-visible {
  background: var(--bg-dark);
  color: var(--text-light);
}

.size-availability {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-top: 18px;
  gap: 8px;
  font-size: 12px;
}

.size-shipping,
.size-signed {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  font-size: 12px;
}

.size-availability input,
.size-shipping input,
.size-signed input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--bg-dark);
}

.legacy-price-note {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 11px;
}

.state-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 18px;
  gap: 8px;
}

.editor-action-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px max(16px, calc((100vw - 1048px) / 2));
  gap: 16px;
  border-top: 1px solid var(--border-medium);
  background: rgba(250, 247, 242, 0.97);
  box-shadow: 0 -4px 18px rgba(34, 32, 28, 0.08);
}

.editor-action-status {
  color: var(--text-muted);
  font-size: 12px;
}

.editor-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.editor-action-buttons button {
  min-height: 44px;
}

.editor-conflict {
  position: sticky;
  top: 78px;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 16px;
  border: 1px solid rgba(158, 99, 27, 0.35);
  border-radius: var(--radius-md);
  color: var(--color-warning);
  background: var(--color-warning-bg);
  box-shadow: var(--shadow-md);
}

.editor-conflict p {
  margin-top: 3px;
  font-size: 12px;
}

.editor-conflict-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.revisions-list {
  margin-top: 12px;
}

.revision-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 64px;
  padding: 10px 0;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}

.revision-row:last-child {
  border-bottom: 0;
}

.revision-title {
  font-size: 13px;
  font-weight: 600;
}

.revision-meta {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

/* margin: auto is what centres a modal <dialog>. The universal reset above sets
   every margin to 0, which pinned this confirmation to the top-left corner,
   far from the button that opened it (Michelle, 2026-09-18). */
.confirm-dialog {
  width: min(440px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-dark);
  background: var(--bg-surface);
  box-shadow: var(--shadow-lg);
}

.confirm-dialog::backdrop {
  background: rgba(31, 29, 24, 0.62);
}

.confirm-dialog-body {
  padding: 24px;
}

.confirm-dialog-body p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

[aria-invalid="true"] {
  border-color: var(--color-danger) !important;
}

@media (max-width: 800px) {
  .editor-field-grid-three,
  .editor-field-grid-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .size-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .banner-manager {
    padding: 18px 16px;
  }

  .banner-form-grid,
  .banner-cta-fields {
    grid-template-columns: 1fr;
  }

  .banner-order-field {
    max-width: none;
  }

  .banner-admin-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .banner-admin-actions,
  .banner-admin-actions button {
    width: 100%;
  }

  .editor-main {
    padding-bottom: 188px;
  }

  .editor-heading-row,
  .editor-section-heading-actions,
  .editor-conflict {
    flex-direction: column;
    align-items: stretch;
  }

  .editor-section {
    padding: 18px 16px;
  }

  .editor-field-grid-two,
  .editor-field-grid-three,
  .editor-field-grid-four,
  .gallery-editor-fields,
  .size-fields {
    grid-template-columns: 1fr;
  }

  .gallery-editor-card {
    grid-template-columns: 1fr;
  }

  .gallery-editor-image-wrap {
    width: 100%;
    height: 220px;
  }

  .gallery-editor-actions button,
  .size-row-actions button,
  .bonus-token-remove,
  .upload-task-actions button,
  .removed-gallery-row button,
  .revision-row button,
  #add-size,
  #refresh-revisions {
    min-height: 44px;
  }

  .bonus-token-remove {
    width: 44px;
    min-width: 44px;
  }

  .upload-task {
    grid-template-columns: 1fr;
  }

  .upload-task-actions {
    justify-content: flex-start;
  }

  .editor-conflict-actions {
    width: 100%;
  }

  .editor-conflict-actions button {
    flex: 1 1 0;
    min-height: 44px;
  }

  .editor-action-bar {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
  }

  .editor-action-status {
    min-height: 18px;
    text-align: center;
  }

  .editor-action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-action-buttons button {
    width: 100%;
    padding-right: 8px;
    padding-left: 8px;
  }

  .revision-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Standalone products — Artful Goods and greeting card packs
   Michelle asked for "another section in the admin portal" for the things
   that do not fall under a specific original painting. These rules add only
   what the artwork editor does not already provide.
   ========================================================================== */

.product-modal-card {
  max-width: 720px;
  width: 100%;
}

/* Two fields side by side (price + quantity), stacking on a phone. */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-check .form-label {
  margin-bottom: 0;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.product-gallery-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.product-gallery-item {
  position: relative;
  width: 92px;
  height: 92px;
  border: 1px solid var(--border-medium);
  overflow: hidden;
  background-color: var(--bg-subtle);
}

.product-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* The first photo is the shop card's image, so it says so. */
.product-gallery-item.is-primary::after {
  content: 'Cover';
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  padding: 2px 0;
  background-color: rgba(28, 25, 18, 0.78);
  color: #fff;
}

.product-gallery-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  line-height: 1;
  border: none;
  border-radius: 50%;
  background-color: rgba(28, 25, 18, 0.82);
  color: #fff;
  cursor: pointer;
}

.product-scenes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--border-medium);
  background-color: var(--bg-subtle);
}

.product-scene-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dark);
}

.product-scene-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.btn-danger {
  color: #8a3c3c;
  border-color: #c9a6a6;
}

.btn-danger:hover:not(:disabled) {
  background-color: #f7eeee;
  border-color: #8a3c3c;
}

/* The active section in the header nav. The hover selector is repeated so
   the generic button hover, which is more specific, cannot pale the current
   section while the pointer rests on it. */
.btn-outline-sm.is-active,
.btn-outline-sm.is-active:hover:not(:disabled) {
  background-color: var(--bg-dark, #1c1912);
  border-color: var(--bg-dark, #1c1912);
  color: #fff;
}

.product-category-badge {
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-faded);
}

.product-stock-tag {
  font-size: 12px;
  color: var(--text-muted);
}

.product-stock-tag.is-sold-out {
  color: #8a3c3c;
}

@media (max-width: 620px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Inquiries
   -------------------------------------------------------------------------- */
.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background-color: var(--accent-gold);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0;
}

.nav-count.hidden {
  display: none;
}

.inquiry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inquiry-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px 18px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.inquiry-card.is-new {
  border-color: var(--border-medium);
  background-color: var(--bg-warm);
}

.inquiry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.inquiry-sender {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.inquiry-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  overflow-wrap: anywhere;
}

.inquiry-email {
  font-size: 13px;
  color: var(--accent-gold);
  overflow-wrap: anywhere;
}

.inquiry-time {
  font-size: 12px;
  color: var(--text-faded);
  white-space: nowrap;
}

.inquiry-source {
  font-size: 12px;
  color: var(--text-muted);
}

.inquiry-subject {
  margin: 0;
  font-weight: 600;
  color: var(--text-dark);
  overflow-wrap: anywhere;
}

.inquiry-about {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.inquiry-artwork {
  color: var(--accent-gold);
}

.inquiry-message {
  margin: 0;
  color: var(--text-dark);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.inquiry-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

/* One control per row here, so it is sized rather than stretched. */
#view-inquiries .toolbar-filters .filter-control {
  flex: 0 1 260px;
}

.inquiry-status-control {
  flex: 0 1 220px;
  min-width: 160px;
}

.badge-inquiry-new {
  background-color: var(--accent-gold-bg);
  color: var(--accent-gold);
}

.badge-inquiry-read {
  background-color: var(--bg-muted);
  color: var(--text-dark);
}

.badge-inquiry-responded {
  background-color: var(--color-success-bg);
  color: var(--color-success);
}

.badge-inquiry-archived {
  background-color: var(--bg-subtle);
  color: var(--text-subtle);
}

@media (max-width: 640px) {
  .inquiry-card {
    padding: 14px;
  }

  .inquiry-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .inquiry-status-control,
  #view-inquiries .toolbar-filters .filter-control {
    flex: 1 1 100%;
    min-width: 0;
  }
}

/* --------------------------------------------------------------------------
   Orders
   -------------------------------------------------------------------------- */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px 18px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.order-card.is-to-ship {
  border-color: var(--border-medium);
  background-color: var(--bg-warm);
}

.order-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.order-name {
  margin: 0;
  min-width: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  overflow-wrap: anywhere;
}

.order-summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.order-total {
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

.order-time {
  font-size: 12px;
  color: var(--text-faded);
  white-space: nowrap;
}

.order-warnings {
  margin: 0;
  padding: 10px 12px 10px 28px;
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}

.order-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 16px 24px;
}

.order-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.order-section-title {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.order-address {
  margin: 0;
  color: var(--text-dark);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.order-address.is-cleared,
.order-muted {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.order-email,
.order-phone {
  font-size: 14px;
  color: var(--accent-gold);
  overflow-wrap: anywhere;
}

.order-item-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-item {
  display: flex;
  align-items: baseline;
  gap: 4px 12px;
  flex-wrap: wrap;
  color: var(--text-dark);
}

.order-item-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.order-item-price {
  white-space: nowrap;
}

.order-item-flag {
  flex-basis: 100%;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-danger);
}

.order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.order-reference {
  margin: 0;
  font-size: 12px;
  color: var(--text-faded);
  overflow-wrap: anywhere;
}

.order-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-order-to-ship {
  background-color: var(--accent-gold-bg);
  color: var(--accent-gold);
}

.badge-order-shipped {
  background-color: var(--color-success-bg);
  color: var(--color-success);
}

.badge-order-refunded {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
}

.badge-order-warning {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
}

.badge-order-unpaid,
.badge-order-archived {
  background-color: var(--bg-subtle);
  color: var(--text-subtle);
}

.badge-order-emailed,
.badge-order-receipt {
  background-color: var(--color-success-bg);
  color: var(--color-success);
}

.order-card.is-archived {
  background-color: var(--bg-subtle);
}

.order-question-message {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-dark);
}

.order-question-detail {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.btn-primary.is-danger {
  background-color: var(--color-danger);
  border-color: var(--color-danger);
}

.btn-primary.is-danger:hover:not(:disabled) {
  background-color: #7f1f1f;
  border-color: #7f1f1f;
}

#view-orders .toolbar-filters .filter-control {
  flex: 0 1 260px;
}

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

  .order-items {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .order-card {
    padding: 14px;
  }

  .order-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .order-buttons > * {
    flex: 1 1 auto;
    text-align: center;
  }

  #view-orders .toolbar-filters .filter-control {
    flex: 1 1 100%;
    min-width: 0;
  }
}

/* --------------------------------------------------------------------------
   Two-step sign-in (admin/two-step.js): the code step in the sign-in card,
   the setup QR code, the recovery codes, and the signed-in dialog.
   -------------------------------------------------------------------------- */
.two-step-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.two-step-lead,
.two-step-instruction,
.two-step-status {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.two-step-instruction {
  color: var(--text-dark);
}

.two-step-setup {
  margin-bottom: 4px;
}

.two-step-qr {
  width: 208px;
  margin: 0 auto 14px;
  padding: 8px;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.two-step-qr-svg {
  display: block;
  width: 100%;
  height: auto;
}

.two-step-manual {
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.two-step-manual summary {
  cursor: pointer;
  color: var(--accent-gold);
  font-weight: 500;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.two-step-manual-account {
  margin: 8px 0 6px;
}

.two-step-key {
  display: block;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--text-dark);
  word-break: break-all;
  user-select: all;
}

.two-step-code-input {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 22px;
  letter-spacing: 0.3em;
  text-align: center;
}

.two-step-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.two-step-link {
  min-height: 36px;
  padding: 4px 0;
  background: none;
  border: none;
  color: var(--accent-gold);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.two-step-link:hover {
  color: var(--accent-gold-hover);
}

.two-step-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0 0 16px;
  padding: 14px 16px 14px 36px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 15px;
  color: var(--text-dark);
}

.two-step-code-actions,
.two-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.two-step-actions {
  flex-direction: column;
  align-items: stretch;
}

.two-step-modal-body {
  padding-top: 4px;
}

@media (max-width: 400px) {
  .two-step-codes {
    grid-template-columns: 1fr;
  }
}

/* The Account dialog: the two-step entry above the password form. Space,
   not rules, separates the two sections. */
.account-section {
  margin-bottom: 28px;
}

.account-section-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.account-section-lead {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 12px;
}

#modal-password .modal-card {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
