:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --text: #121316;
  --muted: #5c606b;
  --border: rgba(18, 19, 22, 0.14);
  --shadow: 0 18px 40px rgba(18, 19, 22, 0.08);

  --accent: #0f766e;
  --accent-2: #b45309;
  --danger: #b42318;

  --radius: 8px;
  --container: 1120px;

  --focus: 0 0 0 3px rgba(15, 118, 110, 0.25);
}

html[data-theme="dark"] {
  --bg: #0d0f12;
  --surface: #14171c;
  --surface-2: #101319;
  --text: #e8eaee;
  --muted: #a8afbd;
  --border: rgba(232, 234, 238, 0.14);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
  --focus: 0 0 0 3px rgba(47, 158, 141, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  direction: rtl;
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

@keyframes pageFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes itemFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes brandGlow {
  0%,
  100% {
    box-shadow: 0 8px 18px rgba(18, 19, 22, 0.14);
  }

  50% {
    box-shadow: 0 10px 26px rgba(15, 118, 110, 0.22);
  }
}

.has-custom-cursor,
.has-custom-cursor a,
.has-custom-cursor button,
.has-custom-cursor summary,
.has-custom-cursor .card,
.has-custom-cursor .product-slider {
  cursor: none;
}

.has-custom-cursor input,
.has-custom-cursor textarea,
.has-custom-cursor select {
  cursor: text;
}

.custom-cursor-dot,
.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 999;
  transform: translate3d(-100px, -100px, 0);
}

.custom-cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 999px;
  background: var(--accent);
}

.custom-cursor-ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.55);
  transition: width 140ms ease, height 140ms ease, margin 140ms ease, background 140ms ease, border-color 140ms ease;
}

.custom-cursor-dot.is-visible,
.custom-cursor-ring.is-visible {
  opacity: 1;
}

.custom-cursor-ring.is-interactive {
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  background: rgba(15, 118, 110, 0.08);
}

.custom-cursor-ring.is-down {
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-color: rgba(180, 83, 9, 0.7);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 246, 243, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .app-header {
  background: rgba(13, 15, 18, 0.72);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #141414 url("assets/store/evil-logo.png") center / cover no-repeat;
  border: 1px solid var(--border);
  box-shadow: 0 8px 18px rgba(18, 19, 22, 0.14);
  flex: 0 0 auto;
  animation: brandGlow 4.4s ease-in-out infinite;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 260px;
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-tagline {
  font-size: 0.86rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-controls {
  display: flex;
  align-items: end;
  justify-content: end;
  gap: 10px;
  flex: 1;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 170px;
}

.field-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  outline: none;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  box-shadow: var(--focus);
  border-color: rgba(15, 118, 110, 0.55);
}

.field-search {
  min-width: min(360px, 44vw);
  position: relative;
}

.field-search input {
  padding-inline-start: 38px;
}

.field-search .icon {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.72;
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.icon-btn:hover {
  background: var(--surface-2);
}

.icon-btn.is-active {
  border-color: rgba(15, 118, 110, 0.55);
  color: var(--accent);
  box-shadow: var(--focus);
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
}

.badge {
  position: absolute;
  inset-inline-start: -8px;
  top: -8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--bg);
}

.main {
  padding: 20px 0 56px;
  animation: pageFadeUp 420ms ease both;
}

.grid-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 18px;
}

.page-title {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.subtle-link {
  color: var(--muted);
  font-size: 0.92rem;
}

.subtle-link:hover {
  color: var(--text);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(18, 19, 22, 0.03);
  overflow: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 160ms ease, transform 160ms ease;
  will-change: transform;
  cursor: pointer;
  animation: itemFadeUp 420ms ease both;
}

.products-grid .card:nth-child(2) {
  animation-delay: 35ms;
}

.products-grid .card:nth-child(3) {
  animation-delay: 70ms;
}

.products-grid .card:nth-child(4) {
  animation-delay: 105ms;
}

.products-grid .card:nth-child(5) {
  animation-delay: 140ms;
}

.products-grid .card:nth-child(n + 6) {
  animation-delay: 165ms;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.card:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-color: rgba(15, 118, 110, 0.55);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 220ms ease;
  will-change: transform;
}

.tag {
  position: absolute;
  inset-inline-start: 10px;
  top: 10px;
  background: rgba(18, 19, 22, 0.82);
  color: #ffffff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  letter-spacing: 0;
}

html[data-theme="dark"] .tag {
  background: rgba(232, 234, 238, 0.14);
  color: var(--text);
  border: 1px solid var(--border);
}

.card-body {
  padding: 12px;
  display: grid;
  gap: 8px;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
}

.compare {
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.9rem;
}

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

.btn {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 10px 12px;
  cursor: pointer;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  text-align: center;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  border-color: rgba(15, 118, 110, 0.22);
  color: #ffffff;
}

.btn-primary:hover {
  background: color-mix(in oklab, var(--accent) 88%, #000000);
}

.btn-ghost {
  background: transparent;
}

.btn-danger {
  background: var(--danger);
  border-color: rgba(180, 35, 24, 0.18);
  color: #ffffff;
}

.btn-danger:hover {
  background: color-mix(in oklab, var(--danger) 88%, #000000);
}

.btn-wide {
  width: 100%;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 14px;
  background: var(--surface);
}

.empty-title {
  margin: 0 0 6px;
  font-weight: 800;
}

.empty-subtitle {
  margin: 0;
  color: var(--muted);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 19, 22, 0.36);
  z-index: 60;
}

.drawer-overlay[hidden],
.zoom-overlay[hidden],
.account-overlay[hidden] {
  display: none;
}

.account-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(18, 19, 22, 0.38);
}

.account-box {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.account-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.account-actions {
  grid-template-columns: 1fr auto;
}

.admin-locked main {
  visibility: hidden;
}

.admin-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--bg);
}

.admin-gate-box {
  box-shadow: var(--shadow);
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: min(420px, 92vw);
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
  z-index: 70;
  display: grid;
  grid-template-rows: auto 1fr auto;
  transform: translateX(-110%);
  transition: transform 200ms ease;
}

html[dir="rtl"] .drawer {
  transform: translateX(110%);
}

.drawer.open {
  transform: translateX(0);
}

html[dir="rtl"] .drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.drawer-title {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: 0;
}

.drawer-body {
  padding: 12px 14px;
  overflow: auto;
}

.drawer-foot {
  border-top: 1px solid var(--border);
  padding: 14px;
  background: var(--surface-2);
  display: grid;
  gap: 12px;
}

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

.muted {
  color: var(--muted);
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: none;
}

.thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface-2);
}

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

.cart-meta {
  display: grid;
  gap: 6px;
}

.cart-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cart-title a {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.25;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.stepper button {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.stepper input {
  width: 42px;
  height: 34px;
  border: none;
  border-inline: 1px solid var(--border);
  text-align: center;
  background: transparent;
  outline: none;
}

.toast-host {
  position: fixed;
  bottom: 14px;
  inset-inline-end: 14px;
  display: grid;
  gap: 10px;
  z-index: 90;
}

.toast {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 12px;
  min-width: min(340px, calc(100vw - 28px));
}

.toast strong {
  display: block;
  font-size: 0.95rem;
}

.toast span {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Pages */
.page {
  padding: 18px 0 56px;
  animation: pageFadeUp 420ms ease both;
}

.crumbs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.link-btn:hover {
  color: var(--text);
}

.two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  animation: itemFadeUp 420ms ease both;
}

.sync-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
}

.sync-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.gallery {
  display: grid;
  gap: 10px;
  position: relative;
}

.hero-media {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-slider {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  cursor: zoom-in;
  touch-action: pan-y;
}

.product-slider.zoom-active {
  cursor: none;
}

.product-slider:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-color: rgba(15, 118, 110, 0.55);
}

.product-slider.is-single .slider-btn,
.product-slider.is-single .slider-dots {
  display: none;
}

.slider-track {
  height: 100%;
  display: flex;
  direction: ltr;
  transform: translate3d(0, 0, 0);
  transition: transform 200ms ease;
}

.slider-track.dragging {
  transition: none;
}

.slide {
  flex: 0 0 100%;
  height: 100%;
  background: var(--surface-2);
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.zoom-lens {
  position: absolute;
  width: 116px;
  height: 116px;
  border: 1px solid rgba(15, 118, 110, 0.52);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 24px rgba(18, 19, 22, 0.18);
  backdrop-filter: blur(2px);
  display: none;
  pointer-events: none;
  z-index: 4;
}

.product-slider.zoom-active .zoom-lens {
  display: block;
}

.zoom-preview {
  position: fixed;
  width: min(430px, 38vw);
  height: min(540px, calc(100vh - 28px));
  min-width: 300px;
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface);
  background-repeat: no-repeat;
  box-shadow: var(--shadow);
  display: none;
  pointer-events: none;
  z-index: 55;
}

.zoom-preview.is-open {
  display: block;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(18, 19, 22, 0.18);
  backdrop-filter: blur(10px);
}

html[data-theme="dark"] .slider-btn {
  background: rgba(20, 23, 28, 0.82);
  border-color: rgba(232, 234, 238, 0.18);
}

.slider-btn.prev {
  left: 10px;
}

.slider-btn.next {
  right: 10px;
}

.slider-btn.next .icon {
  transform: rotate(180deg);
}

.slider-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  display: inline-flex;
  gap: 8px;
  z-index: 2;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(18, 19, 22, 0.34);
}

html[data-theme="dark"] .slider-dots {
  background: rgba(232, 234, 238, 0.14);
  border: 1px solid var(--border);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  padding: 0;
}

.dot.active {
  background: rgba(255, 255, 255, 0.96);
}

.dot:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 19, 22, 0.74);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  cursor: zoom-out;
  touch-action: none;
}

.zoom-image {
  max-width: min(1100px, 96vw);
  max-height: 92vh;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  object-fit: contain;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.product-meta {
  display: grid;
  gap: 8px;
}

.meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.92rem;
}

.stock-in {
  color: var(--accent);
}

.stock-out {
  color: var(--danger);
}

.stock-unknown {
  color: var(--text);
}

.bullets {
  margin: 12px 0 0;
  padding-inline-start: 20px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.specs {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

.spec-row:first-child {
  border-top: none;
}

.spec-row span {
  color: var(--muted);
}

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

.thumbs button {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.thumbs button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-color: rgba(15, 118, 110, 0.55);
}

.thumbs button[aria-current="true"] {
  box-shadow: var(--focus);
  border-color: rgba(15, 118, 110, 0.55);
}

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

.product-title {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.desc {
  color: var(--muted);
  margin: 0;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.summary {
  display: grid;
  gap: 10px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.95rem;
}

.track-result,
.orders-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.order-card,
.order-mini {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.order-card {
  display: grid;
  gap: 14px;
  padding: 14px;
}

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

.order-id {
  display: block;
  margin-top: 3px;
  font-size: 1.05rem;
  direction: ltr;
  text-align: right;
}

.order-meta > div {
  display: grid;
  gap: 3px;
  min-width: 130px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 800;
  background: var(--surface-2);
}

.status-pending {
  color: #8a5b00;
  border-color: rgba(180, 83, 9, 0.28);
  background: rgba(180, 83, 9, 0.08);
}

.status-approved {
  color: var(--accent);
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.08);
}

.status-shipped {
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.25);
  background: rgba(29, 78, 216, 0.08);
}

.status-delivered {
  color: #15803d;
  border-color: rgba(21, 128, 61, 0.25);
  background: rgba(21, 128, 61, 0.08);
}

.status-rejected,
.status-cancelled {
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.24);
  background: rgba(180, 35, 24, 0.08);
}

.timeline {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  gap: 2px;
  padding-inline-start: 24px;
}

.timeline li::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
}

.order-actions {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.order-mini {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px;
  cursor: pointer;
  text-align: start;
}

.order-mini:hover {
  background: var(--surface-2);
}

.admin-orders {
  display: grid;
  gap: 12px;
}

.admin-order-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.admin-order-details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface-2);
}

.admin-order-details summary {
  cursor: pointer;
  font-weight: 800;
}

.order-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.order-details-grid > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-details-grid strong {
  overflow-wrap: anywhere;
}

.rejection-field {
  margin-top: 4px;
}

.admin-order-card .order-actions {
  margin-top: 4px;
}

.hr {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 8px 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
  align-items: start;
}

.admin-products {
  display: grid;
  gap: 10px;
}

.admin-orders-panel {
  grid-column: 1 / -1;
}

.product-row {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.row-fields {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr;
  gap: 10px;
}

.image-tools {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.tiny {
  font-size: 0.82rem;
}

@media (max-width: 1060px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .field-search {
    min-width: min(320px, 46vw);
  }
}

@media (max-width: 860px) {
  .header-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .brand {
    min-width: auto;
  }

  .header-controls {
    flex: 1 1 100%;
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .field {
    min-width: 160px;
    flex: 1 1 160px;
  }

  .field-search {
    min-width: 100%;
  }

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

  .two-col {
    grid-template-columns: 1fr;
  }

  .zoom-preview,
  .zoom-lens {
    display: none !important;
  }

  .zoom-image {
    max-width: calc(100vw - 24px);
    max-height: 88vh;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .row-fields {
    grid-template-columns: 1fr;
  }

  .order-details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    width: calc(100% - 20px);
  }
}

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