/* =========================================================
   Samsung Reporting Tools — screen-specific styles
   ========================================================= */

/* ============ Scene 1: Template library ============ */
.lib-toolbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 24px;
}
.searchbox {
  display: flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface);
  flex: 1; max-width: 380px; color: var(--faint);
}
.searchbox input {
  border: none; outline: none; background: transparent; flex: 1;
  font-family: inherit; font-size: 13.5px; color: var(--ink);
}
.searchbox .ic { width: 17px; height: 17px; }
.filter-chips { display: flex; gap: 7px; }

.lib-section { margin-bottom: 30px; }

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.tpl-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.9,.3,1), box-shadow .18s, border-color .18s;
  position: relative;
  box-shadow: var(--sh-1);
}
.tpl-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--line-2); }
.tpl-card.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand), var(--sh-2); }
.tpl-card.selected:hover { transform: translateY(-3px); }
.tpl-card .thumb {
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.tpl-card .thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tpl-card .check-badge {
  position: absolute; top: 10px; right: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  opacity: 0; transform: scale(.5); transition: all .2s;
  box-shadow: 0 2px 6px rgba(20,40,160,.4);
}
.tpl-card.selected .check-badge { opacity: 1; transform: none; }
.tpl-card .tmeta { padding: 12px 14px; }
.tpl-card .tname { font-weight: 700; font-size: 13.5px; letter-spacing: -.01em; }
.tpl-card .tinfo { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--faint); font-size: 11.5px; }
.tpl-card .tinfo .d { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }

.tpl-card.new {
  border-style: dashed; border-width: 1.5px; border-color: var(--line-strong);
  background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-height: 100%; gap: 6px;
}
.tpl-card.new:hover { border-color: var(--brand-500); background: var(--brand-tint); }
.tpl-card.new .plus {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line-2);
  display: grid; place-items: center; color: var(--brand);
  transition: all .18s;
}
.tpl-card.new:hover .plus { background: var(--brand); color: #fff; border-color: var(--brand); }
.tpl-card.new .nl { font-weight: 700; font-size: 14px; margin-top: 4px; }
.tpl-card.new .ns { font-size: 11.5px; color: var(--muted); }

/* footer bar */
.lib-foot {
  position: sticky; bottom: 0;
  margin: 28px -32px -60px; padding: 16px 32px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  display: flex; align-items: center; justify-content: space-between;
}
.lib-foot .hint { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 7px; }

/* ============ Scene 2: Config (builder) ============ */
.builder {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.panel-h {
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: space-between;
}
.panel-b { padding: 16px; }

.select-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 42px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-weight: 600; font-size: 13.5px; cursor: pointer; background: var(--surface);
  transition: all .15s;
}
.select-row:hover { border-color: var(--line-strong); background: var(--surface-2); }
.select-row .ic { color: var(--faint); }

.ds-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.ds-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  cursor: grab; transition: border-color .15s, background .15s, color .15s, box-shadow .15s; white-space: nowrap;
}
.ds-chip:active { cursor: grabbing; }
.ds-chip:hover { border-color: var(--line-strong); background: var(--surface-2); }
.ds-chip.on { background: var(--brand-tint); border-color: var(--brand-tint-2); color: var(--brand); }
.ds-chip .grip { color: var(--faint); opacity: 0; width: 13px; margin-left: -3px; transition: opacity .15s; cursor: grab; }
.ds-chip:hover .grip { opacity: .7; }
.ds-chip .cfg, .ds-chip .rm { opacity: .5; }
.ds-chip.on .cfg { opacity: 1; }
.ds-chip .rm { border-radius: 4px; }
.ds-chip .rm:hover { opacity: 1; background: rgba(0,0,0,.07); }
.ds-chip .cnt {
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center;
}
/* custom dataset chip — AI accent */
.ds-chip.custom { background: var(--ai-tint); border-color: var(--ai-tint-2); color: var(--ai-600); }
.ds-chip.custom .cnt { background: var(--ai); }
.ds-chip.custom .rm { color: var(--ai-600); }
.ds-chip.custom .rm:hover { background: rgba(106,63,240,.12); }
/* drag states */
.ds-chip.dragging, .item-slot.dragging { opacity: .4; }
.ds-chip.flash { animation: chipFlash .9s ease; }
@keyframes chipFlash {
  0% { box-shadow: 0 0 0 0 var(--ai); transform: scale(1.06); }
  100% { box-shadow: 0 0 0 6px rgba(106,63,240,0); transform: scale(1); }
}

.custom-box {
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface-2); overflow: hidden;
}
.custom-name {
  width: 100%; border: none; border-bottom: 1px solid var(--line);
  outline: none; background: var(--surface); padding: 10px 12px;
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--ink);
}
.custom-name::placeholder { color: var(--faint); font-weight: 600; }
.custom-name:focus { border-bottom-color: var(--brand-500); box-shadow: inset 0 -1px 0 var(--brand-500); }
.custom-ta {
  width: 100%; border: none; outline: none; resize: vertical;
  background: transparent; padding: 11px 12px; min-height: 110px;
  font-family: inherit; font-size: 12.5px; line-height: 1.6; color: var(--ink);
}
.custom-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-top: 1px solid var(--line);
  background: var(--surface);
}

/* Canvas (right) */
.canvas-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 560px;
}
.canvas-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2);
  white-space: nowrap;
}
.seg {
  display: inline-flex; background: var(--surface-3); border-radius: 8px; padding: 3px;
}
.seg button {
  border: none; background: transparent; height: 28px; padding: 0 13px;
  border-radius: 6px; font-weight: 600; font-size: 12.5px; color: var(--muted);
  transition: all .15s;
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

.canvas-stage {
  flex: 1; padding: 26px;
  background:
    radial-gradient(circle, var(--line) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--surface-3);
  display: flex; align-items: flex-start; justify-content: center;
  overflow: auto;
}
.report-frame {
  background: var(--surface);
  width: 100%; max-width: 720px;
  border-radius: 8px;
  box-shadow: var(--sh-2);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: max-width .3s;
}
.report-frame.portrait { max-width: 460px; }
.report-frame .rf-band { height: 8px; background: linear-gradient(90deg, var(--brand), var(--brand-500)); }
.report-frame .rf-pad { padding: 22px 26px; }

.item-slot {
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  min-height: 78px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-weight: 600; font-size: 13px;
  background: var(--surface-2);
  position: relative; cursor: grab;
  transition: all .15s;
}
.item-slot.filled { border-style: solid; border-color: var(--line-2); background: var(--surface); color: var(--ink); }
.item-slot:hover { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-tint); }
.item-slot .handle { position: absolute; top: 7px; left: 8px; color: var(--faint); opacity: 0; transition: opacity .15s; }
.item-slot:hover .handle { opacity: 1; }
.item-slot .slot-rm {
  position: absolute; top: 6px; right: 6px; width: 20px; height: 20px;
  border-radius: 5px; color: var(--faint); cursor: pointer;
  opacity: 0; transition: opacity .15s, background .15s, color .15s;
}
.item-slot .slot-rm svg { width: 13px; height: 13px; }
.item-slot:hover .slot-rm { opacity: 1; }
.item-slot .slot-rm:hover { background: var(--danger-tint); color: var(--danger); }
.item-slot.flash { animation: slotFlash .9s ease; }
.item-slot .slot-name { white-space: nowrap; padding: 0 4px; text-align: center; }
@keyframes slotFlash {
  0% { box-shadow: 0 0 0 0 var(--brand-500); transform: scale(1.04); border-color: var(--brand); }
  100% { box-shadow: 0 0 0 8px rgba(46,84,232,0); transform: scale(1); }
}
.slot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* report frame as a drop target for dataset chips */
.report-frame.drop-active { box-shadow: 0 0 0 3px var(--brand-500), var(--sh-3); }
.report-frame.drop-active .rf-pad { background: var(--brand-tint); transition: background .15s; }
.report-frame.drop-active .add-item-slot {
  border-color: var(--brand-500); color: var(--brand); background: var(--surface);
  border-style: solid;
}

/* ============ Scene 3: Generating ============ */
.gen-wrap {
  max-width: 720px; margin: 0 auto; padding-top: 24px;
}
.gen-hero {
  text-align: center; padding: 8px 0 26px;
}
.gen-hero .ai-orb { margin: 0 auto 16px; }
.gen-hero h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.gen-hero p { margin: 0; color: var(--muted); font-size: 14px; }

.progress-track {
  height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden;
  margin: 6px 0 4px;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--ai), #9a6bff);
  width: 0%; transition: width .5s cubic-bezier(.4,0,.2,1);
}
.gen-steps { margin-top: 22px; display: flex; flex-direction: column; gap: 2px; }
.gen-step {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: var(--r);
  transition: background .25s;
}
.gen-step.active { background: var(--ai-tint); }
.gen-step .st-ic {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--faint);
  transition: all .25s;
}
.gen-step.done .st-ic { background: var(--success); color: #fff; }
.gen-step.active .st-ic { background: var(--ai); color: #fff; }
.gen-step .st-label { font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.gen-step.pending .st-label { color: var(--faint); }
.gen-step .st-sub { font-size: 12px; color: var(--faint); margin-top: 1px; }

.version-rail {
  display: flex; gap: 10px; margin-top: 26px; justify-content: center;
}
.vrail-card {
  width: 120px; border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; background: var(--surface); box-shadow: var(--sh-1);
}
.vrail-card .vt { height: 70px; background: var(--surface-2); position: relative; overflow: hidden; }
.vrail-card .vt .shimmer-bar { position: absolute; inset: 0; }
.vrail-card .vc { padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; }
.vrail-card .vc b { font-size: 12.5px; }

.shimmer {
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ============ Scene 4: Review ============ */
.review-grid {
  display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start;
}
.preview-wrap { }
.preview-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.pager { display: flex; align-items: center; gap: 4px; }
.pager .pg-btn {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line-2);
  background: var(--surface); display: grid; place-items: center; color: var(--ink-2);
}
.pager .pg-btn:hover { background: var(--surface-2); }
.pager .pg-info { font-size: 12.5px; font-weight: 600; padding: 0 10px; color: var(--ink-2); }

.doc-canvas {
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  display: flex; justify-content: center;
  box-shadow: inset 0 1px 3px rgba(16,24,40,.04);
  min-height: 540px;
}
.thumb-strip { display: flex; gap: 9px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; }
.thumb-strip .ts {
  width: 74px; height: 52px; flex: 0 0 auto; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--surface); overflow: hidden;
  cursor: pointer; position: relative; box-shadow: var(--sh-1);
}
.thumb-strip .ts.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.thumb-strip .ts .mini-band { height: 5px; background: var(--brand); }
.thumb-strip .ts .mini-lines { padding: 5px; display: flex; flex-direction: column; gap: 3px; }
.thumb-strip .ts .mini-lines i { height: 2.5px; background: var(--line-2); border-radius: 2px; }

/* version side panel */
.vpanel { display: flex; flex-direction: column; gap: 14px; }
.vpanel .vp-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden;
}
.vp-head { padding: 13px 15px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.vp-head b { font-size: 13px; }
.vlist { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.vitem {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; border-radius: var(--r); cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
}
.vitem:hover { background: var(--surface-2); }
.vitem.on { background: var(--brand-tint); border-color: var(--brand-tint-2); }
.vitem .vthumb {
  width: 42px; height: 32px; border-radius: 5px; flex: 0 0 auto;
  border: 1px solid var(--line-2); overflow: hidden; background: var(--surface);
}
.vitem .vthumb .b { height: 4px; background: var(--brand); }
.vitem .vmeta { flex: 1; min-width: 0; }
.vitem .vmeta .vn { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.vitem .vmeta .vd { font-size: 11px; color: var(--faint); margin-top: 1px; }
.vitem .vradio {
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  flex: 0 0 auto; display: grid; place-items: center;
}
.vitem.on .vradio { border-color: var(--brand); }
.vitem.on .vradio::after { content:''; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }

.diff-card { padding: 13px 15px; }
.diff-card ul { margin: 8px 0 0; padding-left: 17px; }
.diff-card li { font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; }

.review-actions { display: flex; flex-direction: column; gap: 8px; padding: 4px; }

.verify-card { padding: 13px 15px; background: var(--surface-2); }

/* ============ Report document render ============ */
.rdoc {
  background: #fff; width: 100%;
  border-radius: 4px;
  box-shadow: 0 6px 22px rgba(16,24,40,.1);
  overflow: hidden;
  font-size: 11px; color: #1a1a1a;
}
.rdoc-head {
  display: flex; justify-content: space-between; align-items: stretch;
  border-bottom: 3px solid var(--brand);
}
.rdoc-title { padding: 16px 22px; }
.rdoc-title h1 { margin: 0; font-size: 25px; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.rdoc-title .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.rdoc-corner {
  background: var(--brand); color: #fff; padding: 10px 18px; text-align: right;
  display: flex; flex-direction: column; justify-content: center; min-width: 150px;
}
.rdoc-corner .c1 { font-size: 10px; opacity: .85; }
.rdoc-corner .c2 { font-size: 13px; font-weight: 800; margin-top: 2px; }
.rdoc-body { padding: 18px 22px; display: grid; grid-template-columns: 188px 1fr; gap: 20px; }
.rdoc-meta { display: flex; flex-direction: column; gap: 0; }
.rdoc-meta .mrow { display: grid; grid-template-columns: 78px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid #eef0f4; }
.rdoc-meta .mrow .ml { color: var(--faint); font-size: 10.5px; }
.rdoc-meta .mrow .mv { color: var(--brand); font-weight: 700; font-size: 11px; }
.rdoc-summary { font-size: 11.5px; line-height: 1.5; color: #333; margin-bottom: 10px; }
.rdoc-band {
  background: var(--surface-3); padding: 6px 11px; font-weight: 700; font-size: 11.5px;
  border-radius: 5px; color: var(--ink); margin-bottom: 8px;
  display: flex; align-items: center; gap: 7px;
}
.rdoc-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.rdoc-table th, .rdoc-table td { border: 1px solid #e5e8ee; padding: 4px 7px; text-align: left; }
.rdoc-table th { background: var(--surface-2); font-weight: 700; color: var(--ink-2); }
.rdoc-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rdoc-table .pct { color: var(--brand); font-weight: 700; }

/* divs chart inside doc */
.bar-vis { display: flex; align-items: flex-end; gap: 8px; height: 60px; padding: 8px 4px 0; }
.bar-vis .bar { flex: 1; background: linear-gradient(180deg, var(--brand-500), var(--brand)); border-radius: 3px 3px 0 0; min-height: 6px; }

/* ============ Scene 5: Done ============ */
.done-wrap { max-width: 760px; margin: 0 auto; padding-top: 18px; }
.done-hero { text-align: center; padding: 18px 0 26px; }
.done-check {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--success-tint); color: var(--success);
  display: grid; place-items: center;
  animation: popIn .4s cubic-bezier(.2,.9,.3,1.4);
}
@keyframes popIn { from { transform: scale(.4); opacity: 0; } }
.done-hero h2 { margin: 0 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.done-hero p { margin: 0; color: var(--muted); font-size: 14px; }
.done-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.done-card { padding: 16px 18px; }
.done-card h3 { margin: 0 0 12px; font-size: 13.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2);
}
.file-ic {
  width: 38px; height: 46px; border-radius: 5px; flex: 0 0 auto;
  background: #fff; border: 1px solid var(--line-2); position: relative;
  display: grid; place-items: end center; padding-bottom: 5px;
  font-size: 9px; font-weight: 800; color: var(--danger);
}
.file-ic.xls { color: var(--success); }
.send-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.send-row:last-child { border-bottom: none; }

.recent-list .rl-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 4px;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.recent-list .rl-row:last-child { border-bottom: none; }

/* Empty slot affordance for new layout */
.add-item-slot {
  border: 1.5px dashed var(--line-strong); border-radius: 10px; min-height: 78px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  color: var(--muted); font-weight: 600; font-size: 12.5px; cursor: pointer;
  transition: all .15s; position: relative;
}
.add-item-slot:hover { border-color: var(--brand-500); color: var(--brand); background: var(--brand-tint); }

/* Add-item popover menu */
.add-menu {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: 250px; max-height: 280px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r); box-shadow: var(--sh-pop);
  padding: 6px; z-index: 30; cursor: default;
  animation: menuIn .16s ease;
}
@keyframes menuIn { from { opacity: 0; transform: translate(-50%, 6px); } }
.add-menu::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: var(--surface);
  filter: drop-shadow(0 1px 0 var(--line-2));
}
.add-menu-h { font-size: 11.5px; font-weight: 700; color: var(--faint); padding: 6px 9px 7px; }
.add-menu-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 9px; border-radius: 7px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink-2); transition: background .12s;
}
.add-menu-row:hover { background: var(--brand-tint); color: var(--brand); }
.add-menu-row svg { width: 14px; height: 14px; color: var(--brand); }
.add-menu-empty { padding: 14px 12px; font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.5; }

/* dataset detail option row */
.opt-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer;
  transition: all .15s; margin-bottom: 8px;
}
.opt-row:hover { border-color: var(--line-strong); background: var(--surface-2); }
.opt-row.on { border-color: var(--brand-tint-2); background: var(--brand-tint); }
.opt-row .o-meta { flex: 1; }
.opt-row .o-name { font-weight: 600; font-size: 13.5px; }
.opt-row .o-desc { font-size: 11.5px; color: var(--faint); margin-top: 1px; }

.preview-stat {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--surface-2); border-radius: var(--r); border: 1px solid var(--line);
}

/* responsive guard */
@media (max-width: 1100px) {
  .tpl-grid { grid-template-columns: repeat(3, 1fr); }
  .builder { grid-template-columns: 280px 1fr; }
  .review-grid { grid-template-columns: 1fr 280px; }
}
