:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1a1d21;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --focus: #1a1d21;
  --metal: #c9ced3;
  --metal-bright: #e9ecef;
  --metal-dark: #9aa1a8;
  --plaque-bg: #5e2129;
  --plaque-text: #f3f4f6;
  --font-plaque: "Bebas Neue", sans-serif;
  --font-ui: "Instrument Sans", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(1100px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  height: 40px;
  width: auto;
}

.header-titles {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  min-width: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.auth-who {
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-logout {
  margin: 0;
}

.auth-page {
  max-width: 420px;
  margin: 0 auto;
}

.auth-page > p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: inherit;
}

.header h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header h1 a {
  color: inherit;
  text-decoration: none;
}

.header h1 a:hover,
.header h1 a:focus-visible {
  text-decoration: underline;
}

.meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.layout {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr;
  gap: 3.5rem;
  align-items: start;
}

.preview {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  gap: 1rem;
  padding: 1.5rem 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: visible;
}

.preview.is-showing-measures {
  padding: 2.1rem 2.4rem 1.4rem 2.8rem;
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 2.35rem 2.75rem 1.85rem;
  box-sizing: border-box;
  overflow: visible;
}

.preview.is-showing-measures .preview-stage {
  padding: 2.9rem 3.4rem 2.3rem;
}

.preview-actions {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.plaque-measures {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 8;
}

.plaque-measures[hidden] {
  display: none !important;
}

.plaque-measures .dim-ext,
.plaque-measures .dim-bar,
.plaque-measures .dim-tick {
  position: absolute;
  background: #111827;
  box-shadow: 0 0 0 1.5px #fff;
}

.plaque-measures .dim-ext {
  height: 2px;
  transform-origin: 0 50%;
}

.plaque-measures .dim-item {
  position: absolute;
}

.plaque-measures .dim-item.is-h {
  height: 0;
}

.plaque-measures .dim-item.is-v {
  width: 0;
}

.plaque-measures .dim-item.is-h .dim-bar {
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
}

.plaque-measures .dim-item.is-v .dim-bar {
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
}

.plaque-measures .dim-item.is-h .dim-tick {
  width: 2px;
  height: 12px;
  top: -6px;
}

.plaque-measures .dim-item.is-h .dim-tick-start {
  left: 0;
}

.plaque-measures .dim-item.is-h .dim-tick-end {
  right: 0;
}

.plaque-measures .dim-item.is-v .dim-tick {
  width: 12px;
  height: 2px;
  left: -6px;
}

.plaque-measures .dim-item.is-v .dim-tick-start {
  top: 0;
}

.plaque-measures .dim-item.is-v .dim-tick-end {
  bottom: 0;
}

.plaque-measures .dim-label {
  position: absolute;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: #111827;
  background: #fff;
  border: 1px solid #111827;
  border-radius: 2px;
  padding: 0.14rem 0.4rem;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.12);
}

.plaque-measures .dim-item.is-h .dim-label {
  left: 50%;
  top: -8px;
  transform: translate(-50%, -100%);
}

.plaque-measures .dim-item.is-v.dim-height .dim-label {
  top: 50%;
  right: 8px;
  left: auto;
  transform: translate(0, -50%);
}

.plaque-measures .dim-item.is-v.dim-cap .dim-label {
  top: 50%;
  left: 8px;
  transform: translate(0, -50%);
}

.plaque {
  --w: 280px;
  --h: 222px;
  position: relative;
  width: var(--w);
  height: var(--h);
  transition: width 0.3s ease, height 0.3s ease;
  filter: drop-shadow(0 12px 24px rgba(26, 29, 33, 0.12));
}

.plaque-face {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--metal-bright), var(--metal) 45%, var(--metal-dark));
}

.plaque-inner {
  position: absolute;
  inset: 9px;
  background: var(--plaque-bg);
  overflow: hidden;
  transition: background 0.25s ease;
}

.plaque-text-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  pointer-events: none;
}

.plaque-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
  padding: 0.5rem 0.9rem;
  text-align: center;
  max-width: 100%;
  pointer-events: none;
}

.plaque-icon {
  position: absolute;
  left: var(--icon-x, 18%);
  top: var(--icon-y, 50%);
  z-index: 2;
  width: 22%;
  max-width: 3.2rem;
  aspect-ratio: 1;
  max-height: 62%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--plaque-text);
  overflow: visible;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.plaque-icon.is-hidden {
  display: none;
}

.plaque-icon.is-dragging {
  cursor: grabbing;
}

.plaque-icon > svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  pointer-events: none;
}

.plaque-icon svg [fill]:not([fill="none"]) {
  fill: currentColor !important;
}

.plaque-icon svg [stroke]:not([stroke="none"]) {
  stroke: currentColor;
}

.line {
  color: var(--plaque-text);
  font-family: var(--font-plaque);
  line-height: 1.05;
  letter-spacing: 0.04em;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.line-primary {
  font-size: var(--line1-size, 3rem);
  font-weight: 700;
  max-width: none;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.line-secondary {
  font-size: clamp(0.75rem, 2vw, 1rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.line.is-empty {
  display: none;
}

.plaque-content.is-single-line {
  width: 100%;
  height: 100%;
  padding-top: 0;
  padding-bottom: 0;
  gap: 0;
  justify-content: center;
}

.plaque-content.is-single-line .line-primary {
  line-height: 1;
  white-space: nowrap;
}

/* Shapes */
.shape-echancree .plaque-face,
.shape-echancree .plaque-inner {
  clip-path: polygon(0 12%, 8% 0, 92% 0, 100% 12%, 100% 88%, 92% 100%, 8% 100%, 0 88%);
}

.shape-classique .plaque-face,
.shape-classique .plaque-inner {
  border-radius: 4px;
}

.shape-classique .plaque-inner {
  inset: 8px;
  border-radius: 2px;
}

.shape-rustica .plaque-face,
.shape-rustica .plaque-inner {
  border-radius: 28% 28% 16% 16% / 34% 34% 20% 20%;
}

.shape-rustica .plaque-inner {
  inset: 10px;
}

.shape-rond {
  /* Dimensions définies en JS selon le format. */
}

.shape-rond .plaque-face,
.shape-rond .plaque-inner {
  border-radius: 50%;
}

.shape-rond .plaque-inner {
  inset: 11px;
}

/* Aspect */
.aspect-relief .plaque-inner {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.aspect-relief .line {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28),
    0 -1px 1px rgba(0, 0, 0, 0.4);
}

.aspect-plat .line {
  text-shadow: none;
}

/* Fonts */
.font-gothic { --font-plaque: "Bebas Neue", Impact, sans-serif; }

.font-scs { --font-plaque: "Instrument Sans", Helvetica, sans-serif; }
.font-scs .line { font-weight: 600; letter-spacing: 0.02em; }
.font-scs .line-secondary { letter-spacing: 0.12em; }

.font-snv { --font-plaque: "Libre Baskerville", Georgia, serif; }
.font-snv .line { letter-spacing: 0.01em; }
.font-snv .line-secondary { letter-spacing: 0.04em; text-transform: none; }

.plaque.text-dark { --plaque-text: #1a1d21; }
.plaque.text-dark.aspect-relief .line {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Holes */
.hole {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7a8086, #2c3034 60%, #111);
  box-shadow: 0 0 0 1.5px rgba(201, 206, 211, 0.95);
  opacity: 0;
  z-index: 2;
  transition: opacity 0.2s ease;
}

.plaque[data-holes="2"] .hole-tl,
.plaque[data-holes="2"] .hole-tr,
.plaque[data-holes="4"] .hole {
  opacity: 1;
}

.hole-tl { top: 16px; left: 20px; }
.hole-tr { top: 16px; right: 20px; }
.hole-bl { bottom: 16px; left: 20px; }
.hole-br { bottom: 16px; right: 20px; }

.shape-echancree .hole-tl { top: 26px; left: 26px; }
.shape-echancree .hole-tr { top: 26px; right: 26px; }
.shape-echancree .hole-bl { bottom: 26px; left: 26px; }
.shape-echancree .hole-br { bottom: 26px; right: 26px; }

.shape-rond .hole-tl { top: 26px; left: 50%; transform: translateX(-50%); }
.shape-rond .hole-tr,
.shape-rond .hole-br { display: none; }
.shape-rond .hole-bl { bottom: 26px; left: 50%; transform: translateX(-50%); }
.shape-rond[data-holes="2"] .hole-bl { opacity: 0; }
.shape-rond[data-holes="4"] .hole-tl,
.shape-rond[data-holes="4"] .hole-bl { opacity: 1; }

/* Sidebar */
.sidebar {
  padding-top: 0.25rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="text"] {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  border-radius: 0;
  padding: 0.55rem 0;
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

input[type="text"]::placeholder {
  color: #9ca3af;
}

input[type="text"]:focus {
  border-bottom-color: var(--focus);
}

.field-select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  border-radius: 0;
  padding: 0.55rem 0;
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
  cursor: pointer;
}

.field-select:focus {
  border-bottom-color: var(--focus);
}

input[type="file"] {
  width: 100%;
  font: inherit;
  font-size: 0.875rem;
  color: var(--text);
}

.field-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}

.label-inline {
  margin-top: 0.35rem;
}

.icon-pos-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.icon-pos-wrap.is-hidden {
  display: none;
}

.btn-sm {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  align-self: flex-start;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pill {
  cursor: pointer;
}

.pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill span {
  display: block;
  padding: 0.4rem 0.7rem;
  font-size: 0.8125rem;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.pill:hover span {
  color: var(--text);
}

.pill:has(input:checked) span {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line-strong);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.swatch {
  position: relative;
  cursor: pointer;
  width: 28px;
  height: 28px;
}

.swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swatch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--c);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.swatch:hover span {
  transform: scale(1.08);
}

.swatch:has(input:checked) span {
  box-shadow: 0 0 0 1.5px var(--bg), 0 0 0 3px var(--text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-link,
.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.25rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-link:hover,
.nav-link:focus-visible,
.cart-link:hover,
.cart-link:focus-visible {
  text-decoration: underline;
}

.nav-link.is-active,
.cart-link.is-active {
  text-decoration: underline;
}

.cart-badge {
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.flash {
  margin: -1rem 0 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 2px;
  font-size: 0.875rem;
}

.flash-ok {
  background: #ecfdf3;
  color: #14532d;
}

.flash-error {
  background: #fef2f2;
  color: #7f1d1d;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 2px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  background: none;
  color: var(--text);
}

.btn-primary {
  background: var(--text);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #000;
}

.btn-ghost {
  border-color: var(--line-strong);
  background: var(--surface);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--text);
}

.btn-ghost[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

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

.btn-block {
  width: 100%;
}

.actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.actions input[type="number"],
.qty-form input[type="number"] {
  width: 4.5rem;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 0 0.55rem;
  border-radius: 2px;
}

.price-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}

.cart-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1.25rem;
  align-items: start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.cart-item h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.cart-item p {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.cart-price {
  color: var(--text) !important;
}

.cart-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.6rem;
}

.cart-line-total {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.cart-thumb {
  width: 120px;
  min-height: 96px;
  padding: 0.35rem;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
}

.plaque.mini {
  width: var(--w, 88px);
  height: var(--h, 70px);
  filter: drop-shadow(0 4px 8px rgba(26, 29, 33, 0.1));
}

.plaque.mini .plaque-inner {
  inset: 5px;
}

.plaque.mini .line-primary {
  font-size: 1.1rem;
  white-space: nowrap;
}

.plaque.mini .line-secondary {
  font-size: 0.45rem;
}

.cart-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0 0;
}

.empty-state {
  padding: 3rem 0;
  text-align: center;
}

.empty-state p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem 1.35rem 1.5rem;
  margin-bottom: 1rem;
}

.card h2 {
  margin: 0 0 1rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.quote-ref {
  background: #ecfdf3;
  border-color: #86efac;
}

.quote-ref-number {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #14532d;
  font-variant-numeric: tabular-nums;
}

.quote-ref .price-hint {
  margin: 0.5rem 0 0.85rem;
}

.quote-ref-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  color: #166534;
  font-size: 0.875rem;
}

.quote-ref-list li + li {
  margin-top: 0.25rem;
}

.client-form,
.client-form label {
  display: block;
}

.client-form label {
  margin: 0.7rem 0 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.client-form input,
.client-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.45rem 0;
  outline: none;
  resize: vertical;
}

.client-form input:focus,
.client-form textarea:focus {
  border-bottom-color: var(--focus);
}

.client-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.75rem;
}

.client-form .btn {
  margin-top: 1rem;
}

.totals dl {
  margin: 0 0 1.25rem;
}

.totals dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}

.totals .grand {
  margin-top: 0.4rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.totals dt,
.totals dd {
  margin: 0;
}

.totals .order-form {
  margin: 0 0 0.6rem;
}

.totals .btn-block + .btn-block {
  margin-top: 0.6rem;
}

.totals .price-hint {
  margin-top: 0.75rem;
}

.order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.order-item h2,
.order-ref {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.order-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.order-state {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line-strong);
}

.order-state.state-sent,
.order-state.state-sale {
  background: #ecfdf3;
  border-color: #86efac;
  color: #14532d;
}

.order-state.state-cancel {
  color: var(--muted);
}

.order-item-meta,
.order-item-summary {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.order-item-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.order-kicker,
.order-detail h3 {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.order-detail h3 {
  margin: 1.25rem 0 0.6rem;
}

.order-meta {
  margin: 1rem 0 0;
}

.order-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}

.order-meta dt,
.order-meta dd {
  margin: 0;
}

.order-lines {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.order-lines li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.order-lines pre {
  margin: 0 0 0.4rem;
  white-space: pre-wrap;
  font: inherit;
  font-size: 0.9rem;
}

.order-lines p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.article-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: -0.5rem 0 1.5rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
}

.article-bar-label {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-bar-name {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.article-switch select,
.article-model-form .field-select {
  min-height: 40px;
  font: inherit;
}

.article-model-form {
  margin-bottom: 0.25rem;
}

.article-model-form .group {
  margin-bottom: 1rem;
}

.custom-ral {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  align-items: end;
  margin-top: 0.85rem;
}

.custom-ral input[type="color"] {
  width: 3.2rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: transparent;
}

.swatch-custom-mark {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

@media (max-width: 860px) {
  .page {
    width: min(100% - 1.5rem, 1100px);
    padding-top: 1.5rem;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .preview {
    min-height: 360px;
  }

  .preview-stage {
    padding: 2rem 1.7rem 1.3rem;
  }

  .preview.is-showing-measures .preview-stage {
    padding: 2.4rem 2.2rem 1.8rem;
  }

  .plaque-measures .dim-label {
    font-size: 11px;
  }

  .header {
    margin-bottom: 1.5rem;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 88px 1fr;
  }

  .cart-line-total {
    grid-column: 2;
    text-align: left;
  }
}

.pill.is-active span {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line-strong);
}

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

.icon-library {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.35rem 0 0.6rem;
}

.icon-lib-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 4.75rem;
  min-height: 4.75rem;
  padding: 0.4rem 0.3rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.7rem;
  line-height: 1.2;
  cursor: pointer;
}

.icon-lib-btn:hover,
.icon-lib-btn:focus-visible {
  border-color: var(--line-strong);
}

.icon-lib-btn.is-selected {
  border-color: var(--text);
}

.icon-lib-preview {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--text);
}

.icon-lib-preview svg {
  width: 100%;
  height: 100%;
  display: block;
}

.icon-lib-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
  word-break: break-word;
}

.icon-library-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.icon-library-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.icon-library-preview {
  width: 2.4rem;
  height: 2.4rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--text);
}

.icon-library-preview svg {
  width: 100%;
  height: 100%;
  display: block;
}

.icon-library-meta {
  min-width: 0;
  flex: 1;
}

.icon-library-meta strong {
  display: block;
}

.empty-state-compact {
  padding: 1rem 0 1.25rem;
}

.icon-upload-form {
  margin-top: 0.75rem;
}
