/* Pam Story theme — overrides the ported CRM's design tokens.
   Loaded after dashboard.css; the CRM is fully CSS-variable driven, so
   redefining :root re-skins the whole app to match the public website. */
:root {
  --bg:        #fdf3ea;
  --bg-soft:   #f7ecdf;
  --bg-warm:   #f1e3d2;
  --paper:     #fef8f0;
  --surface:   #ffffff;
  --ink:       #2a2350;
  --ink-2:     #4a4470;
  --ink-3:     #837d9e;
  --ink-4:     #a9a3c4;
  --line:      #ece1d3;
  --line-soft: #f3ebde;
  --line-2:    #e0d3c0;

  /* Site accent palette mapped onto the 5 swatch slots */
  --s-gold:    #ffbf5c;  /* yellow */
  --s-teal:    #4f80d9;  /* blue   */
  --s-pink:    #f2789e;  /* pink   */
  --s-purple:  #8b7ad9;  /* purple */
  --s-green:   #b57bb0;  /* mauve  */

  --accent:    var(--s-pink);
  --accent-2:  var(--s-teal);
  --accent-3:  var(--s-purple);
  --accent-4:  var(--s-gold);
  --accent-5:  var(--s-green);

  --f-display: "Fredoka", "Nunito Sans", ui-rounded, system-ui, sans-serif;
  --f-body:    "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 1px 2px rgba(42,35,80,0.05), 0 2px 8px rgba(42,35,80,0.05);
  --shadow-md: 0 6px 24px rgba(42,35,80,0.07), 0 1px 4px rgba(42,35,80,0.05);
  --shadow-lg: 0 18px 48px rgba(42,35,80,0.12), 0 2px 8px rgba(42,35,80,0.06);
}

/* Keep the sidebar wordmark legible on the cream panel */
.sidebar__logo { max-height: 40px; width: auto; object-fit: contain; }

/* ── Brand Catalog editor ───────────────────────────────────── */
.badm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}
.badm-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--t-base) var(--e-out), transform var(--t-base) var(--e-out);
}
.badm-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.badm-card__media {
  aspect-ratio: 16 / 10;
  background: var(--bg-warm) center/cover no-repeat;
  position: relative;
}
.badm-card__logo {
  position: absolute; left: 12px; bottom: 12px;
  max-height: 34px; max-width: 60%;
  background: rgba(255,255,255,0.9); padding: 5px 8px; border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.badm-card__body { padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.badm-card__name { font-family: var(--f-display); font-size: 1.1rem; font-weight: 600; color: var(--ink); }
.badm-card__tag { font-size: 0.82rem; color: var(--ink-3); font-style: italic; }
.badm-card__meta { font-size: 0.74rem; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.15rem; }
.badm-card__actions { display: flex; gap: 0.5rem; margin-top: 0.7rem; }

.badm-uploader { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.badm-preview {
  width: 84px; height: 84px; border-radius: 10px; object-fit: cover;
  background: var(--bg-warm); border: 1px solid var(--line);
}
.badm-photos { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.5rem; }
.badm-photo { position: relative; }
.badm-photo img { width: 74px; height: 74px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.badm-photo__rm {
  position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); color: #fff; border: none; cursor: pointer; font-size: 12px; line-height: 20px;
}
.badm-modal .modal__panel { max-width: 640px; }
.badm-modal .modal__body { max-height: 70vh; overflow-y: auto; }
.badm-hint { font-size: 0.78rem; color: var(--ink-3); }
.badm-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* ── Website Text & Images editor ───────────────────────────── */
.badm-form { display: flex; flex-direction: column; gap: 1.1rem; max-width: 780px; }
.badm-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.badm-section__head { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line-soft); background: var(--bg-soft); }
.badm-section__title { font-family: var(--f-display); font-size: 1.05rem; font-weight: 600; color: var(--ink); margin: 0; }
.badm-section__hint { font-size: 0.82rem; color: var(--ink-3); margin: 0.25rem 0 0; }
.badm-section__body { padding: 1.2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.badm-form .textarea { min-height: 0; }
.badm-savebar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: flex-end; gap: 1rem;
  margin-top: 1.2rem; padding: 0.9rem 0;
  background: linear-gradient(to top, var(--bg) 62%, transparent);
}
.badm-savebar .footer__note { margin-right: auto; }
