/* ============================================================
   Demo Configurator styles — all selectors .dcfg-*
   ============================================================ */
.dcfg-sec { border:1px solid #E5E2D8; border-radius:10px; margin-bottom:10px; overflow:hidden; }
.dcfg-sec-head { width:100%; display:flex; align-items:center; justify-content:space-between; background:#FAF9F5; border:none; padding:12px 14px; font-family:inherit; font-size:14px; font-weight:600; color:#1B1F1A; cursor:pointer; }
.dcfg-sec-head:hover { background:#F4F2EC; }
.dcfg-sec-caret { font-size:18px; color:#6B7065; line-height:1; }
.dcfg-sec-body { padding:14px; border-top:1px solid #E5E2D8; }
.dcfg-overlay {
  position: fixed; inset: 0; z-index: 99000;
  background: rgba(20, 24, 18, 0.5);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  font-family: var(--font-sans, "Inter", sans-serif);
  animation: dcfg-fade 0.18s ease both;
}
@keyframes dcfg-fade { from { opacity: 0; } to { opacity: 1; } }

.dcfg-modal {
  position: relative;
  width: min(940px, 100%);
  max-height: 92vh;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: dcfg-pop 0.2s cubic-bezier(0.2,0.7,0.3,1) both;
}
@keyframes dcfg-pop { from { transform: translateY(10px) scale(0.99); opacity: 0; } to { transform: none; opacity: 1; } }

.dcfg-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #ECEAE2;
}
.dcfg-head-l { display: flex; gap: 13px; align-items: flex-start; }
.dcfg-head-l > .dcfg-ic {
  color: #2D4A1F; background: #EEF2E8;
  border-radius: 10px; padding: 7px; flex-shrink: 0; box-sizing: content-box;
}
.dcfg-title { font-size: 18px; font-weight: 700; color: #1B1F1A; letter-spacing: -0.01em; }
.dcfg-subtitle { font-size: 12.5px; color: #6B7064; margin-top: 2px; max-width: 60ch; line-height: 1.45; }
.dcfg-x {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  color: #6B7064; font-size: 15px; background: transparent;
}
.dcfg-x:hover { background: #F2F1EA; color: #1B1F1A; }

.dcfg-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  overflow: hidden; flex: 1; min-height: 0;
}
.dcfg-controls { padding: 22px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.dcfg-preview-wrap { background: #F6F5EF; border-left: 1px solid #ECEAE2; padding: 24px; display: flex; align-items: center; justify-content: center; }

.dcfg-field { display: flex; flex-direction: column; gap: 7px; }

/* Preset dropdown */
.dcfg-select-wrap { position: relative; }
.dcfg-select {
  width: 100%; font-family: inherit; font-size: 14px; font-weight: 600; color: #1B1F1A;
  border: 1px solid #D9D6CB; border-radius: 9px; padding: 11px 36px 11px 13px; background: #fff;
  outline: none; cursor: pointer; appearance: none; -webkit-appearance: none;
}
.dcfg-select:focus { border-color: #2D4A1F; box-shadow: 0 0 0 3px rgba(45,74,31,0.12); }
.dcfg-select-caret { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #6B7064; pointer-events: none; }

/* URL → auto-brand */
.dcfg-url-field { background: linear-gradient(180deg, #F3F7EE, #FBFCF8); border: 1px solid #DDE6D2; border-radius: 12px; padding: 14px; }
.dcfg-url-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #2D4A1F; background: #E4EEDA; border-radius: 999px; padding: 3px 8px; }
.dcfg-url-row { display: flex; align-items: center; gap: 8px; }
.dcfg-url-ic { display: inline-flex; color: #6B7064; flex-shrink: 0; }
.dcfg-url-input { flex: 1; min-width: 0; font-family: inherit; font-size: 14px; color: #1B1F1A; border: 1px solid #D9D6CB; border-radius: 9px; padding: 10px 12px; background: #fff; outline: none; }
.dcfg-url-input:focus { border-color: #2D4A1F; box-shadow: 0 0 0 3px rgba(45,74,31,0.12); }
.dcfg-url-btn { flex-shrink: 0; font-family: inherit; font-size: 13px; font-weight: 600; color: #fff; background: #2D4A1F; border-radius: 9px; padding: 10px 16px; min-width: 104px; display: inline-flex; align-items: center; justify-content: center; }
.dcfg-url-btn:hover:not(:disabled) { background: #243d18; }
.dcfg-url-btn:disabled { opacity: 0.5; cursor: default; }
.dcfg-url-spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; animation: dcfg-spin 0.8s linear infinite; }
@keyframes dcfg-spin { to { transform: rotate(360deg); } }
.dcfg-url-hint { font-size: 11px; color: #7C8173; margin-top: 8px; line-height: 1.45; }
.dcfg-fetch-ok { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: #2D4A1F; background: #E9F2E1; border-radius: 8px; padding: 8px 10px; margin-top: 9px; line-height: 1.45; }
.dcfg-fetch-ok .dcfg-ic { flex-shrink: 0; margin-top: 1px; }
.dcfg-fetch-err { font-size: 12px; color: #9A3412; background: #FBEDE6; border-radius: 8px; padding: 8px 10px; margin-top: 9px; line-height: 1.45; }

.dcfg-divider { display: flex; align-items: center; gap: 10px; color: #A7AC9C; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.dcfg-divider::before, .dcfg-divider::after { content: ""; flex: 1; height: 1px; background: #E7E5DB; }

/* Brand font row */
.dcfg-font-row { display: flex; align-items: center; gap: 12px; }
.dcfg-font-name { font-size: 17px; font-weight: 600; color: #1B1F1A; }
.dcfg-font-clear { font-family: inherit; font-size: 11.5px; font-weight: 600; color: #6B7064; background: #F2F1EA; border-radius: 999px; padding: 4px 11px; }
.dcfg-font-clear:hover { background: #E7E6DD; color: #1B1F1A; }
.dcfg-flabel { font-size: 12px; font-weight: 700; color: #3A3F36; letter-spacing: 0.01em; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dcfg-fhint { font-size: 11.5px; color: #8A8F82; }

.dcfg-text, .dcfg-hex, .dcfg-textarea {
  font-family: inherit; font-size: 14px; color: #1B1F1A;
  border: 1px solid #D9D6CB; border-radius: 9px; padding: 10px 12px; background: #fff; outline: none;
}
.dcfg-text:focus, .dcfg-hex:focus, .dcfg-textarea:focus { border-color: #2D4A1F; box-shadow: 0 0 0 3px rgba(45,74,31,0.12); }
.dcfg-textarea { min-height: 70px; resize: vertical; line-height: 1.4; word-break: break-all; }

/* Dropzone */
.dcfg-drop {
  position: relative;
  border: 1.5px dashed #CFCCC0; border-radius: 11px;
  min-height: 78px; background: #FAFAF6;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s;
}
.dcfg-drop:hover { border-color: #2D4A1F; background: #F4F5EE; }
.dcfg-drop.is-drag { border-color: #2D4A1F; background: #EEF2E8; }
.dcfg-drop.has-img { background: repeating-conic-gradient(#EFEFEA 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.dcfg-drop-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #8A8F82; font-size: 12px; }
.dcfg-drop-empty .dcfg-ic { color: #A7AC9C; }
.dcfg-drop-img { max-height: 56px; max-width: 80%; object-fit: contain; }
.dcfg-drop-clear {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(27,31,26,0.7); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center;
}
.dcfg-drop-clear:hover { background: rgba(27,31,26,0.9); }

/* Color */
.dcfg-suggest { display: inline-flex; align-items: center; gap: 5px; font-family: inherit; font-size: 11px; font-weight: 600; color: #2D4A1F; background: #EEF2E8; border-radius: 999px; padding: 3px 9px; }
.dcfg-suggest:hover { background: #E2EBD9; }
.dcfg-suggest-sw { width: 11px; height: 11px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); }
.dcfg-color-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dcfg-color-chip { width: 38px; height: 38px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); cursor: pointer; overflow: hidden; flex-shrink: 0; position: relative; }
.dcfg-color-chip input { position: absolute; inset: -6px; width: 200%; height: 200%; border: none; padding: 0; cursor: pointer; opacity: 0; }
.dcfg-hex { width: 92px; text-transform: lowercase; }
.dcfg-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.dcfg-sw { width: 24px; height: 24px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); transition: transform .1s; }
.dcfg-sw:hover { transform: scale(1.12); }
.dcfg-sw.is-on { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12), 0 0 0 2px #fff, 0 0 0 4px #2D4A1F; }

/* Share */
.dcfg-share { display: flex; flex-direction: column; gap: 8px; }
.dcfg-share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dcfg-import-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Buttons */
.dcfg-btn { font-family: inherit; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 9px 16px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: background .14s, color .14s; }
.dcfg-btn .dcfg-ic { width: 15px; height: 15px; }
.dcfg-btn-ghost { background: #F2F1EA; color: #3A3F36; }
.dcfg-btn-ghost:hover { background: #E7E6DD; }
.dcfg-btn-dark { background: #1B1F1A; color: #fff; }
.dcfg-btn-dark:hover { background: #2C322A; }
.dcfg-btn-primary { background: #2D4A1F; color: #fff; padding: 10px 22px; }
.dcfg-btn-primary:hover { background: #243d18; }

.dcfg-foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-top: 1px solid #ECEAE2; background: #FCFBF7; }
.dcfg-foot-r { display: flex; gap: 10px; }

/* Toast */
.dcfg-toast {
  position: absolute; bottom: 76px; left: 50%; transform: translateX(-50%);
  background: #1B1F1A; color: #fff; font-size: 13px; font-weight: 600;
  padding: 9px 18px; border-radius: 999px; box-shadow: 0 8px 24px -8px rgba(0,0,0,0.5);
  animation: dcfg-toast 0.2s ease both;
}
@keyframes dcfg-toast { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Live preview ---------- */
.dcfg-prev {
  width: 100%; max-width: 360px; background: #fff; border-radius: 14px;
  box-shadow: 0 10px 30px -12px rgba(28,32,26,0.22), 0 0 0 1px #ECEAE2;
  overflow: hidden; font-size: 13px;
}
.dcfg-prev-hdr { display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-bottom: 1px solid #EEEDE6; }
.dcfg-prev-logo { height: 24px; width: auto; max-width: 130px; object-fit: contain; }
.dcfg-prev-name { font-family: var(--font-display, Georgia, serif); font-style: italic; font-weight: 600; font-size: 20px; color: var(--p, #2D4A1F); line-height: 1; }
.dcfg-prev-sub { font-size: 11px; color: #6B7064; border-left: 1px solid #DDD; padding-left: 9px; }
.dcfg-prev-care { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--p, #2D4A1F); border: 1.5px solid var(--p, #2D4A1F); border-radius: 999px; padding: 4px 11px; }
.dcfg-prev-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.dcfg-prev-h { font-size: 16px; font-weight: 700; color: #1B1F1A; letter-spacing: -0.01em; line-height: 1.25; }
.dcfg-prev-card { display: flex; align-items: center; gap: 11px; border: 1px solid #E5E2D8; border-radius: 10px; padding: 12px; }
.dcfg-prev-card-ic { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dcfg-prev-card-ic .dcfg-ic { display: block; }
.dcfg-prev-card-t { font-weight: 700; font-size: 13.5px; color: #1B1F1A; }
.dcfg-prev-card-d { font-size: 11.5px; color: #6B7064; margin-top: 1px; }
.dcfg-prev-chip { margin-left: auto; font-size: 10px; font-weight: 700; color: var(--pon, #fff); background: var(--p, #2D4A1F); border-radius: 999px; padding: 3px 9px; }
.dcfg-prev-cta { background: var(--p, #2D4A1F); color: var(--pon, #fff); font-family: inherit; font-weight: 600; font-size: 13.5px; border-radius: 999px; padding: 11px; text-align: center; }
.dcfg-prev-acct { display: flex; align-items: center; gap: 9px; border-top: 1px solid #EEEDE6; padding-top: 12px; font-size: 12.5px; color: #1B1F1A; }
.dcfg-prev-acct-ic { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dcfg-prev-acct-ic .dcfg-ic { display: block; }
.dcfg-prev-link { margin-left: auto; color: #4F83D1; font-weight: 600; }
.dcfg-prev-pharm { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #6B7160; border-top: 1px dashed #EEEDE6; padding-top: 10px; }
.dcfg-prev-pharm strong { color: var(--p, #2D4A1F); font-weight: 700; }
.dcfg-prev-tag { font-size: 10px; color: #9AA08F; text-align: center; padding: 0 16px 12px; letter-spacing: 0.02em; }

@media (max-width: 760px) {
  .dcfg-body { grid-template-columns: 1fr; }
  .dcfg-preview-wrap { border-left: none; border-top: 1px solid #ECEAE2; }
}
