:root {
  --black: #111111;
  --soft-black: #1c1c1c;
  --red: #c9232d;
  --red-dark: #9e1820;
  --gold: #c6a15b;
  --cream: #f8f4ee;
  --white: #ffffff;
  --gray: #6f6f6f;
  --muted: #f2eee8;
  --border: #e4ddd4;
  --green: #267a52;
  --orange: #b36b1e;
  --sidebar: #101010;
  --shadow: 0 18px 50px rgba(0,0,0,.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--black);
  background: #f6f3ef;
  font-family: "Montserrat", sans-serif;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }

button { cursor: pointer; }

img { max-width: 100%; display: block; }

.admin-eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.admin-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  padding: 11px 18px;
  font-weight: 700;
}

.admin-button.primary { color: white; background: var(--red); }
.admin-button.primary:hover { background: var(--red-dark); }
.admin-button.secondary { color: var(--black); border-color: var(--border); background: white; }
.admin-button.danger { color: white; background: #8f171e; }

.text-button {
  border: 0;
  padding: 0;
  color: var(--red);
  background: transparent;
  font-weight: 700;
}

/* Login */
.admin-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  background:
    radial-gradient(circle at 15% 20%, rgba(198,161,91,.16), transparent 36%),
    linear-gradient(135deg, #101010, #321115);
}

.login-shell {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: 1fr .9fr;
  overflow: hidden;
  background: white;
  box-shadow: 0 35px 90px rgba(0,0,0,.28);
}

.login-brand-panel {
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 65px;
  color: white;
  background:
    linear-gradient(145deg, rgba(10,10,10,.94), rgba(65,16,21,.92)),
    radial-gradient(circle at 80% 20%, var(--gold), transparent 35%);
}

.admin-brand img {
  width: 180px;
  margin-bottom: 50px;
  padding: 9px;
  background: white;
}

.login-brand-panel h1 {
  margin: 8px 0 18px;
  font-family: "Playfair Display", serif;
  font-size: clamp(3rem, 5vw, 4.8rem);
  line-height: 1;
}

.login-brand-panel > p:not(.admin-eyebrow) {
  max-width: 480px;
  color: rgba(255,255,255,.72);
}

.back-link {
  margin-top: 40px;
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.login-card {
  align-self: center;
  padding: 60px;
}

.login-card h2 {
  margin: 6px 0 12px;
  font-family: "Playfair Display", serif;
  font-size: 2.4rem;
}

.form-help { color: var(--gray); }

.login-card form,
.stack-form {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.login-card label,
.stack-form label,
.admin-form-grid label {
  display: grid;
  gap: 8px;
  font-size: .85rem;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #d9d2c9;
  padding: 13px;
  color: var(--black);
  background: white;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(201,35,45,.18);
  border-color: var(--red);
}

.form-error {
  min-height: 18px;
  margin: -7px 0 0;
  color: var(--red);
  font-size: .8rem;
}

.security-notice {
  margin-top: 28px;
  padding: 16px;
  color: #695d4c;
  background: #f7f0e4;
  border-left: 3px solid var(--gold);
  font-size: .78rem;
}

/* App layout */
.admin-app { min-height: 100vh; }

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  width: 255px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 25px 18px;
  color: white;
  background: var(--sidebar);
}

.sidebar-logo img {
  width: 145px;
  padding: 7px;
  background: white;
}

.admin-nav {
  display: grid;
  gap: 5px;
  margin-top: 34px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  padding: 13px 14px;
  color: rgba(255,255,255,.68);
  text-align: left;
  background: transparent;
  font-weight: 600;
}

.nav-item span { width: 22px; color: var(--gold); }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.09); }

.sidebar-bottom {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.sidebar-bottom a,
.sidebar-bottom button {
  border: 0;
  padding: 7px 4px;
  color: rgba(255,255,255,.65);
  text-align: left;
  text-decoration: none;
  background: transparent;
  font-size: .8rem;
}

.admin-main { margin-left: 255px; }

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 32px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.admin-topbar h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 2rem;
}

.sidebar-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-left: auto;
}

.admin-user > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--red);
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
}

.admin-user small { display: block; color: var(--gray); }

.admin-content { padding: 30px; }

.admin-section { display: none; }
.admin-section.active { display: block; }

.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 24px;
  padding: 20px 24px;
  color: #604f34;
  background: #fff5df;
  border: 1px solid #efddb8;
}

.status-banner p { margin: 4px 0 0; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.metric-card,
.panel {
  background: white;
  border: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(0,0,0,.035);
}

.metric-card { padding: 24px; }
.metric-card p { margin: 0; color: var(--gray); font-size: .82rem; font-weight: 700; }
.metric-card strong {
  display: block;
  margin: 14px 0 6px;
  font-family: "Playfair Display", serif;
  font-size: 2.4rem;
}
.metric-card span { color: var(--gray); font-size: .75rem; }
.metric-card.warning { border-top: 3px solid var(--red); }

.dashboard-grid,
.report-grid,
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.panel { padding: 25px; }

.panel-heading,
.section-toolbar,
.modal-heading,
.export-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading h2,
.coming-soon-panel h2,
.modal-heading h2,
.panel > h2,
.export-panel h2 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.75rem;
}

.simple-list { margin-top: 18px; }

.simple-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.simple-list-item:last-child { border-bottom: 0; }
.simple-list-item p { margin: 3px 0 0; color: var(--gray); font-size: .78rem; }
.simple-list-item strong { font-size: .88rem; }

.empty-inline {
  padding: 25px 0;
  color: var(--gray);
  text-align: center;
}

.quick-actions { margin-top: 20px; }
.quick-action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.quick-action {
  min-height: 70px;
  border: 1px solid var(--border);
  color: var(--black);
  background: var(--cream);
  font-weight: 700;
}

.section-toolbar {
  margin-bottom: 18px;
}

.toolbar-search { min-width: min(400px, 100%); }
.toolbar-search label { display: block; margin-bottom: 6px; font-size: .75rem; font-weight: 700; }
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-heading { padding: 22px 24px; }
.table-wrap { overflow-x: auto; }

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

.admin-table th,
.admin-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.admin-table th {
  color: var(--gray);
  background: #fbfaf8;
  font-size: .72rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.admin-table td { font-size: .84rem; }

.product-cell strong { display: block; }
.product-cell small { color: var(--gray); }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
}

.badge.good { color: #1e7048; background: #e5f5ec; }
.badge.low { color: #9a4d0c; background: #fff0df; }
.badge.out { color: #9d1c23; background: #fde7e8; }
.badge.neutral { color: #555; background: #eee; }

.action-group { display: flex; gap: 7px; }
.icon-button {
  border: 1px solid var(--border);
  padding: 7px 10px;
  background: white;
  font-size: .75rem;
  font-weight: 700;
}
.icon-button.delete { color: var(--red); }

.empty-state { display: none; padding: 70px 20px; text-align: center; }
.empty-state.visible { display: block; }
.empty-state h3 { font-family: "Playfair Display", serif; font-size: 1.8rem; }
.empty-state p { color: var(--gray); }

.inventory-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.inventory-summary article { padding: 20px; background: white; border: 1px solid var(--border); }
.inventory-summary span { color: var(--gray); font-size: .75rem; font-weight: 700; }
.inventory-summary strong { display: block; margin-top: 8px; font-family: "Playfair Display", serif; font-size: 1.8rem; }

.inquiry-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.inquiry-column {
  min-height: 480px;
  padding: 14px;
  background: #ece7df;
}

.inquiry-column h3 {
  display: flex;
  justify-content: space-between;
  margin: 0 0 14px;
  font-family: "Playfair Display", serif;
}

.inquiry-card {
  margin-bottom: 11px;
  padding: 15px;
  background: white;
  border-left: 3px solid var(--gold);
  box-shadow: 0 7px 20px rgba(0,0,0,.05);
}

.inquiry-card p { margin: 5px 0; color: var(--gray); font-size: .75rem; }
.inquiry-card .inquiry-type { color: var(--red); font-weight: 700; text-transform: capitalize; }
.inquiry-actions { display: flex; gap: 7px; margin-top: 12px; }

.coming-soon-panel {
  max-width: 760px;
  margin: 60px auto;
  padding: 55px;
  text-align: center;
  background: white;
  border: 1px solid var(--border);
}
.coming-soon-panel > span { font-size: 3rem; color: var(--gold); }
.coming-soon-panel p { color: var(--gray); }

.future-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 25px;
  text-align: left;
}
.future-list div { padding: 13px; background: var(--cream); }

.bar-report { margin-top: 22px; }
.bar-row { margin-bottom: 16px; }
.bar-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: .78rem; font-weight: 700; }
.bar-track { height: 9px; overflow: hidden; background: #ece8e2; }
.bar-fill { height: 100%; background: var(--red); }

.export-panel { margin-top: 20px; }
.export-panel p { color: var(--gray); }

.danger-panel { border-top: 3px solid var(--red); }

.check-list { padding-left: 18px; }
.check-list li { margin: 8px 0; }

.section-description { max-width: 700px; color: var(--gray); }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.62);
}

.admin-modal {
  width: min(820px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px;
  background: white;
  box-shadow: var(--shadow);
}

.small-modal { width: min(680px, 100%); }

.modal-close {
  width: 40px;
  height: 40px;
  border: 0;
  background: var(--cream);
  font-size: 1.5rem;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}

.span-2 { grid-column: 1 / -1; }

.checkbox-label {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
  justify-content: flex-start;
}
.checkbox-label input { width: auto; }

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

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  max-width: 360px;
  padding: 14px 18px;
  color: white;
  background: var(--black);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: .25s ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
  .metric-grid,
  .inventory-summary { grid-template-columns: repeat(2, 1fr); }
  .quick-action-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: 370px; padding: 40px; }
  .login-card { padding: 40px; }

  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: block; }

  .dashboard-grid,
  .report-grid,
  .settings-grid { grid-template-columns: 1fr; }

  .admin-user div { display: none; }
}

@media (max-width: 620px) {
  .admin-content { padding: 18px; }
  .admin-topbar { padding: 12px 18px; }
  .admin-topbar h1 { font-size: 1.55rem; }

  .metric-grid,
  .inventory-summary,
  .quick-action-grid,
  .future-list,
  .admin-form-grid { grid-template-columns: 1fr; }

  .span-2 { grid-column: auto; }

  .status-banner,
  .section-toolbar,
  .panel-heading,
  .export-panel { align-items: stretch; flex-direction: column; }

  .toolbar-search { min-width: 0; }
  .login-card { padding: 30px 24px; }
  .login-brand-panel { padding: 35px 24px; }
}


.modal-backdrop[hidden] {
  display: none !important;
}

.admin-product-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-product-name img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.product-image-preview {
  min-height: 130px;
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--gray);
  background: var(--cream);
  border: 1px dashed var(--border);
}

.product-image-preview img {
  max-width: 220px;
  max-height: 180px;
  object-fit: contain;
}

#image-upload-status {
  color: var(--gray);
  font-weight: 500;
}


#product-sku[readonly] {
  color: #5e554a;
  background: #f3eee7;
  cursor: not-allowed;
}

#product-sku + small {
  color: var(--gray);
  font-weight: 500;
}


.receive-product-results {
  max-height: 290px;
  overflow-y: auto;
  border: 1px solid var(--border);
  background: #fbfaf8;
}

.receive-result {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  color: var(--black);
  text-align: left;
  background: white;
}

.receive-result:last-child {
  border-bottom: 0;
}

.receive-result:hover {
  background: var(--cream);
}

.receive-result strong,
.receive-result small {
  display: block;
}

.receive-result small {
  margin-top: 3px;
  color: var(--gray);
}

.receive-current-stock {
  flex: 0 0 auto;
  color: var(--red);
  font-size: .78rem;
  font-weight: 700;
}

.selected-product-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: var(--cream);
  border-left: 4px solid var(--gold);
}

.selected-product-card[hidden] {
  display: none !important;
}

.selected-product-card img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.selected-product-card h3,
.selected-product-card p {
  margin: 3px 0;
}

.inventory-history-panel {
  margin-top: 20px;
}

.inventory-history-quantity {
  text-align: right;
}

.inventory-history-quantity small {
  display: block;
  margin-top: 4px;
  color: var(--gray);
  font-size: .7rem;
}


/* Orders */
.order-filter-label {
  align-self: center;
  color: var(--gray);
  font-size: .75rem;
  font-weight: 700;
}

#order-status-filter { min-width: 190px; }
.order-modal { width: min(980px, 100%); }
.order-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
.order-detail-card { padding: 18px; background: var(--cream); border: 1px solid var(--border); }
.order-detail-card h3, .order-notes-block h3 { margin: 0 0 12px; font-family: "Playfair Display", serif; }
.order-detail-card p { display: flex; justify-content: space-between; gap: 16px; margin: 8px 0; }
.order-detail-card > strong { display: block; margin-bottom: 8px; }
.order-items-table { margin: 20px 0; border: 1px solid var(--border); }
.order-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
.order-summary-grid div { padding: 15px; background: #fbfaf8; border: 1px solid var(--border); }
.order-summary-grid span { display: block; color: var(--gray); font-size: .72rem; font-weight: 700; }
.order-summary-grid strong { display: block; margin-top: 6px; }
.order-grand-total { border-top: 3px solid var(--red) !important; }
.order-notes-block { padding: 18px; background: var(--cream); margin-bottom: 8px; }
.order-notes-block p { margin: 0; color: var(--gray); }

@media (max-width: 700px) {
  .order-detail-grid, .order-summary-grid { grid-template-columns: 1fr; }
}


/* Completed Orders module */
.order-metric-grid { margin-top: 18px; }
.dashboard-orders-panel { margin-top: 20px; }
.dashboard-order-list { margin-top: 16px; }
.dashboard-order-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  color: var(--black);
  text-align: left;
  background: transparent;
}
.dashboard-order-item:last-child { border-bottom: 0; }
.dashboard-order-item:hover { color: var(--red); }
.dashboard-order-item span strong, .dashboard-order-item span small { display: block; }
.dashboard-order-item span small { margin-top: 3px; color: var(--gray); }
.order-notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.order-timeline-block { padding: 18px; background: white; border: 1px solid var(--border); }
.order-timeline-block h3 { margin: 0 0 14px; font-family: "Playfair Display", serif; }
.order-timeline { display: grid; gap: 12px; }
.order-timeline-item { display: grid; grid-template-columns: 12px 1fr; gap: 10px; align-items: start; }
.order-timeline-item > span { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(198,161,91,.15); }
.order-timeline-item strong, .order-timeline-item small { display: block; }
.order-timeline-item small { margin-top: 3px; color: var(--gray); font-size: .72rem; }
.order-print-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
@media (max-width: 700px) {
  .order-notes-grid { grid-template-columns: 1fr; }
  .order-print-actions { flex-direction: column; }
}


/* Customers */
.customer-detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.customer-detail-grid article {
  padding: 16px;
  background: var(--cream);
  border: 1px solid var(--border);
}
.customer-detail-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--gray);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.customer-detail-grid strong { word-break: break-word; }
.customer-history-panel { margin-top: 0; }
@media (max-width: 980px) { .customer-detail-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .customer-detail-grid { grid-template-columns: 1fr; } }


/* Completed customer CRM */
.customer-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.customer-metric-grid article {
  padding: 20px;
  background: white;
  border: 1px solid var(--border);
}
.customer-metric-grid span {
  color: var(--gray);
  font-size: .75rem;
  font-weight: 700;
}
.customer-metric-grid strong {
  display: block;
  margin-top: 8px;
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
}
.customer-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.customer-modal { width: min(1050px, 100%); }
.customer-detail-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.customer-detail-grid article { min-width: 0; }
.customer-email-value,
.customer-table-email { overflow-wrap: anywhere; word-break: normal !important; }
.customer-primary-cell { min-width: 230px; }
.customer-profile-layout { align-items: start; }
.customer-tags-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  border: 1px solid var(--border);
  padding: 15px;
}
.customer-tags-fieldset legend { padding: 0 6px; font-size: .8rem; font-weight: 700; }
.customer-tag-list { display: flex; gap: 5px; flex-wrap: wrap; }
.customer-order-history-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 13px 0;
  color: var(--black);
  text-align: left;
  background: transparent;
}
.customer-order-history-item:hover { color: var(--red); }
.customer-order-history-item span strong,
.customer-order-history-item span small { display: block; }
.customer-order-history-item span small { margin-top: 3px; color: var(--gray); }
@media (max-width: 1120px) {
  .customer-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .customer-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .customer-metric-grid,
  .customer-detail-grid { grid-template-columns: 1fr; }
  .customer-header-actions { align-items: stretch; flex-direction: column; }
  .customer-header-actions .modal-close { align-self: flex-end; }
}

.order-cancel-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border: 1px solid #e8b8bb;
  background: #fff5f5;
}

.order-cancel-panel strong {
  color: #8f171e;
}

.order-cancel-panel p {
  margin: 4px 0 0;
  color: var(--gray);
  font-size: .78rem;
}

.order-cancel-panel .admin-button:disabled {
  cursor: not-allowed;
  opacity: .65;
}

@media (max-width: 620px) {
  .order-cancel-panel {
    align-items: stretch;
    flex-direction: column;
  }
}



/* Order fulfillment */
.shipping-management {
  padding: 18px;
  border: 1px solid var(--border);
  background: #fbfaf8;
}
.shipping-management[hidden] { display: none !important; }
.shipping-management-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.shipping-management-heading h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
}
.shipping-address-preview {
  margin-bottom: 16px;
  padding: 14px 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  background: white;
  border-left: 4px solid var(--gold);
}
.shipping-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 16px;
}
#order-detail-address {
  margin-top: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .shipping-fields-grid { grid-template-columns: 1fr; }
  .shipping-management-heading { align-items: flex-start; flex-direction: column; }
}

/* Gallery Manager */
.gallery-filter-label {
  align-self: center;
  color: var(--gray);
  font-size: .75rem;
  font-weight: 700;
}

#gallery-category-filter {
  min-width: 170px;
}

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

.gallery-admin-card {
  min-width: 0;
  overflow: hidden;
  background: white;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.gallery-admin-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--muted);
}

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

.gallery-admin-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.gallery-admin-content {
  padding: 18px;
}

.gallery-admin-content h3 {
  margin: 0 0 8px;
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
}

.gallery-admin-content > p:not(.admin-eyebrow) {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--gray);
  font-size: .84rem;
}

.gallery-admin-content > small {
  color: var(--gray);
  font-size: .72rem;
}

.gallery-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.gallery-empty {
  margin-top: 20px;
}

.gallery-modal {
  width: min(820px, 100%);
}

.gallery-image-preview {
  min-height: 240px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--gray);
  background: var(--cream);
  border: 1px dashed var(--border);
}

.gallery-image-preview img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

@media (max-width: 1100px) {
  .gallery-admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .gallery-admin-grid {
    grid-template-columns: 1fr;
  }

  .gallery-admin-actions {
    flex-direction: column;
  }
}

