/* =========================================================
   Little Stomp Admin — bright pink + cream aesthetic
   (matches the storefront theme; hot coral primary, cream
   accents, almost-black text on white. Old --gold tokens are
   aliased to pink so existing rules re-skin cleanly.)
   ========================================================= */

:root{
  --bg:        #ffffff;
  --bg-2:      #FAF7F2;          /* subtle warm cream for sidebar */
  --panel:     #ffffff;
  --panel-2:   #FDF1F4;
  --ink:       #1a1a1a;          /* almost-black */
  --ink-mute:  #5a5a66;
  --ink-dim:   #9b9ba8;
  --line:      #ECE3D0;
  --line-2:    #d4c8b8;
  /* Pink accent ladder. Legacy --gold* aliases retained so all
     existing var(--gold) references re-skin cleanly. */
  --accent:      #E85A6F;
  --accent-deep: #C8324A;
  --accent-soft: #F4ECD8;
  --accent-glow: #FDF1F4;
  --accent-grey: #B7B5C0;
  --gold:      #E85A6F;          /* legacy alias → pink */
  --gold-2:    #C8324A;          /* legacy alias → deep pink */
  --gold-deep: #8B1A2E;          /* legacy alias → darkest pink */
  --ok:        #4a8a6a;
  --warn:      #c97a5a;
  --bad:       #c14a55;
  --info:      #5a7ab0;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --ease: cubic-bezier(.2,.7,.2,1);
  --shadow-sm: 0 1px 2px rgba(26,26,26,.05);
  --shadow-md: 0 10px 30px -10px rgba(232,90,111,.18);
}

*,*::before,*::after{ box-sizing:border-box; }
html,body{ margin:0; height:100%; }
body{
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-columns: 260px 1fr;
}
a{ color: inherit; text-decoration: none; }
button{ font: inherit; color: inherit; background:none; border:0; cursor:pointer; }
h1,h2,h3,h4{ font-family:'Quicksand', 'Inter', system-ui, sans-serif; font-weight: 700; margin: 0; letter-spacing:.2px; }
h1{ font-size: 1.9rem; color: var(--gold-2); }
h3{ font-size: 1.05rem; color: var(--ink); }
table{ border-collapse: collapse; width:100%; }

/* =========================================================
   SIDEBAR
   ========================================================= */
.side{
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
  display:flex; flex-direction:column;
}
.side-brand{
  display:grid; grid-template-columns: 44px 1fr;
  gap: 12px; align-items:center;
  padding: 10px 10px 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.side-brand .mark{
  width: 44px; height: 44px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--line);
}
.side-brand .mark svg{
  width: 100%; height: 100%;
  display: block;
}
.side-brand .b-name{ display:block; font-family:'Pacifico', cursive; font-weight:400; color: var(--gold-2); font-size: 1.15rem; line-height: 1; }
.side-brand .b-sub{ display:block; font-size:.62rem; letter-spacing:.35em; text-transform:uppercase; color: var(--ink-dim); margin-top: 5px; }

.side-nav{ display:flex; flex-direction:column; gap: 2px; flex:1; }
.s-link{
  display:flex; align-items:center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--ink-mute);
  font-size:.9rem;
  transition: background .2s var(--ease), color .2s var(--ease);
  cursor: pointer;
}
.s-link svg{ color: var(--ink-dim); flex:none; }
.s-link:hover{ background: var(--panel); color: var(--ink); }
.s-link.is-active{
  background: linear-gradient(180deg, rgba(232,90,111,.20), rgba(232,90,111,.06));
  color: var(--gold-2);
  box-shadow: inset 2px 0 0 var(--gold-2);
}
.s-link.is-active svg{ color: var(--gold); }
.s-link.ghost{ color: var(--ink-dim); }

.side-foot{
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display:flex; flex-direction:column; gap: 8px;
}
.side-user{
  display:grid; grid-template-columns: 38px 1fr;
  gap: 10px; align-items:center;
  padding: 8px 10px;
}
.avatar{
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gold); color: var(--ink);
  display:grid; place-items:center;
  font-weight: 600; font-size:.82rem;
  letter-spacing:.5px;
}
.side-user strong{ display:block; color: var(--ink); font-size:.9rem; line-height: 1; }
.side-user span{ display:block; color: var(--ink-dim); font-size:.75rem; margin-top: 3px; }

/* =========================================================
   MAIN
   ========================================================= */
.main{ min-width: 0; padding: 0 0 60px; }

/* topbar */
.topbar{
  position: sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumbs{ font-size:.82rem; color: var(--ink-dim); letter-spacing:.1em; text-transform: uppercase; }
.crumbs .sep{ margin: 0 8px; color: var(--line-2); }
.crumbs #crumb{ color: var(--gold-2); }
.tb-right{ display:flex; align-items:center; gap: 10px; }
.search{
  display:flex; align-items:center; gap: 8px;
  background: var(--panel); border:1px solid var(--line);
  padding: 8px 12px; border-radius: var(--r-sm);
  min-width: 320px;
  color: var(--ink-mute);
}
.search input{
  background: transparent; border: 0; color: var(--ink);
  font: 400 .88rem/1.2 'Inter', sans-serif;
  width: 100%; outline: none;
}
.search kbd{
  font-family: ui-monospace, monospace;
  font-size:.7rem; padding: 2px 6px;
  background: var(--bg); color: var(--ink-dim);
  border-radius: 4px; border: 1px solid var(--line-2);
}
.tb-btn{
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: var(--panel); border: 1px solid var(--line);
  color: var(--ink-mute); display:grid; place-items:center;
  position: relative;
}
.tb-btn:hover{ color: var(--gold-2); border-color: var(--gold-deep); }
.tb-btn .dot{
  position:absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bad);
}

/* =========================================================
   VIEWS
   ========================================================= */
.view{ display: none; padding: 28px 28px 60px; }
.view.is-active{ display: block; }

.v-head{
  display:flex; justify-content: space-between; align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}
.v-head h1{ margin-bottom: 4px; }
.v-head p{ color: var(--ink-mute); margin: 0; font-size:.95rem; }
.v-head-actions{ display:flex; gap: 10px; flex-wrap:wrap; }

/* buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap: 6px;
  padding: 9px 16px; border-radius: var(--r-sm);
  font-size:.82rem; font-weight: 500;
  transition: all .2s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn-gold{
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--ink);
  box-shadow: 0 4px 14px -6px rgba(200,50,74,.55), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-gold:hover{ transform: translateY(-1px); }
.btn-ghost{
  background: var(--panel);
  border: 1px solid var(--line-2);
  color: var(--ink);
}
.btn-ghost:hover{ border-color: var(--gold-deep); color: var(--gold-2); }
.btn-block{ width: 100%; }

/* =========================================================
   IMAGE BUILDER QUICK-LAUNCH (dashboard hero tile)
   ========================================================= */
.ib-launcher{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #FAF7F2 100%);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  outline: none;
}
.ib-launcher:hover,
.ib-launcher:focus{
  transform: translateY(-2px);
  box-shadow: 0 12px 36px -12px rgba(232,90,111,.30);
  border-color: var(--gold-2);
}
.ib-launcher-icon{
  width: 64px; height: 64px;
  display: grid; place-items: center;
  background: rgba(232,90,111,.06);
  border: 1px solid rgba(232,90,111,.20);
  border-radius: 12px;
  color: var(--gold-2);
  flex-shrink: 0;
}
.ib-launcher-body{ min-width: 0; }
.ib-launcher-eyebrow{
  display: block;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--gold-2);
  font-weight: 600;
  margin-bottom: 6px;
}
.ib-launcher-title{
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.ib-launcher-text{
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(26,26,26,.72);
  max-width: 580px;
}
.ib-launcher-cta{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--gold);
  color: var(--ink);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.ib-launcher:hover .ib-launcher-cta,
.ib-launcher:focus .ib-launcher-cta{ background: var(--gold-2); }
@media (max-width: 880px){
  .ib-launcher{
    grid-template-columns: 1fr;
    text-align: center;
    padding: 24px 20px;
  }
  .ib-launcher-icon{ margin: 0 auto; }
  .ib-launcher-cta{ justify-self: center; }
  .ib-launcher-text{ max-width: none; }
}

/* =========================================================
   KPIs
   ========================================================= */
.kpis{
  display:grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.kpi{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.kpi::before{
  content:""; position:absolute; inset: 0 0 auto 0; height:2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity:.6;
}
.kpi-label{
  font-size:.72rem; letter-spacing:.22em; text-transform:uppercase;
  color: var(--ink-dim);
}
.kpi-value{
  display: block;
  font-family:'Quicksand', sans-serif;
  font-size: 2rem;
  color: var(--gold-2);
  margin: 8px 0 4px;
  font-weight: 600;
  line-height: 1;
}
.kpi-delta{ font-size:.78rem; color: var(--ink-mute); }
.kpi-delta.up{ color: var(--ok); }
.kpi-delta.warn{ color: var(--warn); }
.kpi-delta.down{ color: var(--bad); }

/* =========================================================
   DASHBOARD GRID / CARDS
   ========================================================= */
.dash-grid{
  display:grid; grid-template-columns: 2fr 1fr; gap: 16px;
}
.card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card-lg{ grid-column: span 1; }
.card-wide{ grid-column: 1 / -1; }
.card-flush{ padding: 0; overflow: hidden; }
.card-head{
  display:flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}
.card-head h3{ color: var(--gold-2); }
.card-note{ margin: -8px 0 12px; color: var(--ink-dim); font-size:.82rem; }

.badge{
  font-size:.68rem; letter-spacing:.2em; text-transform:uppercase;
  color: var(--ok);
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--ok);
  background: rgba(122,176,152,.08);
}
.chip-row{ display:flex; gap: 4px; }
.chip{
  padding: 5px 10px; font-size:.72rem; letter-spacing:.1em;
  border-radius: var(--r-sm); color: var(--ink-dim);
  background: var(--bg);
}
.chip.is-active{ background: var(--panel-2); color: var(--gold-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.link{ color: var(--gold); font-size:.82rem; cursor:pointer; }
.link:hover{ color: var(--gold-2); }

/* chart (pure CSS) */
.chart{
  height: 220px;
  position: relative;
  margin-top: 6px;
}
.chart-tall{ height: 280px; }
.chart svg{ width: 100%; height: 100%; display:block; }

/* top sellers */
.top-list{ list-style:none; padding:0; margin: 0; display:flex; flex-direction:column; gap: 2px; }
.top-list li{ display:grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items:center; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size:.9rem; }
.top-list li:last-child{ border-bottom: 0; }
.sw{ width: 10px; height: 10px; border-radius: 3px; background: var(--gold); }
.sw-1{ background: var(--accent-red, var(--bad)); }
.sw-2{ background: var(--warn); }
.sw-3{ background: var(--gold); }
.sw-4{ background: var(--info); }
.sw-5{ background: var(--ok); }
.t-name{ color: var(--ink); }
.t-val{ color: var(--ink-mute); font-size:.82rem; }

/* =========================================================
   TABLES
   ========================================================= */
.t{ font-size:.88rem; }
.t thead th{
  text-align:left;
  font-size:.7rem; letter-spacing:.18em; text-transform:uppercase;
  color: var(--ink-dim); font-weight: 500;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.t tbody td{
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
.t tbody tr:last-child td{ border-bottom: 0; }
.t tbody tr:hover{ background: rgba(232,90,111,.02); }

.t-grid input[type="checkbox"]{ accent-color: var(--gold); }

.cell-product{ display:grid; grid-template-columns: 44px 1fr; gap: 12px; align-items:center; }
.cell-thumb{
  width: 44px; height: 44px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: linear-gradient(160deg, #fafafa, #ffffff);
  font-family: 'Quicksand', sans-serif;
  color: var(--ink); font-size: 1rem;
  display:grid; place-items:center;
}
.cell-sub{ display:block; color: var(--ink-dim); font-size:.78rem; margin-top:2px; }

.status{
  display:inline-flex; align-items:center; gap:6px;
  padding: 3px 10px; border-radius: 999px;
  font-size:.7rem; letter-spacing:.15em; text-transform:uppercase;
  border: 1px solid transparent;
}
.status::before{ content:""; width: 6px; height: 6px; border-radius: 50%; }
.status.ok{ color: var(--ok); border-color: rgba(122,176,152,.35); background: rgba(122,176,152,.08); }
.status.ok::before{ background: var(--ok); }
.status.warn{ color: var(--warn); border-color: rgba(216,163,58,.35); background: rgba(216,163,58,.08); }
.status.warn::before{ background: var(--warn); }
.status.bad{ color: var(--bad); border-color: rgba(193,74,53,.35); background: rgba(193,74,53,.08); }
.status.bad::before{ background: var(--bad); }
.status.info{ color: var(--info); border-color: rgba(74,144,198,.35); background: rgba(74,144,198,.08); }
.status.info::before{ background: var(--info); }
.status.muted{ color: var(--ink-dim); border-color: var(--line-2); background: var(--bg); }
.status.muted::before{ background: var(--ink-dim); }

.stock-bar{
  width: 90px; height: 6px; border-radius: 3px;
  background: var(--bg); overflow:hidden;
  margin-top: 4px;
}
.stock-bar > span{ display:block; height:100%; background: var(--gold); }
.stock-bar.low > span{ background: var(--warn); }
.stock-bar.out > span{ background: var(--bad); width: 100% !important; opacity:.35; }

.row-act{ display:flex; gap: 4px; justify-content: flex-end; }
.iact{
  width: 28px; height: 28px; border-radius: var(--r-sm);
  display:grid; place-items:center;
  color: var(--ink-dim);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.iact:hover{ color: var(--gold-2); background: var(--bg); }

/* =========================================================
   FILTER BAR
   ========================================================= */
.filter-bar{
  display:flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; gap: 16px; flex-wrap: wrap;
}
.tabs{ display:flex; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px; gap: 2px; }
.tab{
  padding: 7px 14px; border-radius: 4px;
  font-size:.82rem; color: var(--ink-mute);
}
.tab em{
  font-style: normal; color: var(--ink-dim);
  margin-left: 6px; font-size:.72rem;
  padding: 1px 6px; border-radius: 999px; background: var(--bg);
}
.tab:hover{ color: var(--ink); }
.tab.is-active{ background: var(--panel-2); color: var(--gold-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.filter-right{ display:flex; gap: 8px; }
.sel, .inp{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink);
  padding: 8px 12px;
  font: 400 .88rem/1.2 'Inter', sans-serif;
  min-width: 200px;
}
.inp:focus, .sel:focus{
  outline:none; border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(232,90,111,.06);
}

/* =========================================================
   KANBAN (custom orders)
   ========================================================= */
.kanban{
  display:grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.kcol{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
  min-height: 400px;
}
.kcol-head{
  display:flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.kcol-head strong{ color: var(--gold-2); font-family:'Quicksand', sans-serif; font-size: 1.05rem; }
.kcol-head span{
  font-size:.72rem; color: var(--ink-dim);
  padding: 2px 8px; border-radius: 999px; background: var(--bg);
}
.kcard{
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px;
  margin-bottom: 10px;
  cursor: grab;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.kcard:hover{ transform: translateY(-2px); border-color: var(--gold-deep); }
.kcard-name{ color: var(--gold-2); font-family:'Quicksand', sans-serif; font-size: 1.05rem; line-height: 1.2; }
.kcard-sub{ color: var(--ink-mute); font-size:.82rem; margin: 4px 0 10px; }
.kcard-row{ display:flex; justify-content: space-between; align-items:center; font-size:.78rem; color: var(--ink-dim); }
.kcard-tag{ padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--ink-mute); font-size:.7rem; letter-spacing:.15em; text-transform:uppercase; }

/* =========================================================
   REVENUE bars
   ========================================================= */
.bar-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap: 14px; }
.bar-list li{ }
.bar-row{ display:flex; justify-content:space-between; font-size:.85rem; margin-bottom: 6px; }
.bar-row span{ color: var(--ink-mute); }
.bar-row strong{ color: var(--ink); font-weight: 600; }
.bar-track{ height: 8px; background: var(--bg); border-radius: 4px; overflow:hidden; }
.bar-fill{ height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }

/* =========================================================
   HOMEPAGE EDITOR
   ========================================================= */
.editor-grid{
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.form{ display:flex; flex-direction:column; gap: 14px; }
.form label{ display:flex; flex-direction:column; gap: 6px; font-size:.72rem; letter-spacing:.18em; text-transform:uppercase; color: var(--ink-mute); }
.form .inp, .form input, .form textarea, .form select{
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--ink);
  padding: 10px 12px;
  font: 400 .9rem/1.4 'Inter', sans-serif;
  text-transform: none; letter-spacing: 0;
}
.form textarea{ resize: vertical; min-height: 70px; }
.row-2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-drop{
  padding: 20px 14px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-md);
  text-align:center; color: var(--ink-mute);
  font-size:.88rem;
}
.mini-drop em{ color: var(--gold-2); font-style:normal; text-decoration: underline; cursor: pointer; }
.drop-mini span{ margin-bottom: 6px; }

.sortable{ list-style:none; padding:0; margin: 0 0 14px; display:flex; flex-direction:column; gap: 8px; }
.sortable li{
  display:grid; grid-template-columns: 22px 36px 1fr auto;
  align-items:center; gap: 12px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: grab;
}
.sortable li:hover{ border-color: var(--gold-deep); }
.sort-handle{ color: var(--ink-dim); cursor: grab; }
.sort-thumb{ width: 36px; height: 36px; border-radius: 4px; border:1px solid var(--line-2); font-family:'Quicksand', sans-serif; display:grid; place-items:center; }
.sort-name{ font-size:.9rem; color: var(--ink); }
.sort-sub{ display:block; color: var(--ink-dim); font-size:.75rem; margin-top: 2px; }
.sort-rm{ color: var(--ink-dim); font-size: 1.1rem; padding: 6px 10px; }
.sort-rm:hover{ color: var(--bad); }

.stripe-row{
  display:flex; align-items:center; gap: 10px;
  padding: 12px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size:.88rem; color: var(--ink);
  text-transform:none; letter-spacing:0;
}
.stripe-dot{ width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* =========================================================
   TOAST
   ========================================================= */
.toast{
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 60px);
  background: var(--gold); color: var(--ink);
  padding: 11px 22px; border-radius: 999px;
  font-size:.85rem; font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0; transition: transform .3s var(--ease), opacity .3s var(--ease);
  pointer-events: none;
  z-index: 70;
}
.toast.show{ opacity:1; transform: translate(-50%, 0); }

/* swatch colors for top list */
.top-list .sw-1{ background: #c14a55; }
.top-list .sw-2{ background: #F4ECD8; }
.top-list .sw-3{ background: #C8324A; }
.top-list .sw-4{ background: #5a7ab0; }
.top-list .sw-5{ background: #7ab098; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1200px){
  .dash-grid{ grid-template-columns: 1fr; }
  .kpis{ grid-template-columns: repeat(2, 1fr); }
  .editor-grid{ grid-template-columns: 1fr; }
  .kanban{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px){
  body{ grid-template-columns: 1fr; }
  .side{ position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .side-brand, .side-foot{ width: 100%; border: 0; padding: 8px; margin: 0; }
  .side-nav{ flex-direction: row; overflow-x: auto; gap: 4px; width: 100%; }
  .s-link{ white-space: nowrap; }
  .kpis{ grid-template-columns: 1fr 1fr; }
  .kanban{ grid-template-columns: 1fr; }
  .search{ min-width: 0; width: 100%; }
  .topbar{ flex-direction: column; gap: 10px; align-items: stretch; }
  .view{ padding: 20px 16px; }
}

/* =========================================================
   HELP DRAWER + HELP CONTROLS
   ========================================================= */
.tb-help{
  /* Override .tb-btn's fixed 36px width so the "Help" label has room to breathe */
  width: auto !important;
  height: auto !important;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .9rem;
  background: rgba(200, 50, 74, .14);
  border: 1px solid rgba(200, 50, 74, .35);
  border-radius: 999px;
  color: #8B1A2E;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .04em;
  cursor: pointer;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease, transform .2s ease;
}
.tb-help:hover{
  background: rgba(200, 50, 74, .25);
  color: #ffffff;
  transform: translateY(-1px);
}
.tb-help-label{ font-family: inherit; }
@media (max-width: 720px){
  .tb-help-label{ display: none; }
  .tb-help{ padding: .5rem; }
}

[data-help-toggle]{
  width: 100%;
  text-align: left;
  cursor: pointer;
}

/* Drawer */
.help-scrim{
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .25);
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.help-scrim.is-open{ opacity: 1; pointer-events: auto; }

.help-drawer{
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 92vw);
  z-index: 210;
  background: #FDF1F4;
  border-left: 1px solid rgba(200, 50, 74, .45);
  box-shadow: -20px 0 60px -10px rgba(0, 0, 0, .35);
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
  display: flex;
  flex-direction: column;
}
.help-drawer.is-open{ transform: translateX(0); }
.help-drawer[aria-hidden="true"]{ visibility: hidden; }
.help-drawer.is-open[aria-hidden="false"]{ visibility: visible; }

.help-drawer-head{
  padding: 1.4rem 1.5rem 1.2rem;
  border-bottom: 1px solid rgba(232, 90, 111, .2);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(180deg, #FDF1F4 0%, #fafafa 100%);
}
.help-drawer-eyebrow{
  display: block;
  font-family: inherit;
  font-size: .68rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #8B1A2E;
  margin-bottom: .35rem;
  font-weight: 600;
}
.help-drawer-head h2{
  font-family: 'Quicksand', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  line-height: 1.15;
}
.help-drawer-close{
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(232, 90, 111, .35);
  color: #ffffff;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
  flex-shrink: 0;
}
.help-drawer-close:hover{
  background: rgba(200, 50, 74, .2);
  transform: rotate(90deg);
}

.help-drawer-body{
  flex: 1;
  overflow-y: auto;
  padding: 1.4rem 1.5rem;
}
.help-section{
  padding: 1rem 0;
  border-bottom: 1px solid rgba(232, 90, 111, .15);
}
.help-section:last-child{ border-bottom: 0; }
.help-section h3{
  font-family: 'Quicksand', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 .5rem;
}
.help-section p{
  font-family: inherit;
  font-size: .92rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 .5rem;
}
.help-section p:last-child{ margin-bottom: 0; }
.help-section .help-step{
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: .55rem 0;
}
.help-section .help-step-num{
  flex: 0 0 auto;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  background: #C8324A;
  color: #ffffff;
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
  font-family: inherit;
}
.help-section .help-step-text{
  font-size: .9rem;
  line-height: 1.55;
  color: var(--ink);
  flex: 1;
}

.help-drawer-foot{
  padding: 1.2rem 1.5rem 1.4rem;
  border-top: 1px solid rgba(232, 90, 111, .25);
  background: #fafafa;
}
.help-drawer-foot p{
  font-size: .88rem;
  color: var(--ink);
  margin: 0 0 .8rem;
}
.help-cta-row{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .8rem;
}
.help-cta{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .9rem;
  background: #ffffff;
  color: var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: background .25s ease, transform .2s ease;
}
.help-cta:hover{
  background: var(--ink);
  color: #fff;
  transform: translateY(-1px);
}
.help-drawer-tip{
  font-size: .78rem;
  color: #a05c8a;
  margin: 0;
  font-style: italic;
}
.help-drawer-tip kbd{
  background: #fff;
  border: 1px solid rgba(232, 90, 111, .4);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: inherit;
  font-size: .75rem;
  color: #ffffff;
}

/* =========================================================
   TOPBAR BRAND MARK — small wood plaque next to crumbs,
   click to view storefront
   ========================================================= */
.tb-brand-mark{
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  margin-right: 6px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(200, 50, 74, .35),
    0 2px 6px rgba(0, 0, 0, .35);
  transition: transform .2s ease, box-shadow .2s ease;
  text-decoration: none;
  flex: 0 0 auto;
}
.tb-brand-mark:hover{
  transform: scale(1.08) rotate(-3deg);
  box-shadow:
    0 0 0 1px rgba(200, 50, 74, .65),
    0 4px 12px rgba(0, 0, 0, .45);
}
.tb-brand-mark svg{ width: 100%; height: 100%; display: block; }

.crumbs{ display: inline-flex; align-items: center; gap: 8px; }

/* =========================================================
   IMAGE BUILDER — three-step large-button studio for Max
   ========================================================= */
.s-link-pill{
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  background: #C8324A;
  color: #ffffff;
  font-size: .58rem;
  letter-spacing: .12em;
  font-weight: 700;
  border-radius: 999px;
  vertical-align: 1px;
}

.ib-card{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 18px;
  align-items: flex-start;
}
.ib-card-action{ background: linear-gradient(135deg, var(--panel) 0%, rgba(232,90,111,.04) 100%); }
.ib-fill{ width: 100%; }
.ib-step-num{
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--ink);
  border-radius: 50%;
  font-family: 'Pacifico', cursive;
  font-size: 1.2rem;
  font-weight: 700;
  flex: 0 0 auto;
}
.ib-card h3{
  font-family: 'Quicksand', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--ink);
}

/* Step 1 — template buttons */
.ib-templates{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.ib-tpl{
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 12px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}
.ib-tpl:hover{
  border-color: rgba(200, 50, 74, .55);
  background: rgba(200, 50, 74, .06);
  transform: translateY(-2px);
}
.ib-tpl.is-active{
  border-color: #C8324A;
  background: rgba(200, 50, 74, .14);
  box-shadow: 0 4px 12px rgba(200, 50, 74, .25);
}
.ib-tpl-emoji{
  font-size: 2rem;
  line-height: 1;
}
.ib-tpl strong{
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  color: var(--ink);
}
.ib-tpl small{
  font-size: .68rem;
  color: rgba(0, 0, 0, .55);
  letter-spacing: .04em;
}

/* Step 2 — large input
   NOTE: admin's --ink is cream (dark theme), but this input has a
   white background — explicit dark text/placeholder colours so it's
   actually readable. */
.ib-input{
  width: 100%;
  padding: 18px 22px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.25rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  color: #ffffff !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ib-input::placeholder{
  color: rgba(0, 0, 0, .42);
  font-style: italic;
}
.ib-input:focus{
  outline: 0;
  border-color: #C8324A;
  box-shadow: 0 0 0 4px rgba(200, 50, 74, .2);
}
.ib-suggestions{
  margin-top: 14px;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.ib-suggestions-label{
  font-size: .72rem; letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.ib-suggestions-chips{
  display: inline-flex; gap: 6px; flex-wrap: wrap;
}
.ib-chip{
  background: rgba(200, 50, 74, .12);
  border: 1px solid rgba(200, 50, 74, .35);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: inherit;
  font-size: .82rem;
  color: #8B1A2E;
  cursor: pointer;
  transition: background .15s ease;
}
.ib-chip:hover{
  background: rgba(200, 50, 74, .25);
  color: #ffffff;
}

/* Step 3 — big generate button */
.ib-go{
  font-size: 1rem !important;
  padding: 18px 28px !important;
  letter-spacing: .15em;
}
.ib-go:disabled{
  opacity: .55;
  cursor: not-allowed;
}
.ib-help-text{
  margin: 10px 0 0;
  font-size: .82rem;
  color: var(--ink-mute);
  text-align: center;
  font-style: italic;
}

/* Progress */
.ib-progress{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 32px;
  margin-bottom: 18px;
  text-align: center;
}
.ib-progress-text{
  font-family: 'Quicksand', sans-serif;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 14px;
}
.ib-progress-bar{
  width: 100%; height: 8px;
  background: rgba(0, 0, 0, .08);
  border-radius: 999px;
  overflow: hidden;
}
.ib-progress-fill{
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #5a7ab0, #C8324A);
  transition: width .6s ease;
}

/* Results */
.ib-results{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 18px;
}
.ib-results-title{
  font-family: 'Quicksand', sans-serif;
  font-size: 1.6rem; font-weight: 600;
  color: #ffffff;
  margin: 0 0 20px;
  text-align: center;
}
.ib-results-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
@media (min-width: 1100px){
  .ib-results-grid{ grid-template-columns: repeat(4, 1fr); }
}
.ib-result{
  display: flex; flex-direction: column;
  background: #FAF7F2;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ib-result:hover{
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -8px rgba(0,0,0,.18);
}
.ib-result-img{
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(45deg, rgba(0,0,0,.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0,0,0,.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0,0,0,.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0,0,0,.08) 75%) #FAF7F2;
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  display: grid; place-items: center;
  position: relative;
}
.ib-result-img img{
  max-width: 90%; max-height: 90%;
  object-fit: contain;
}
.ib-result-actions{
  padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.ib-result-actions .btn{
  font-size: .72rem !important;
  padding: 8px 12px !important;
  letter-spacing: .12em;
}
.ib-results-actions{
  display: flex; justify-content: center; gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

/* History */
.ib-history{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 32px;
  margin-top: 18px;
}
.ib-history-head{
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.ib-history-head h3{
  font-family: 'Quicksand', sans-serif;
  font-size: 1.25rem; font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.ib-history-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.ib-history-thumb{
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #FAF7F2;
  border: 1px solid var(--line);
}
.ib-history-thumb img{
  width: 100%; height: 100%;
  object-fit: contain; padding: 6px;
}
.ib-history-prompt{
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 4px 6px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .85));
  color: var(--ink);
  font-size: .6rem;
  letter-spacing: .04em;
  text-align: center;
}

@media (max-width: 720px){
  .ib-card{ grid-template-columns: 44px 1fr; gap: 14px; padding: 18px 20px; }
  .ib-step-num{ width: 36px; height: 36px; font-size: 1rem; }
  .ib-templates{ grid-template-columns: repeat(2, 1fr); }
  .ib-input{ font-size: 1.05rem; padding: 14px 16px; }
}

/* =========================================================
   ADMIN ACTION MODAL — used by Import / Export / + New …
   ========================================================= */
.admin-modal{
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 24px 24px;
  background: rgba(10, 7, 4, .72);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
          backdrop-filter: blur(10px) saturate(140%);
  opacity: 0; pointer-events: none;
  overflow-y: auto;
  transition: opacity .22s ease;
}
.admin-modal.is-open{ opacity: 1; pointer-events: auto; }
.admin-modal-card{
  width: min(560px, 100%);
  background: #ffffff;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,.18);
  position: relative;
  color: var(--ink);
  transform: translateY(-12px) scale(.98);
  transition: transform .25s ease;
}
.admin-modal.is-open .admin-modal-card{ transform: translateY(0) scale(1); }
.admin-modal-close{
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  background: transparent; border: 0; cursor: pointer;
  font-size: 1.5rem; line-height: 1;
  color: rgba(252, 248, 255, .6);
  border-radius: 50%;
  transition: background .15s ease, color .15s ease;
}
.admin-modal-close:hover{ background: rgba(252, 248, 255, .08); color: var(--ink); }
.admin-modal-card h2{
  font-family: 'Quicksand', sans-serif;
  font-size: 1.5rem; font-weight: 600;
  margin: 0 0 6px; color: var(--ink);
}
.admin-modal-card > p{
  font-family: 'Quicksand', sans-serif;
  color: rgba(252, 248, 255, .65);
  margin: 0 0 22px;
  font-size: .98rem;
}
.admin-modal-card .form{
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 22px;
}
.admin-modal-card .form label{
  display: flex; flex-direction: column; gap: 6px;
}
.admin-modal-card .form label > span{
  font-size: .65rem; letter-spacing: .2em;
  text-transform: uppercase; font-weight: 600;
  color: rgba(200, 50, 74, .85);
}
.admin-modal-card .inp{
  padding: 10px 14px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(200, 50, 74, .25);
  border-radius: 8px;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
  transition: border-color .15s ease;
}
.admin-modal-card .inp:focus{
  outline: 0;
  border-color: rgba(200, 50, 74, .65);
}
.admin-modal-card .mini-drop{
  padding: 14px;
  background: rgba(0, 0, 0, .35);
  border: 1px dashed rgba(200, 50, 74, .35);
  border-radius: 8px;
  text-align: center;
  font-size: .82rem;
  color: rgba(252, 248, 255, .55);
  cursor: pointer;
}
.admin-modal-actions{
  display: flex; gap: 10px; justify-content: flex-end;
}
.admin-modal-actions .btn{ flex: 0 0 auto; }

/* ===== SOCIAL STUDIO (iframe view) — themed to match Jenni-Anne ===== */
.view.view-fill {
  display: none;
  flex-direction: column;
  min-height: calc(100vh - 60px);
  padding: 0;
  gap: 0;
  background:
    radial-gradient(ellipse 60% 60% at 15% 10%, rgba(232,90,111,.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 90% 90%, rgba(184,227,214,.18) 0%, transparent 60%),
    var(--paper, #FFFFFF);
}
.view.view-fill.is-active { display: flex; }

.view.view-fill .v-head {
  flex: 0 0 auto;
  padding: 24px 32px 14px;
  border-bottom: 1px dashed #d4c8b8;
  background: transparent;
}
.v-head-tight { padding-bottom: 14px !important; }
.v-head-tight h1 {
  margin: 0 0 4px;
  font-family: 'Pacifico', cursive;
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: 0;
  color: var(--ink, #1a1a1a);
}
.v-head-tight p {
  margin: 0;
  font-size: .9rem;
  color: var(--ink-soft, #5a5a66);
  max-width: 680px;
  line-height: 1.55;
}
.v-head-tight .v-head-actions { gap: 8px; flex: 0 0 auto; flex-wrap: wrap; }
.v-head-tight .v-head-actions .btn,
.v-head-tight .v-head-actions a.btn {
  font-size: .72rem;
  letter-spacing: .04em;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #ECE3D0;
  background: #fff;
  color: var(--ink, #1a1a1a);
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}
.v-head-tight .v-head-actions .btn:hover,
.v-head-tight .v-head-actions a.btn:hover {
  background: #E85A6F;
  border-color: #E85A6F;
  color: #fff;
}
.v-head-tight .v-head-actions .btn:active { transform: translateY(1px); }

.social-frame-wrap {
  flex: 1 1 auto;
  display: block;
  position: relative;
  min-height: 600px;
  padding: 18px 24px 24px;
}
.social-frame-wrap::before {
  content: '';
  position: absolute;
  top: 12px; left: 24px; right: 24px; bottom: 24px;
  border-radius: 16px;
  pointer-events: none;
  box-shadow:
    0 22px 60px -22px rgba(200, 50, 74, 0.32),
    0 6px 18px -8px rgba(26, 26, 26, 0.08);
}
.social-frame-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 640px;
  border: 1px solid #ECE3D0;
  border-radius: 14px;
  display: block;
  background: #fff;
  position: relative;
  z-index: 1;
  /* soft drop shadow for the framed feel */
  box-shadow:
    inset 0 0 0 1px rgba(232,90,111,.18);
}

/* Intro card — shown above the iframe so the user understands they're
   signing into the embedded studio. Disappears once the iframe is
   pointed at a logged-in branded build. */
.social-intro {
  background: #fff;
  border: 1px dashed #d4c8b8;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 24px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .85rem;
  color: var(--ink-soft, #5a5a66);
}
.social-intro-mark {
  width: 36px; height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #E85A6F 0%, #F4ECD8 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: 'Pacifico', cursive;
  font-weight: 500;
  font-size: 1rem;
}
.social-intro p { margin: 0; line-height: 1.5; }
.social-intro strong { color: var(--ink, #1a1a1a); font-weight: 500; }
.social-intro a { color: var(--accent-deep, #C8324A); text-decoration: underline; }
@media (max-width: 720px) {
  .social-intro { margin: 0 14px 12px; }
}

@media (max-width: 720px) {
  .view.view-fill .v-head {
    padding: 16px 18px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .v-head-tight .v-head-actions { width: 100%; }
  .social-frame-wrap { padding: 12px 14px 18px; min-height: 70vh; }
  .social-frame-wrap::before { top: 8px; left: 14px; right: 14px; bottom: 18px; }
  .social-frame-wrap iframe { min-height: 70vh; border-radius: 12px; }
}

