/* ===== Demo app shell ===== */
.app-body { background: #f5f4f2; font-size: .92rem; }
.bg-wood { background: var(--wood) !important; }
.text-wood { color: var(--wood) !important; }

.app-top {
  position: sticky; top: 0; z-index: 1000;
  height: 56px; padding: 0 1.25rem;
  background: var(--graphite); color: #fff;
  display: flex; align-items: center;
}
.logo-sm {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--wood), #7a4f2c);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--wood-light); color: var(--graphite);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800;
}

.app-wrap { display: flex; min-height: calc(100vh - 56px); }
.app-side {
  width: 230px; flex: 0 0 230px;
  background: #fff; border-right: 1px solid #eceae6;
  padding: 1rem .75rem;
  position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto;
}
.app-side .side-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #a3a7ad;
  margin: 1rem .6rem .35rem;
}
.app-side .side-label:first-child { margin-top: 0; }
.app-side a {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .65rem; border-radius: 9px;
  color: var(--graphite); text-decoration: none; cursor: pointer;
  font-weight: 600; font-size: .88rem;
}
.app-side a i { color: var(--muted); font-size: 1.05rem; }
.app-side a:hover { background: var(--wood-soft); }
.app-side a.active { background: var(--wood); color: #fff; }
.app-side a.active i { color: #fff; }
@media (max-width: 860px) {
  .app-side { width: 64px; flex-basis: 64px; padding: .75rem .4rem; }
  .app-side .side-label { display: none; }
  .app-side a { font-size: 0; justify-content: center; }
  .app-side a i { font-size: 1.2rem; }
}

.app-main { flex: 1; padding: 1.5rem 1.75rem 8rem; min-width: 0; }
.screen { display: none; animation: fadeIn .25s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.screen-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.screen-head h4 { font-weight: 800; margin-bottom: .15rem; }

.panel {
  background: #fff; border-radius: 14px; padding: 1.1rem 1.2rem;
  border: 1px solid #eceae6;
}
.panel-title { font-weight: 800; margin-bottom: .8rem; }

.kpi-big {
  background: #fff; border: 1px solid #eceae6; border-radius: 14px; padding: 1rem 1.1rem;
}
.kpi-big .l { font-size: .78rem; color: var(--muted); }
.kpi-big .v { font-size: 1.5rem; font-weight: 800; }
.kpi-big .d { font-size: .75rem; }

/* ===== Board ===== */
.board { display: grid; grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: .75rem; overflow-x: auto; padding-bottom: .5rem; }
.board-col { background: #ebe9e5; border-radius: 12px; padding: .6rem; min-height: 280px; }
.board-col .head { font-size: .78rem; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: .5rem; }
.bcard {
  background: #fff; border-radius: 10px; padding: .6rem .65rem; margin-bottom: .5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); cursor: pointer; font-size: .82rem;
  border: 2px solid transparent; transition: border-color .15s, transform .15s;
}
.bcard:hover { border-color: var(--wood-light); transform: translateY(-1px); }
.bcard.hl { border-color: var(--wood); box-shadow: 0 0 0 4px rgba(176,122,74,.18); }
.bcard .t { font-weight: 700; }
.bcard .m { color: var(--muted); font-size: .75rem; }
.bcard .sum { font-weight: 700; font-size: .78rem; }

/* ===== Stepper ===== */
.stepper { display: flex; gap: .35rem; overflow-x: auto; }
.stepper .st {
  flex: 1; min-width: 100px; text-align: center; font-size: .75rem; font-weight: 600;
  padding: .55rem .4rem; background: #fff; border: 1px solid #eceae6; color: var(--muted);
  position: relative;
}
.stepper .st:first-child { border-radius: 10px 0 0 10px; }
.stepper .st:last-child { border-radius: 0 10px 10px 0; }
.stepper .st.done { background: #e9f5ec; color: #1e7b3c; border-color: #cfe9d6; }
.stepper .st.now { background: var(--wood); color: #fff; border-color: var(--wood); }

.timeline > div { position: relative; padding: 0 0 .9rem 1.4rem; font-size: .85rem; }
.timeline > div::before { content: ""; position: absolute; left: 4px; top: .35rem; width: 9px; height: 9px; border-radius: 50%; background: var(--wood); }
.timeline > div::after { content: ""; position: absolute; left: 8px; top: 1rem; bottom: 0; width: 1px; background: #e5e2dd; }
.timeline > div:last-child::after { display: none; }
.timeline .when { color: var(--muted); font-size: .75rem; }
.timeline .new { animation: flash 1.2s ease; }
@keyframes flash { from { background: #fff4e0; } to { background: transparent; } }

/* ===== Phone tweaks ===== */
.ph-label { font-size: .7rem; color: var(--muted); margin-bottom: .1rem; }
.phone-screen { min-height: 520px; }

/* ===== AI variants ===== */
.variant {
  background: #fff; border-radius: 14px; border: 2px solid #eceae6; overflow: hidden;
  cursor: pointer; transition: border-color .15s, transform .15s; animation: fadeIn .4s ease both;
}
.variant:hover { transform: translateY(-2px); }
.variant.sel { border-color: var(--wood); box-shadow: 0 0 0 4px rgba(176,122,74,.15); }
.variant .cap { padding: .6rem .8rem; display: flex; justify-content: space-between; align-items: center; font-size: .85rem; }
.variant svg { display: block; width: 100%; height: auto; background: #f3efe9; }

/* ===== Engineering ===== */
#engSvg svg { width: 100%; height: auto; }
.sum-row { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px dashed #eee; font-size: .85rem; }
.sum-row:last-child { border-bottom: 0; }
.checks { list-style: none; padding: 0; margin: 0; font-size: .84rem; }
.checks li { padding: .35rem 0; display: flex; gap: .5rem; align-items: flex-start; animation: fadeIn .3s ease both; }
.checks .bi-check-circle-fill { color: #28a745; }
.checks .bi-exclamation-triangle-fill { color: #e0a100; }
.checks .bi-x-circle-fill { color: #dc3545; }

.doc-row { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid #f1efec; font-size: .85rem; }
.doc-row:last-child { border-bottom: 0; }

/* ===== Production ===== */
.task {
  background: #fff; border: 1px solid #eceae6; border-radius: 12px; padding: .9rem; cursor: pointer; height: 100%;
  transition: border-color .15s;
}
.task:hover { border-color: var(--wood); }
.task.done { background: #f1f8f3; border-color: #cfe9d6; }
.task.now { border-color: var(--wood); box-shadow: 0 0 0 4px rgba(176,122,74,.12); }
.task .ic { font-size: 1.4rem; color: var(--wood); }
.task.done .ic { color: #28a745; }
.load-row { display: flex; align-items: center; gap: .75rem; font-size: .82rem; margin-bottom: .45rem; }
.load-row .n { width: 150px; flex: 0 0 150px; }
.load-row .progress { flex: 1; height: 10px; }

/* ===== Plan-fact bars ===== */
.pfb { margin-bottom: .8rem; font-size: .8rem; }
.pfb .bar { height: 10px; border-radius: 5px; margin-top: .2rem; }
.pfb .plan { background: var(--wood-light); }
.pfb .fact { background: var(--wood); }

/* ===== Tour ===== */
.tour {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100% - 2rem)); z-index: 1500;
  background: var(--graphite); color: #fff; border-radius: 16px;
  padding: 1rem 1.1rem; box-shadow: 0 20px 60px rgba(0,0,0,.35);
  animation: fadeIn .3s ease;
}
.tour-num {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%;
  background: var(--wood); display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.tour-dots { display: flex; gap: 4px; }
.tour-dots span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); }
.tour-dots span.on { background: var(--wood); }
.pulse { animation: pulse 1.4s ease 2; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(176,122,74,.0); } 50% { box-shadow: 0 0 0 8px rgba(176,122,74,.35); } }

/* ===== Board / marketplace ===== */
.side-badge { font-size: .6rem; }
#adTabs .btn.active { background: var(--wood); border-color: var(--wood); color: #fff; }
.ad {
  background: #fff; border: 1px solid #eceae6; border-radius: 14px; padding: 1rem 1.1rem;
  height: 100%; display: flex; flex-direction: column; animation: fadeIn .3s ease both;
  transition: box-shadow .15s, transform .15s;
}
.ad:hover { box-shadow: 0 12px 30px rgba(31,35,40,.08); transform: translateY(-2px); }
.ad.mine { border-color: var(--wood); background: #fffaf4; }
.ad .ad-cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ad .ad-cat.coop { color: #2b5d8a; } .ad .ad-cat.left { color: #2e7d4f; }
.ad .ad-cat.equip { color: #7a4f2c; } .ad .ad-cat.hw { color: #8a2b6d; }
.ad h6 { font-weight: 800; margin: .35rem 0 .3rem; }
.ad .desc { font-size: .83rem; color: var(--muted); flex: 1; }
.ad .price { font-weight: 800; font-size: 1.05rem; }
.ad .who { font-size: .76rem; color: var(--muted); }
.ad .ad-img { height: 90px; border-radius: 10px; margin-bottom: .6rem; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: rgba(255,255,255,.9); }
.ad-tag { font-size: .68rem; background: #f1efec; border-radius: 999px; padding: .1rem .5rem; margin-right: .25rem; }


/* ===== Subscription ===== */
.cur-plan { border: 2px solid var(--wood); }
.usage-row { margin-bottom: .85rem; font-size: .85rem; }
.usage-row .progress { height: 8px; margin-top: .25rem; }
.pack {
  border: 1px solid #eceae6; background: #fff; border-radius: 12px; padding: .8rem .5rem;
  display: flex; flex-direction: column; align-items: center; transition: border-color .15s;
}
.pack:hover { border-color: var(--wood); }
.pack b { font-size: 1.3rem; color: var(--wood); }
.pack span { font-size: .8rem; color: var(--muted); }
.addon-row { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid #f1efec; font-size: .86rem; }
.addon-row:last-child { border-bottom: 0; }
.addon-row i { color: var(--wood); margin-right: .3rem; }
.cmp { border: 1px solid #eceae6; border-radius: 12px; padding: .9rem; height: 100%; font-size: .82rem; }
.cmp.cur { border: 2px solid var(--wood); background: var(--wood-soft); }
.cmp .n { font-weight: 800; letter-spacing: .05em; color: var(--wood); }
.cmp .p { font-weight: 800; font-size: 1.1rem; }
.ad.promo { border: 2px solid #e0a100; box-shadow: 0 0 0 4px rgba(224,161,0,.12); }
.ad .promo-tag { font-size: .68rem; font-weight: 700; color: #a87400; }
