/* CreaTekInfo Edit — feuille de style principale */

:root {
  --c-primary:    #2e4051;
  --c-primary-d:  #1f2c3a;
  --c-secondary:  #2d96d3;
  --c-accent:     #81d742;
  --c-bg:         #f4f6f8;
  --c-bg-card:    #ffffff;
  --c-text:       #0b1d2e;
  --c-text-soft:  #5a6b7d;
  --c-border:     #d9dee4;
  --c-danger:     #d14545;
  --c-warning:    #e2a233;
  --c-success:    #2e8b3c;
  --shadow-sm:    0 1px 2px rgba(15,30,50,.06);
  --shadow-md:    0 4px 12px rgba(15,30,50,.10);
  --shadow-lg:    0 12px 32px rgba(15,30,50,.14);
  --radius:       8px;
  --radius-sm:    4px;
  --t-fast:       150ms;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
}

a { color: var(--c-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--c-primary); margin: 0 0 0.5em; font-weight: 900; line-height: 1.25; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

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

/* ============ Layout ============ */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--c-primary);
  color: #fff;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar .brand img {
  height: 36px;
  width: auto;
}
.topbar .brand-name {
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.4px;
}
.topbar .brand-name .accent { color: var(--c-accent); }

.topbar nav {
  display: flex;
  gap: 4px;
}
.topbar nav a {
  color: rgba(255,255,255,0.8);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: background var(--t-fast), color var(--t-fast);
}
.topbar nav a:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.topbar nav a.active { background: var(--c-secondary); color: #fff; }

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}
.user-menu .user-name { color: rgba(255,255,255,0.9); }
.user-menu .role-badge {
  background: var(--c-accent);
  color: var(--c-primary-d);
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
}
.user-menu .role-badge.client { background: var(--c-secondary); color: #fff; }

.main {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============ Boutons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-primary);
  color: #fff;
  border: 0;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  text-decoration: none;
  font-size: 0.92rem;
}
.btn:hover { background: var(--c-primary-d); text-decoration: none; box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--c-secondary); }
.btn-primary:hover { background: #1d7eb6; }

.btn-accent  { background: var(--c-accent); color: var(--c-primary-d); }
.btn-accent:hover { background: #6cc032; }

.btn-danger  { background: var(--c-danger); }
.btn-danger:hover { background: #b53636; }

.btn-ghost {
  background: transparent;
  color: var(--c-primary);
  border: 1px solid var(--c-border);
}
.btn-ghost:hover { background: rgba(45, 150, 211, 0.06); border-color: var(--c-secondary); color: var(--c-secondary); }

.btn-sm { padding: 5px 10px; font-size: 0.82rem; }

/* ============ Cartes ============ */
.card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 20px; }

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

/* ============ Formulaires ============ */
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--c-text);
  font-size: 0.88rem;
}
.field .hint {
  display: block;
  font-size: 0.78rem;
  color: var(--c-text-soft);
  margin-top: 3px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--c-secondary);
  box-shadow: 0 0 0 3px rgba(45,150,211,0.18);
}
textarea { resize: vertical; min-height: 90px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ============ Tables ============ */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table th, .table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}
.table th {
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(45,150,211,0.04); }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn { margin-left: 4px; }

/* ============ Page de login ============ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(45,150,211,0.10), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(129,215,66,0.08), transparent 50%),
    var(--c-primary);
}
.login-card {
  background: #fff;
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
}
.login-card .brand-block {
  text-align: center;
  margin-bottom: 24px;
}
.login-card .brand-block img {
  max-width: 200px;
  height: auto;
  margin-bottom: 8px;
}
.login-card .brand-block .app-name {
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--c-primary);
  letter-spacing: 0.5px;
}
.login-card .brand-block .app-name .accent { color: var(--c-accent); }
.login-card .brand-block .tagline {
  font-size: 0.85rem;
  color: var(--c-text-soft);
  margin-top: 4px;
}
.login-card .btn { width: 100%; justify-content: center; }
.login-card .err {
  background: #fee;
  border-left: 3px solid var(--c-danger);
  color: var(--c-danger);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 0.88rem;
}

/* ============ Modale ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,30,50,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 180ms ease-out;
}
@keyframes modalIn {
  from { transform: translateY(8px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1);     opacity: 1; }
}
.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { margin: 0; }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--c-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.close-btn {
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  color: var(--c-text-soft);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.close-btn:hover { color: var(--c-danger); }

/* ============ Badges/statuts ============ */
.status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.status-draft        { background: #e7eaef; color: var(--c-text-soft); }
.status-in_progress  { background: #fff5e0; color: var(--c-warning); }
.status-validated    { background: #e3f6e6; color: var(--c-success); }

/* ============ Toast ============ */
.toast-zone {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}
.toast {
  background: var(--c-primary-d);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  animation: toastIn 200ms ease-out;
}
.toast.success { background: var(--c-success); }
.toast.error   { background: var(--c-danger); }
@keyframes toastIn {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ============ Empty state ============ */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--c-text-soft);
}
.empty .icon {
  font-size: 3rem;
  margin-bottom: 8px;
  opacity: 0.4;
}

/* ============ Editor (split layout) ============ */
.editor-shell {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  height: calc(100vh - 60px - 48px);
  min-height: 600px;
}
@media (max-width: 960px) {
  .editor-shell { grid-template-columns: 1fr; height: auto; }
}

.editor-sidebar {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.editor-sidebar header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
  background: linear-gradient(180deg, #fff, #f9fafc);
}
.editor-sidebar header h2 { margin: 0; font-size: 1rem; }
.editor-sidebar header .sub { font-size: 0.82rem; color: var(--c-text-soft); margin-top: 2px; }
.editor-sidebar .scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.editor-sidebar footer {
  padding: 12px 16px;
  border-top: 1px solid var(--c-border);
  background: #f7f9fb;
  display: flex;
  gap: 8px;
}
.editor-sidebar footer .btn { flex: 1; justify-content: center; }

.field-group {
  border-bottom: 1px solid var(--c-border);
  padding: 8px 16px;
}
.field-group:last-child { border-bottom: 0; }
.field-group .group-title {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-secondary);
  margin: 6px 0 6px;
}
.field-group .field {
  margin-bottom: 10px;
}
.field-group .field label {
  font-size: 0.78rem;
  color: var(--c-text-soft);
  font-weight: 700;
  text-transform: none;
}
.field-group input { padding: 7px 10px; font-size: 0.92rem; }

.editor-canvas {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  position: relative;
}
.editor-canvas .svg-host {
  background: #fff;
  box-shadow: var(--shadow-md);
  max-width: 100%;
  max-height: 100%;
}
.editor-canvas .svg-host svg {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  width: auto;
}

.editor-canvas .toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 6px;
  display: flex;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

/* highlight de l'élément en cours de focus dans le SVG */
.svg-host [data-cti-edit].active text,
.svg-host text[data-cti-active="1"] {
  filter: drop-shadow(0 0 3px rgba(45,150,211,0.85));
}

/* QR field block */
.qr-block {
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 10px;
}
.qr-block .qr-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.qr-block .qr-preview {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}
.qr-block .qr-preview svg { max-width: 100px; max-height: 100px; }

/* Inline edit cue */
.svg-host text[data-cti-editable] {
  cursor: text;
}

/* Loading */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.muted { color: var(--c-text-soft); }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.between { justify-content: space-between; }
.center { align-items: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-right { text-align: right; }
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 16px;
}
.tabs .tab {
  padding: 10px 16px;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 700;
  color: var(--c-text-soft);
}
.tabs .tab.active {
  color: var(--c-primary);
  border-bottom-color: var(--c-secondary);
}
.tabs .tab:hover { color: var(--c-primary); }

/* Login extras */
.remember-field { margin: 8px 0 14px; }
.check-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--c-text-soft); }
.check-label input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--c-secondary); cursor: pointer; }
.recaptcha-note { font-size: 11px; line-height: 1.4; margin-top: 14px; text-align: center; color: var(--c-text-soft); }
.recaptcha-note a { color: var(--c-secondary); }
/* Cache le badge reCAPTCHA flottant (on garde la mention dans le footer du form, requise par les ToS Google) */
.grecaptcha-badge { visibility: hidden !important; }

/* === Bulk action bar (sticky en bas) === */
.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--c-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  z-index: 100;
  font-size: 14px;
}
.bulk-bar strong { color: var(--c-accent); }
.bulk-bar .btn { padding: 6px 12px; font-size: 13px; }
.bulk-bar .btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); }
.bulk-bar .btn-ghost:hover { background: rgba(255,255,255,.1); }

/* Hide */
.hidden { display: none !important; }

/* ============ Editor V2 — menu structuré ============ */
.editor-v2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 1024px) { .editor-v2 { grid-template-columns: 1fr; } }

.editor-pane { background: var(--c-bg-card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.editor-pane h3 { margin-bottom: 12px; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }

.cat-block {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.cat-block.dragging { opacity: .5; }
.cat-head-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #f9fafb, #f1f4f7);
  border-bottom: 1px solid var(--c-border);
  cursor: move;
}
.cat-head-bar .drag-handle { color: var(--c-text-soft); cursor: grab; user-select: none; font-size: 18px; }
.cat-head-bar .cat-name-input {
  flex: 1; font-weight: 700; font-size: 1rem; border: 0; background: transparent; padding: 4px;
  color: var(--c-primary);
}
.cat-head-bar .cat-name-input:focus { outline: 2px solid var(--c-secondary); outline-offset: 2px; border-radius: 4px; }
.cat-head-bar .cat-actions { display: flex; gap: 4px; }
.cat-items { padding: 8px; }
.item-row {
  display: grid;
  grid-template-columns: 16px 1fr 110px 30px;
  gap: 8px;
  align-items: center;
  padding: 6px 4px;
  border-radius: 6px;
}
.item-row:hover { background: #f5f7fa; }
.item-row.dragging { opacity: .5; }
.item-row .drag-handle { color: var(--c-text-soft); cursor: grab; user-select: none; }
.item-row input { padding: 7px 9px; border: 1px solid var(--c-border); border-radius: 5px; background: #fff; }
.item-row input:focus { outline: none; border-color: var(--c-secondary); }
.item-row .item-name-i { font-weight: 700; }
.item-row .item-price-i { text-align: right; font-weight: 700; color: var(--c-secondary); }
.item-row .item-del { background: transparent; border: 0; color: var(--c-danger); cursor: pointer; font-size: 18px; padding: 0; }
.item-row .item-del:hover { transform: scale(1.2); }

/* === Item Card (nouveau design pro) === */
.item-card {
  display: grid;
  grid-template-columns: 18px 16px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #fff;
  transition: .15s;
  cursor: pointer;
  margin-bottom: 4px;
}
.item-card .item-select { width: 16px; height: 16px; cursor: pointer; accent-color: var(--c-secondary); }
.item-card:hover { border-color: var(--c-border); background: #fbfdff; }
.item-card.dragging { opacity: .5; }
.item-card.is-unavailable { opacity: .55; background: #fafafa; }
.item-card.is-unavailable .item-card-name { text-decoration: line-through; }
.item-card .drag-handle { color: var(--c-text-soft); cursor: grab; user-select: none; font-size: 16px; }
.item-card-body { min-width: 0; }
.item-card-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-card-name { font-weight: 700; font-size: 15px; color: var(--c-text); }
.item-card-badge { display: inline-block; padding: 1px 8px; background: var(--c-accent); color: #fff; border-radius: 99px; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; }
.item-card-status { display: inline-block; padding: 1px 8px; background: #fee; color: #c0392b; border-radius: 99px; font-size: 10px; font-weight: 700; }
.item-card-desc { margin-top: 3px; font-size: 13px; color: var(--c-text-soft); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card-price { font-weight: 800; color: var(--c-secondary); font-size: 15px; white-space: nowrap; min-width: 70px; text-align: right; }
.item-card-actions { display: flex; gap: 2px; opacity: 0; transition: .15s; }
.item-card:hover .item-card-actions { opacity: 1; }
.btn-icon { width: 30px; height: 30px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--c-text-soft); display: inline-flex; align-items: center; justify-content: center; }
.btn-icon:hover { background: #eef3f8; color: var(--c-primary); }
.btn-icon.danger:hover { background: #fee; color: var(--c-danger); }

/* === Indicateur de sauvegarde === */
.save-status {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  background: #e8f8e0;
  color: #2e7d12;
  transition: .2s;
}
.save-status.saving { background: #fff7e6; color: #7a5800; }
.save-status.error { background: #fee; color: #c0392b; }

/* === Form helpers (modal item) === */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-grid-2 { grid-template-columns: 1fr; } }
.form-row textarea.input { font-family: inherit; resize: vertical; min-height: 50px; }
.req { color: var(--c-danger); }
.flex.wrap { flex-wrap: wrap; row-gap: 6px; }
.item-add {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 2px dashed var(--c-border);
  border-radius: 6px;
  color: var(--c-text-soft);
  cursor: pointer;
  font-weight: 700;
  margin-top: 6px;
}
.item-add:hover { border-color: var(--c-secondary); color: var(--c-secondary); }

.preview-frame {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  height: calc(100vh - 200px);
  position: sticky; top: 16px;
}
.preview-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.preview-toolbar {
  display: flex; gap: 6px; align-items: center; padding: 8px 12px;
  background: #f5f7fa; border-bottom: 1px solid var(--c-border);
  font-size: 13px;
}
.preview-toolbar .url { flex: 1; font-family: monospace; color: var(--c-text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Import wizard */
.import-step { background: var(--c-bg-card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.dropzone {
  border: 3px dashed var(--c-border);
  border-radius: var(--radius);
  padding: 50px 20px;
  text-align: center;
  cursor: pointer;
  transition: .2s;
  background: #f9fafb;
}
.dropzone.dragover, .dropzone:hover { border-color: var(--c-secondary); background: #eef7fc; }
.dropzone .icon { font-size: 56px; opacity: .35; margin-bottom: 12px; }
.dropzone strong { color: var(--c-primary); }

.palette-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.swatch { width: 36px; height: 36px; border-radius: 6px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--c-border); cursor: pointer; position: relative; }
.swatch.selected { box-shadow: 0 0 0 3px var(--c-secondary); }
.swatch .label { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--c-text-soft); white-space: nowrap; font-family: monospace; }

/* Page card list */
.page-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  align-items: center;
}
.page-card .meta { color: var(--c-text-soft); font-size: 13px; margin-top: 4px; }
.page-card .meta code { background: #f1f4f7; padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.page-card .actions { display: flex; gap: 6px; }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.status-pill.draft { background: #fff7e6; color: #7a5800; }
.status-pill.published { background: #e8f8e0; color: #2e7d12; }

/* Color picker inline */
.color-pair { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.color-pair label { width: 130px; font-weight: 700; font-size: 13px; }
.color-pair input[type=color] { width: 40px; height: 32px; border: 1px solid var(--c-border); border-radius: 4px; padding: 0; cursor: pointer; }
.color-pair input[type=text] { flex: 1; max-width: 110px; font-family: monospace; }

/* QR result modal */
.qr-result { text-align: center; padding: 20px; }
.qr-result img, .qr-result svg { max-width: 240px; height: auto; margin: 0 auto; }
.qr-result .url { margin-top: 12px; font-family: monospace; background: #f1f4f7; padding: 8px 12px; border-radius: 6px; word-break: break-all; font-size: 13px; }
