/* Zee Beauty & Co. — admin (matches storefront) */

:root {
  --green-deep: #5c2433;
  --green-mid: #a9727e;
  --cream: #f5ebe0;
  --gold: #c4a882;
  --gold-light: #e8dcc8;
  --charcoal: #2a1c20;
  --muted: #756066;
  --error: #923242;
  --success-bg: rgba(92, 36, 51, 0.06);
  --border: rgba(92, 36, 51, 0.12);
  --card-shadow: 0 8px 32px rgba(92, 36, 51, 0.07);
  --radius: 10px;
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: linear-gradient(180deg, #faf6ef 0%, var(--cream) 40%);
  color: var(--charcoal);
  line-height: 1.6;
  min-height: 100vh;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--green-deep);
  color: var(--cream);
  border-radius: var(--radius);
}

.admin-header {
  background: var(--green-deep);
  color: var(--cream);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(196, 168, 130, 0.35);
  box-shadow: 0 4px 20px rgba(92, 36, 51, 0.15);
}

.admin-header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.brand span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.95;
}

.admin-header nav a {
  color: var(--gold-light);
  margin-left: 18px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.admin-header nav a:first-of-type {
  margin-left: 0;
}

.admin-header nav a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-site-strip {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 24px 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}
.admin-site-strip strong {
  color: var(--green-deep);
  font-weight: 600;
}
.admin-site-strip a {
  color: var(--green-mid);
  font-weight: 500;
}
.admin-site-strip a:hover {
  color: var(--green-deep);
  text-decoration: underline;
}

.admin-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.admin-main h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  color: var(--green-deep);
  margin: 0 0 8px;
}

.lead {
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 62ch;
  font-size: 0.98rem;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 22px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-family: var(--font-heading);
  color: var(--green-deep);
  font-weight: 600;
}

.muted {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.5;
}

.row {
  margin-bottom: 16px;
}

.row label {
  display: block;
  font-weight: 600;
  font-size: 0.8125rem;
  margin-bottom: 6px;
  color: var(--charcoal);
}

.row input[type="text"],
.row select {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
  color: var(--charcoal);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.row input:focus,
.row select:focus {
  outline: none;
  border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgba(92, 36, 51, 0.1);
}

.file-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.file-label input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-btn {
  padding: 10px 20px;
  background: var(--green-deep);
  color: var(--cream);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s;
}
.file-btn:hover {
  background: var(--green-mid);
}

.file-name {
  font-size: 0.875rem;
  color: var(--muted);
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn.primary {
  background: var(--green-deep);
  color: var(--cream);
}
.btn.primary:hover:not(:disabled) {
  background: var(--green-mid);
  transform: translateY(-1px);
}

.btn.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.danger {
  background: rgba(255, 255, 255, 0.95);
  color: var(--error);
  border: 1px solid rgba(155, 44, 44, 0.35);
  padding: 6px 12px;
  font-size: 0.8125rem;
}
.btn.danger:hover {
  background: #fff5f5;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(155, 44, 44, 0.08);
  color: var(--error);
  border: 1px solid rgba(155, 44, 44, 0.2);
}

.alert-success {
  background: var(--success-bg);
  color: var(--green-deep);
  border: 1px solid rgba(92, 36, 51, 0.15);
}

.task-form {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.task-form input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
}
.task-form input:focus {
  outline: none;
  border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgba(92, 36, 51, 0.08);
}

.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.task-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}

.task-list li.done span {
  text-decoration: line-through;
  opacity: 0.65;
}

.task-list input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green-deep);
}

.empty {
  text-align: center;
  padding: 28px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(248, 245, 240, 0.5);
}

.empty.soft {
  border: none;
  padding: 14px 0;
  background: transparent;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.sk {
  height: 120px;
  border-radius: var(--radius);
  background: linear-gradient(
    90deg,
    rgba(92, 36, 51, 0.06) 25%,
    rgba(92, 36, 51, 0.03) 50%,
    rgba(92, 36, 51, 0.06) 75%
  );
  background-size: 200% 100%;
  animation: sh 1.2s infinite;
}

@keyframes sh {
  to {
    background-position: -200% 0;
  }
}

.gallery-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(92, 36, 51, 0.05);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  padding: 8px 10px;
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--cream);
}

.gallery-item .btn.danger {
  position: absolute;
  top: 8px;
  right: 8px;
}

code {
  font-size: 0.85em;
  background: rgba(92, 36, 51, 0.06);
  color: var(--green-deep);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.wholesale-admin-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wholesale-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  line-height: 1.5;
}

.wholesale-row .muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-footer {
  max-width: 900px;
  margin: 48px auto 0;
  padding: 20px 24px 40px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.admin-footer a {
  color: var(--green-deep);
  font-weight: 500;
}

/* --- Dashboard shell --- */
.global-loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(248, 245, 240, 0.92);
  font-weight: 600;
  color: var(--green-deep);
  z-index: 1000;
  font-size: 0.95rem;
}
.global-loading[hidden] {
  display: none;
}

.login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 20px;
  background: #f0ebe3;
}
.login-screen[hidden] {
  display: none;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(92, 36, 51, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(212, 175, 55, 0.08), transparent 45%),
    linear-gradient(180deg, #f7f4ef 0%, #ebe6dd 100%);
  pointer-events: none;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fffefb;
  border-radius: 20px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 32px 64px -12px rgba(92, 36, 51, 0.12),
    0 0 0 1px rgba(92, 36, 51, 0.06);
  overflow: hidden;
}

.login-card-accent {
  height: 3px;
  background: linear-gradient(90deg, var(--green-deep), #3d7a5c 40%, var(--gold) 100%);
}

.login-card-inner {
  padding: 40px 36px 32px;
}

.login-emblem {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--green-deep);
  border: 1.5px solid rgba(212, 175, 55, 0.55);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 245, 240, 0.95));
}

.login-brand {
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 4vw, 1.75rem);
  color: var(--green-deep);
  margin: 0 0 6px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.login-tagline {
  text-align: center;
  margin: 0 0 32px;
  font-size: 0.9375rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.login-field {
  margin-bottom: 18px;
}

.login-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2a2a2a;
}

.login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.login-label-row label {
  margin-bottom: 0;
}

.login-show-pw {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--green-mid);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-show-pw:hover {
  color: var(--green-deep);
}

.login-form input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(92, 36, 51, 0.12);
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  background: #faf9f7;
  color: var(--charcoal);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.login-form input::placeholder {
  color: #a8a8a8;
}
.login-form input:hover {
  background: #fff;
  border-color: rgba(92, 36, 51, 0.18);
}
.login-form input:focus {
  outline: none;
  background: #fff;
  border-color: var(--green-deep);
  box-shadow: 0 0 0 4px rgba(92, 36, 51, 0.08);
}

.login-alert {
  padding: 11px 14px;
  margin-bottom: 16px;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #7a2323;
  background: rgba(155, 44, 44, 0.06);
  border: 1px solid rgba(155, 44, 44, 0.18);
}
.login-alert[hidden] {
  display: none;
}

.login-submit {
  width: 100%;
  margin-top: 6px;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  color: #fffefb;
  background: linear-gradient(165deg, #234d3a 0%, var(--green-deep) 45%, #163628 100%);
  box-shadow: 0 4px 14px rgba(92, 36, 51, 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s;
}
.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(92, 36, 51, 0.28);
}
.login-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.login-footer {
  text-align: center;
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(92, 36, 51, 0.08);
  font-size: 0.875rem;
}
.login-footer a {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}
.login-footer a:hover {
  color: var(--green-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: #f4f1ec;
}
.admin-app[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .admin-app {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
  }
}

.admin-sidebar {
  background: var(--green-deep);
  color: var(--cream);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid rgba(212, 175, 55, 0.2);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  border-radius: 10px;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
}

.sidebar-sub {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 2px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  text-align: left;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(248, 245, 240, 0.88);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.nav-item.is-active {
  background: rgba(212, 175, 55, 0.18);
  color: #fff;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-link {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
  padding: 4px 0;
}
.sidebar-link.ghost {
  opacity: 0.85;
}
.sidebar-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--green-deep);
  font-weight: 600;
}

.topbar-user {
  font-size: 0.8125rem;
}

.admin-main-dashboard {
  padding: 28px 28px 64px;
  flex: 1;
}

.dash-panel[hidden] {
  display: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}

.kpi-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--green-deep);
  font-weight: 600;
}

.dashboard-card {
  margin-bottom: 24px;
}
.dashboard-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-family: var(--font-heading);
  color: var(--green-deep);
}

.simple-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}
.simple-list li {
  margin-bottom: 6px;
}

.small {
  font-size: 0.8rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.toolbar-title {
  margin: 0;
  font-size: 1rem;
  font-family: var(--font-heading);
  color: var(--green-deep);
}

.search-input {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  min-width: 200px;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  background: rgba(248, 245, 240, 0.6);
}
.data-table.mono td {
  font-size: 0.78rem;
  vertical-align: top;
}

.table-actions {
  white-space: nowrap;
}
.btn.sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.editor-card {
  margin-top: 20px;
}
.editor-card h3 {
  margin-top: 0;
  font-family: var(--font-heading);
  color: var(--green-deep);
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
  margin-top: 12px;
}
.grid-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--charcoal);
}
.grid-form label.full {
  grid-column: 1 / -1;
}
.grid-form input,
.grid-form select,
.grid-form textarea {
  font: inherit;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.grid-form input:focus,
.grid-form select:focus,
.grid-form textarea:focus {
  outline: none;
  border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgba(92, 36, 51, 0.08);
}

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

.settings-block {
  margin-bottom: 24px;
}
.settings-heading {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-family: var(--font-heading);
  color: var(--green-deep);
  font-weight: 600;
}
.settings-block .grid-form {
  margin-top: 12px;
}

.collection-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.collection-admin-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--card-shadow);
}
.collection-admin-card.is-hidden {
  opacity: 0.72;
  border-style: dashed;
}
.collection-admin-thumb-wrap {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--cream);
  margin-bottom: 10px;
}
.collection-admin-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.collection-admin-name {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 10px;
  word-break: break-all;
  line-height: 1.35;
}

.upload-form .file-label {
  margin-bottom: 12px;
}
.upload-form label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.8125rem;
}
.upload-form input[type="text"],
.upload-form select {
  width: 100%;
  max-width: 420px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
}

.small {
  font-size: 0.8125rem;
}

/* Product editor — image field */
.pe-image-block {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.65);
}
.pe-image-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 4px;
}
.pe-image-hint {
  margin: 0 0 12px;
}
.pe-image-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.pe-img-preview-wrap {
  flex: 0 0 auto;
  width: 200px;
  max-width: 100%;
  aspect-ratio: 5/5.5;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pe-img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pe-img-preview-empty {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 16px;
  text-align: center;
}
.pe-image-side {
  flex: 1 1 220px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pe-url-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--charcoal);
}
.pe-url-label input {
  font: inherit;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pe-url-label input:focus {
  outline: none;
  border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgba(92, 36, 51, 0.08);
}
.pe-img-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pe-hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Media picker (product editor) */
.pe-media-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(42, 28, 32, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pe-media-picker-dialog {
  background: #fff;
  border-radius: 14px;
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(92, 36, 51, 0.2);
}
.pe-media-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.pe-media-picker-head h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--green-deep);
}
.pe-media-picker-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
}
.pe-media-picker-grid {
  padding: 16px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}
.pe-media-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--cream);
  aspect-ratio: 1;
  transition: border-color 0.15s;
}
.pe-media-thumb:hover,
.pe-media-thumb:focus-visible {
  border-color: var(--green-deep);
  outline: none;
}
.pe-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Products table thumbnail */
.th-thumb,
.td-thumb {
  width: 56px;
}
.product-row-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  vertical-align: middle;
  border: 1px solid var(--border);
  background: var(--cream);
}
