/* BonBon Studio */

/* Fonturile etichetelor: aceleași fișiere ca pe terminal (Android), ca textul să se potrivească la fel.
   Roboto, Droid Sans Mono, Material Icons: Apache 2.0; celelalte: SIL OFL 1.1 (licențele sunt în fonts/). */
@font-face { font-family: 'BB Roboto'; font-weight: 400; font-display: block; src: url(fonts/Roboto-Regular.woff2) format('woff2'); }
@font-face { font-family: 'BB Roboto'; font-weight: 700; font-display: block; src: url(fonts/Roboto-Bold.woff2) format('woff2'); }
@font-face { font-family: 'BB Roboto'; font-weight: 900; font-display: block; src: url(fonts/Roboto-Black.woff2) format('woff2'); }
@font-face { font-family: 'BB Roboto Condensed'; font-weight: 700; font-display: block; src: url(fonts/RobotoCondensed-Bold.woff2) format('woff2'); }
@font-face { font-family: 'BB Noto Serif'; font-weight: 400; font-display: block; src: url(fonts/NotoSerif-Regular.woff2) format('woff2'); }
@font-face { font-family: 'BB Noto Serif'; font-weight: 700; font-display: block; src: url(fonts/NotoSerif-Bold.woff2) format('woff2'); }
@font-face { font-family: 'BB Droid Sans Mono'; font-weight: 400; font-display: block; src: url(fonts/DroidSansMono.woff2) format('woff2'); }
@font-face { font-family: 'BB Cutive Mono'; font-weight: 400; font-display: block; src: url(fonts/CutiveMono.woff2) format('woff2'); }
@font-face { font-family: 'BB Kaushan Script'; font-weight: 400; font-display: block; src: url(fonts/KaushanScript-Regular.woff2) format('woff2'); }
@font-face { font-family: 'BB Pacifico'; font-weight: 400; font-display: block; src: url(fonts/Pacifico-Regular.woff2) format('woff2'); }
@font-face { font-family: 'BB Mali'; font-weight: 700; font-display: block; src: url(fonts/Mali-Bold.woff2) format('woff2'); }
@font-face { font-family: 'BB Great Vibes'; font-weight: 400; font-display: block; src: url(fonts/GreatVibes-Regular.woff2) format('woff2'); }
@font-face { font-family: 'BB Cinzel Decorative'; font-weight: 700; font-display: block; src: url(fonts/CinzelDecorative-Bold.woff2) format('woff2'); }
@font-face { font-family: 'BB Material Icons'; font-weight: 400; font-display: block; src: url(fonts/MaterialIcons-Regular.woff2) format('woff2'); }

:root {
  --c1: #d81b60; --c2: #4a148c; --ink: #22161d; --soft: #6b5a62; --bg: #fff8fb; --card: #ffffff; --line: #f0dfe7;
  --grad: linear-gradient(135deg, var(--c1), var(--c2));
  --tile: #f6eff3; --pink: #fde7f0; --violet: #8e24aa; --ok: #2e7d32; --err: #c62828; --amber: #a15c00;
  --shadow: 0 18px 50px rgba(74, 20, 140, .18);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--bg); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.ms { font-family: 'Material Symbols Rounded'; font-weight: 500; font-style: normal; font-size: 20px; line-height: 1; display: inline-block; vertical-align: middle; width: 1em; overflow: hidden;
  font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; user-select: none; flex: none; letter-spacing: normal; text-transform: none; white-space: nowrap; }
body:not(.icons) .ms { visibility: hidden; }
.ms.sm { font-size: 16px; }
.mi { font-family: 'BB Material Icons'; font-weight: 400; font-style: normal; line-height: 1; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--soft); }
.small { font-size: 12.5px; }
code { font: 12px ui-monospace, Consolas, monospace; background: var(--tile); border-radius: 5px; padding: 1px 5px; color: var(--c2); }
kbd { font: 600 11.5px Inter, sans-serif; background: #fff; border: 1px solid #dfcfd8; border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; white-space: nowrap; }

/* ---------------------------------------------------------------- antet */
.top { height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.logo { font-family: 'BB Pacifico', cursive; font-size: 25px; line-height: 1; text-decoration: none; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 4px 2px 8px; }
.logo.big { font-size: 46px; }
.product { font-weight: 800; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--c2); background: var(--pink); border-radius: 999px; padding: 4px 9px; margin-right: 6px; }
.docbox { display: flex; flex-direction: column; justify-content: center; min-width: 140px; max-width: 300px; margin-right: 6px; }
.docname { border: 1px solid transparent; border-radius: 8px; padding: 3px 7px; font-weight: 700; font-size: 15px; background: transparent; width: 100%; text-overflow: ellipsis; }
.docname:hover { border-color: var(--line); }
.docname:focus { outline: none; border-color: var(--c1); background: #fff; }
.savestate { font-size: 11.5px; color: var(--ok); padding-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.savestate.warn { color: var(--amber); }
.tops { display: flex; gap: 2px; }
.tb { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink); white-space: nowrap; }
.tb:hover { background: var(--tile); }
.tb .ms { color: var(--c1); }
.tb.icon { padding: 8px; }
.acct { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px 6px 9px; font-weight: 600; font-size: 13px; max-width: 230px; white-space: nowrap; }
.acct span:last-child { overflow: hidden; text-overflow: ellipsis; }
.acct:hover { border-color: var(--c1); }
.acct.in .ms { color: var(--ok); }
.acct.out { border-color: #f3c2d6; color: var(--c1); }
.acct.warn { color: var(--amber); border-color: #f0d9b5; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 14px; white-space: nowrap; text-decoration: none; }
.btn.main { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(216, 27, 96, .28); }
.btn.main:hover { filter: brightness(1.06); }
.btn.ghost { background: #fff; color: var(--c1); border: 1.5px solid #f3c2d6; }
.btn.ghost:hover { border-color: var(--c1); background: #fff6fa; }
.btn.danger { background: var(--err); color: #fff; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn .ms { font-size: 19px; }
.badge:empty { display: none; }
.badge { background: rgba(255, 255, 255, .25); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--soft); flex: none; }
.iconbtn:hover:not(:disabled) { background: var(--tile); color: var(--ink); }
.iconbtn:disabled, .iconbtn.dis { opacity: .35; cursor: default; pointer-events: none; }
.iconbtn.danger:hover { color: var(--err); background: #fdecee; }
.iconbtn.small { width: 30px; height: 30px; }

/* ---------------------------------------------------------------- așezarea */
.app { display: grid; grid-template-columns: 268px minmax(0, 1fr) 372px; height: calc(100vh - 56px); }
.panel { background: #fff; min-height: 0; }
.left { border-right: 1px solid var(--line); overflow: auto; }
.left .pad { padding: 14px 14px 24px; }
.left h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); margin: 4px 2px 10px; font-weight: 700; }
.left h3 + .layers { margin-top: 0; }
.left .hint { margin: 10px 2px 18px; }
.right { border-left: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.addgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.addbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 7px 4px; border: 1px solid var(--line); background: #fff; border-radius: 12px; font-size: 11.5px; line-height: 1.2; text-align: center; color: var(--ink); }
.addbtn .ms { font-size: 22px; color: var(--c1); }
.addbtn:hover { border-color: var(--c1); background: #fff6fa; }
.layers { display: flex; flex-direction: column; gap: 4px; }
.layer { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 6px 8px; color: var(--ink); }
.layer:hover { background: var(--tile); }
.layer.on { background: var(--pink); border-color: #f3c2d6; }
.layer .ms { color: var(--soft); font-size: 19px; }
.layer.on .ms { color: var(--c1); }
.lt { display: flex; flex-direction: column; min-width: 0; }
.l1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.l2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; color: var(--soft); }

/* ---------------------------------------------------------------- bara de unelte și eticheta */
.toolbar { height: 50px; display: flex; align-items: center; gap: 4px; padding: 0 10px; background: #fff; border-bottom: 1px solid var(--line); flex: none; overflow-x: auto; }
.tsep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; flex: none; }
.tchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 6px 10px; font-weight: 600; font-size: 13px; white-space: nowrap; flex: none; }
.tchip:hover { border-color: var(--c1); }
.tchip .ms { color: var(--c1); }
.tchip.on { background: var(--pink); border-color: #f3c2d6; color: var(--c2); }
.tchip.toggle.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tchip.toggle.on .ms { color: #fff; }
.zoomchip { min-width: 62px; justify-content: center; }
.tsel { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--soft); padding: 0 4px; flex: none; }
.tsel .ms { color: var(--c1); }
.tsel select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 6px; background: #fff; color: var(--ink); font-weight: 600; }
.pvnav { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 13px; background: var(--tile); border-radius: 10px; padding: 1px 4px; flex: none; }
.stage { flex: 1 1 auto; overflow: auto; position: relative; outline: none; min-height: 0;
  background: radial-gradient(circle, #e6d8df 1px, transparent 1.2px) 0 0 / 18px 18px, #f7f2f5; }
.stage:focus-visible { box-shadow: inset 0 0 0 2px #f3c2d6; }
.stage.drop { box-shadow: inset 0 0 0 3px var(--c1); }
.sheet { min-width: 100%; min-height: 100%; width: max-content; height: max-content; display: grid; place-items: center; padding: 56px; }
.paper { position: relative; background: #fff; box-shadow: 0 12px 34px rgba(74, 20, 140, .16), 0 1px 3px rgba(0, 0, 0, .14); }
.paper.round { border-radius: 50%; }
#cv { display: block; }
#cv.round { border-radius: 50%; }
#ov { position: absolute; pointer-events: none; }
.readout { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 7px; white-space: nowrap; }
.statusbar { height: 28px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 14px; font-size: 12px; color: var(--soft); background: #fff; border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; }

/* ---------------------------------------------------------------- panoul din dreapta */
.rtabs { display: flex; border-bottom: 1px solid var(--line); flex: none; padding: 6px 8px 0; gap: 2px; }
.rtabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; background: transparent; padding: 10px 6px 11px; font-weight: 600; font-size: 13px; color: var(--soft); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.rtabs button .ms { font-size: 18px; }
.rtabs button.on { color: var(--c1); border-bottom-color: var(--c1); }
.tabpane { flex: 1 1 auto; overflow: auto; padding: 12px 16px 28px; min-height: 0; }
.psec { padding: 12px 0 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.psec:last-child { border-bottom: 0; }
.psec h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--soft); font-weight: 700; }
.psec h5 { margin: 6px 0 0; font-size: 13px; font-weight: 700; }
.phead { display: flex; align-items: center; gap: 6px; padding: 2px 0 8px; border-bottom: 1px solid var(--line); }
.phead > .ms { color: var(--c1); font-size: 22px; }
.phead b { flex: 1; font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lbl { font-size: 12.5px; font-weight: 600; color: var(--soft); display: flex; align-items: center; gap: 6px; }
.lbl code { margin-left: auto; }
.rowlbl { display: flex; align-items: center; justify-content: space-between; }
.val { font-size: 13px; }
.inp { width: 100%; border: 1.5px solid #ead9e1; border-radius: 10px; padding: 8px 10px; background: #fff; min-width: 0; }
.inp:focus { outline: none; border-color: var(--c1); box-shadow: 0 0 0 3px rgba(216, 27, 96, .12); }
.inp:disabled { background: var(--tile); color: var(--soft); }
textarea.inp { resize: vertical; min-height: 44px; line-height: 1.4; }
select.inp { padding: 7px 8px; }
.inp.num { text-align: right; }
.affix { display: flex; align-items: center; gap: 6px; }
.affix > span { color: var(--soft); font-weight: 600; }
.affix .inp { flex: 1; }
.numf .affix .inp { max-width: 140px; }
.hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--soft); }
.hint.warn { color: var(--err); }
.hint.amber { color: var(--amber); }
.fnote { font-size: 12px; color: var(--soft); }
.fnote:empty { display: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.grid2 .numf .affix .inp, .grid3 .numf .affix .inp { max-width: none; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 6px; }
.btncol { display: flex; flex-direction: column; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; flex: none; }
.chip { border: 1px solid #ead9e1; background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--ink); }
.chip:hover { border-color: var(--c1); }
.chip.on { background: var(--pink); border-color: var(--c1); color: var(--c2); }
.seg { display: flex; background: var(--tile); border-radius: 11px; padding: 3px; gap: 2px; }
.seg.wrapseg { flex-wrap: wrap; }
.seg button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; background: transparent; border-radius: 8px; padding: 6px 8px; font-size: 12.5px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.seg button .ms { font-size: 18px; }
.seg button.on { background: #fff; color: var(--c1); box-shadow: 0 1px 3px rgba(74, 20, 140, .15); }
.seg.full button { flex: 1 1 0; flex-direction: column; gap: 2px; padding: 7px 4px; font-size: 12px; white-space: normal; text-align: center; line-height: 1.2; }
.switch { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { flex: none; width: 36px; height: 20px; border-radius: 999px; background: #e3d3db; position: relative; transition: background .15s; margin-top: 1px; }
.switch .track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.switch input:checked + .track { background: var(--c1); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(216, 27, 96, .25); }
.stxt { display: flex; flex-direction: column; font-size: 13.5px; }
.stxt b { font-weight: 600; }
.stxt small { color: var(--soft); font-size: 12px; line-height: 1.4; }
.range { width: 100%; accent-color: var(--c1); }
.fontgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.fontbtn { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1px solid #ead9e1; background: #fff; border-radius: 10px; padding: 6px 2px 5px; color: var(--ink); }
.fontbtn .fs { font-size: 19px; line-height: 1.35; white-space: nowrap; }
.fontbtn small { font-size: 11px; color: var(--soft); }
.fontbtn:hover { border-color: var(--c1); }
.fontbtn.on { border-color: var(--c1); background: var(--pink); }
.iconrow, .imgrow { display: flex; align-items: center; gap: 12px; }
.iconrow .grow, .imgrow .grow { display: flex; flex-direction: column; }
.icontile { width: 58px; height: 58px; border-radius: 14px; background: var(--tile); border: 0; display: grid; place-items: center; flex: none; }
.icontile .mi { font-size: 38px; color: var(--ink); }
.thumb { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; background: var(--tile); flex: none; display: grid; place-items: center; }
.thumb.missing .ms { color: var(--err); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 10px 10px; color: var(--soft); }
.empty .ms { font-size: 36px; color: #e3b5ca; }
.empty b { color: var(--ink); font-size: 15px; }
.empty p { margin: 0; font-size: 13px; }
.kbd { background: var(--tile); border-radius: 12px; padding: 12px 14px; font-size: 12.5px; margin-top: 8px; }
.kbd ul { margin: 6px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 5px; color: var(--soft); }
.note { display: flex; gap: 10px; align-items: flex-start; background: #ede7ff; color: var(--ink); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; margin: 4px 0 6px; }
.note .ms { color: var(--c2); }
.fmtcard { display: flex; align-items: center; gap: 10px; background: var(--tile); border-radius: 12px; padding: 10px 12px; }
.fmtcard > .ms { color: var(--c1); }
.fmtcard .grow { display: flex; flex-direction: column; }
.fmtcard small { color: var(--soft); font-size: 12px; }
.vrow .lbl { color: var(--ink); }
.vrow .lbl .ms { color: var(--c1); }
.maprow { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; }
.drop { display: flex; align-items: center; gap: 12px; border: 2px dashed #e7c3d4; border-radius: 14px; padding: 14px; background: #fffafc; cursor: pointer; }
.drop .ms { font-size: 30px; color: var(--c1); }
.drop div { display: flex; flex-direction: column; }
.drop small { color: var(--soft); }
.drop:hover, .drop.over { border-color: var(--c1); background: #fff3f8; }
.tablewrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; max-height: 320px; }
table.preview, table.jobt { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.preview th, table.preview td, table.jobt th, table.jobt td { text-align: left; padding: 6px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
table.preview th, table.jobt th { background: var(--tile); font-weight: 700; position: sticky; top: 0; }
table.preview tbody tr { cursor: pointer; }
table.preview tbody tr:hover, table.preview tbody tr.on { background: #fff3f8; }
td.num { text-align: right; }
.sum .total { display: flex; align-items: baseline; gap: 2px; }
.sum .total b { font-size: 34px; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.sum .total span { font-weight: 600; color: var(--soft); }
.sum .pvnav { align-self: flex-start; }

/* ---------------------------------------------------------------- ferestre */
.backdrop { position: fixed; inset: 0; background: rgba(34, 22, 29, .42); z-index: 80; display: grid; place-items: center; padding: 24px; animation: fade .12s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 20px; box-shadow: var(--shadow); width: min(520px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; }
.modal.small { width: min(460px, 100%); }
.modal.mid { width: min(620px, 100%); }
.modal.wide { width: min(860px, 100%); }
.modal.xwide { width: min(1160px, 100%); }
.modal.tall { height: min(860px, calc(100vh - 48px)); }
.mhead { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px 22px; }
.mhead h2 { margin: 0; flex: 1; font-size: 19px; font-weight: 800; }
.mbody { padding: 4px 22px 18px; overflow: auto; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.mbody > div { min-height: 0; }
.mfoot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: #fffafc; }
.lead { margin: 0; color: var(--soft); font-size: 14px; }
.fmtdlg { display: flex; flex-direction: column; gap: 8px; }
.fmtdlg h4 { margin: 8px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--soft); }
.customfmt { display: flex; align-items: flex-end; gap: 10px; }
.customfmt .field { width: 120px; }
.customfmt .x { padding-bottom: 9px; color: var(--soft); font-weight: 700; }
.iconpick { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.iconscroll { overflow: auto; flex: 1; min-height: 0; padding: 2px; }
.iconscroll h4 { margin: 14px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--soft); }
.icongrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.iconcell { aspect-ratio: 1; border: 0; border-radius: 12px; background: var(--tile); display: grid; place-items: center; }
.iconcell .mi { font-size: 30px; color: var(--ink); }
.iconcell:hover { background: var(--pink); }
.iconcell.on { background: var(--pink); box-shadow: inset 0 0 0 2px var(--c1); }
.tplbody { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.tplscroll { overflow: auto; flex: 1; min-height: 0; padding: 2px; }
.tplgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 14px; }
.tpl { display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 10px 10px 12px; text-align: left; color: var(--ink); }
.tpl:hover { border-color: var(--c1); box-shadow: 0 8px 22px rgba(216, 27, 96, .14); }
.tpl b { font-size: 13.5px; line-height: 1.3; }
.tpl small { color: var(--soft); font-size: 11.5px; }
.tthumb { height: 150px; border-radius: 10px; background: radial-gradient(circle, #e6d8df 1px, transparent 1.2px) 0 0 / 14px 14px, #f7f2f5; display: grid; place-items: center; margin-bottom: 6px; }
.thumbc { display: block; background: #fff; box-shadow: 0 4px 12px rgba(74, 20, 140, .16); }
.thumbc.round { border-radius: 50%; }
.dlist { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.drow { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 9px 10px 9px 12px; }
.drow.on { border-color: #f3c2d6; background: #fff8fb; }
.drow .grow { display: flex; flex-direction: column; }
.drow small { color: var(--soft); font-size: 12px; }
.dic { width: 40px; height: 40px; border-radius: 10px; background: var(--tile); display: grid; place-items: center; color: var(--c1); flex: none; }
.dthumb { width: 92px; height: 64px; border-radius: 10px; background: var(--tile); display: grid; place-items: center; flex: none; }
.emptybox { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 34px 20px; color: var(--soft); }
.emptybox .ms { font-size: 40px; color: #e3b5ca; }
.emptybox b { color: var(--ink); font-size: 16px; }
.emptybox p { margin: 0 0 8px; max-width: 460px; }
.pair { display: flex; flex-direction: column; gap: 14px; }
.pair .code { display: flex; justify-content: center; gap: 8px; margin: 6px 0 2px; }
.pair .code span { width: 54px; height: 66px; display: grid; place-items: center; border-radius: 14px; background: var(--tile); font: 800 36px Inter, sans-serif; color: var(--c2); box-shadow: inset 0 -3px 0 rgba(74, 20, 140, .12); }
.pair .wait { margin: 0; text-align: center; color: var(--soft); font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.steps { margin: 0; padding: 12px 14px 12px 34px; background: #fffafc; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #f3c2d6; border-top-color: var(--c1); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.offline { display: flex; gap: 12px; align-items: flex-start; background: #fff4e5; border-radius: 14px; padding: 12px 14px; }
.offline .ms { color: var(--amber); font-size: 26px; }
.offline p { margin: 2px 0 0; color: var(--soft); font-size: 13px; }
.send { display: flex; flex-direction: column; gap: 10px; }
.send h4 { margin: 4px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--soft); }
.jobsum { display: flex; align-items: center; gap: 16px; background: var(--tile); border-radius: 14px; padding: 12px 16px; }
.jobsum div { display: flex; align-items: baseline; gap: 6px; }
.jobsum b { font-size: 30px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.jobsum p { margin: 0; color: var(--soft); font-size: 13px; }
.devlist { display: flex; flex-direction: column; gap: 6px; }
.dev { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 9px 12px; text-align: left; color: var(--ink); }
.dev .grow { display: flex; flex-direction: column; }
.dev small { color: var(--soft); }
.dev.on { border-color: var(--c1); background: #fff8fb; }
.dev.on > .ms { color: var(--c1); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #d9c9d1; }
.dot.on { background: #43a047; }
.jobs { display: flex; flex-direction: column; gap: 10px; }
.jobt td .jnote { display: block; color: var(--soft); font-size: 11.5px; white-space: normal; }
span.status { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 12px; border-radius: 999px; padding: 3px 9px 3px 6px; }
span.status .ms { font-size: 16px; }
span.status.wait { background: #fff4e5; color: var(--amber); }
span.status.busy { background: #e8f0fe; color: #1a56c4; }
span.status.ok { background: #e8f5e9; color: var(--ok); }
span.status.err { background: #fdecee; color: var(--err); }
span.status.off { background: #eee; color: #666; }

/* ---------------------------------------------------------------- meniu, mesaje, încărcare */
.menu { position: fixed; z-index: 90; background: #fff; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 6px; min-width: 260px; display: flex; flex-direction: column; }
.menu .mitem { display: grid; grid-template-columns: 26px 1fr; align-items: center; column-gap: 8px; text-align: left; border: 0; background: transparent; border-radius: 9px; padding: 8px 10px; font-size: 13.5px; color: var(--ink); }
.menu .mitem .ms { color: var(--c1); grid-row: span 2; }
.menu .mitem small { grid-column: 2; color: var(--soft); font-size: 11.5px; }
.menu .mitem:hover:not(:disabled) { background: var(--tile); }
.menu .mitem:disabled { opacity: .5; cursor: default; }
.menu .mitem.danger, .menu .mitem.danger .ms { color: var(--err); }
.menu .sep { height: 1px; background: var(--line); margin: 5px 4px; }
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 16px; font-size: 13.5px; max-width: min(640px, 90vw); box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.in { opacity: 1; transform: none; }
.toast.ok .ms { color: #81c784; }
.toast.err { background: #8e1c1c; }
.toast.err .ms { color: #ffcdd2; }
.loading { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--soft); }
.noscript { position: fixed; inset: 0; background: var(--bg); padding: 40px; font-size: 18px; z-index: 300; }

/* ---------------------------------------------------------------- ecrane mai mici */
@media (max-width: 1400px) {
  #bThermal span:not(.ms) { display: none; }
  .tsep { margin: 0 3px; }
}
@media (max-width: 1240px) {
  .app { grid-template-columns: 236px minmax(0, 1fr) 340px; }
  .tb span:not(.ms) { display: none; }
  .tb { padding: 8px; }
}
@media (max-width: 960px) {
  body { overflow: auto; }
  .top { flex-wrap: wrap; height: auto; padding: 8px 12px; }
  .app { grid-template-columns: 1fr; height: auto; }
  .center { height: 70vh; }
  .left, .right { border: 0; border-top: 1px solid var(--line); }
  .right { height: auto; max-height: none; }
  .docbox { max-width: 180px; }
  #bSend span:not(.ms) { display: none; }
}

/* ---------------------------------------------------------------- „Ce vrei să faci?”: serviciile */
.svcbody { display: flex; flex-direction: column; gap: 14px; }
.svcgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.svc { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); }
.svc:hover { border-color: var(--c1); box-shadow: 0 8px 22px rgba(216, 27, 96, .14); }
.svcic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fde7f0; color: var(--c1); }
.svcic .ms { font-size: 26px; }
.svctx { display: flex; flex-direction: column; gap: 3px; }
.svctx b { font-size: 15px; }
.svctx small { color: var(--soft); font-size: 12.5px; line-height: 1.35; }
.svcmore { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.svctabs { align-self: flex-start; border-radius: 14px; padding: 4px; gap: 4px; }
.svctabs button { flex: 0 0 auto; font-size: 15px; padding: 9px 18px; border-radius: 10px; }
.svctabs button .ms { font-size: 20px; }
.tpl.assist .tthumb { background: #fde7f0; color: var(--c1); }
.tpl.assist .tthumb .ms { font-size: 56px; }
