/* The moving product workflows. Drawn with the site's own colors and type. */

/* ---- Dec page reading (home) ---- */
.wf-dec .dec-bd { display: grid; gap: 20px; padding: 20px; background: #F5F1EA; }
@media (min-width: 768px) { .wf-dec .dec-bd { grid-template-columns: 5fr 7fr; } }
.wf-dec .dec-bd > div:first-child { display: flex; flex-direction: column; }
.dz { flex: 1; border: 1px dashed #CFC6B8; border-radius: 10px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 22px; min-height: 300px; }
.dz.drop { border-color: var(--purple-line); }
.doc { position: relative; width: 100%; max-width: 340px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 18px 36px -18px rgba(43,42,38,.25); padding: 20px 22px 18px; overflow: hidden; }
.doc.in { animation: slidedown .5s ease both; }
.doc.reading { background: #FAF6F8; }
.dblk { border: 1px solid transparent; border-radius: 5px; padding: 6px 6px 8px; margin: 0 -7px 10px; transition: background .4s, border-color .4s; }
.dblk.lit { background: var(--purple-soft); border-color: var(--purple-line); }
.dt { font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.ds { font-size: 10px; font-weight: 600; letter-spacing: .14em; color: var(--muted); margin: 3px 0 10px; }
.dl { font-size: 9px; font-weight: 600; letter-spacing: .14em; color: var(--muted); margin: 6px 0 9px; }
.dbars { display: grid; gap: 6px; grid-auto-rows: 5px; }
.dbars.two { grid-template-columns: 1fr .75fr; column-gap: 16px; row-gap: 6px; }
.dbars .ph { height: 5px; align-self: start; }
.scanband { display: none; position: absolute; left: 0; right: 0; height: 24px; top: -24px; background: linear-gradient(to bottom, rgba(107,63,160,0), rgba(107,63,160,.12)); border-bottom: 2px solid var(--purple); animation: scan 1.5s linear infinite; }
.doc.reading .scanband { display: block; }
.cap { font-size: 12px; color: var(--muted); margin-top: 14px; text-align: center; }
.rec { background: var(--card); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; }
.rec-in { padding: 18px 20px 6px; flex: 1; }
.rgroup { margin-bottom: 14px; }
.rgroup .label { display: block; margin-bottom: 6px; }
.rrow { display: grid; grid-template-columns: 130px 1fr; align-items: center; min-height: 24px; font-size: 13px; }
.rrow .k { color: var(--muted); }
.rrow .v { min-width: 0; }
.rrow .v .ph { width: 72%; }
.was { color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.was s { color: var(--muted); }
.rec-ft { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 12px 20px; min-height: 56px; font-size: 13px; color: var(--muted); }
.save { height: 30px; padding: 0 12px; border-radius: 6px; border: 0; font-size: 12px; font-weight: 600; background: var(--surface); color: var(--muted); }
.save.on { background: var(--purple); color: #fff; }
@media (max-width: 480px) { .rrow { grid-template-columns: 110px 1fr; font-size: 12.5px; } }

.glow { position: relative; }
.glow::before { content: ""; position: absolute; inset: 8% 6% -6%; background: radial-gradient(closest-side, rgba(107,63,160,.18), rgba(107,63,160,0)); filter: blur(30px); z-index: 0; }
.glow > * { position: relative; z-index: 1; }

/* ---- Assistant (home) ---- */
.wf-asst .chat { height: 452px; display: flex; flex-direction: column; background: #F5F1EA; }
.chat-msgs { flex: 1; padding: 16px 20px 12px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.bubble { align-self: flex-end; max-width: 88%; background: var(--ink); color: #fff; border-radius: 8px; padding: 9px 14px; font-size: 13.5px; }
.looking { display: inline-flex; align-items: center; gap: 8px; color: var(--purple); font-size: 13px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--purple); animation: pulse 1.4s ease-in-out infinite; }
.cert { background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.cert.in { animation: rise .5s ease both; }
.cert-hd { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.cert-rows { padding: 8px 16px; }
.cert-rows .rrow { grid-template-columns: 152px 1fr; font-size: 13px; }
.cert-ft { display: flex; justify-content: flex-end; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 8px 16px; min-height: 48px; }
.mini { height: 32px; padding: 0 12px; border-radius: 6px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); background: var(--card); }
.mini.main { background: var(--purple); color: #fff; border-color: var(--purple); transition: transform .2s, box-shadow .2s; }
.mini.main.press { transform: scale(.95); box-shadow: 0 0 0 4px var(--purple-soft2); }
.ok { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: 12.5px; font-weight: 600; }
.ok .i { width: 14px; height: 14px; }
.chat-in { margin: 0 20px 20px; height: 46px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 14px; font-size: 13.5px; }
.chat-in .hint { color: var(--muted); }
.chat-in .typed { white-space: nowrap; overflow: hidden; text-overflow: clip; }
.cursor { display: inline-block; width: 1px; height: 15px; background: var(--ink); vertical-align: -2px; margin-left: 1px; animation: blink 1s step-end infinite; }
.send { height: 28px; padding: 0 10px; border-radius: 5px; border: 0; background: var(--purple); color: #fff; font-size: 12px; font-weight: 600; }
@media (max-width: 480px) {
  .cert-rows .rrow { grid-template-columns: 120px 1fr; font-size: 12px; }
  .bubble { font-size: 12.5px; }
}

/* ---- Boards (sales, renewals) ---- */
.board { display: grid; gap: 12px; padding: 16px; background: #F5F1EA; }
.wf-sales .board { grid-template-columns: repeat(5, 1fr); min-height: 270px; }
.wf-renew .board { grid-template-columns: repeat(3, 1fr); min-height: 320px; }
.col { background: var(--surface); border-radius: 8px; padding: 12px 10px; display: flex; flex-direction: column; gap: 10px; }
.col-hd { display: flex; justify-content: space-between; padding: 2px 4px 4px; }
.col-hd .label { transition: color .3s; }
.col.on .col-hd .label:first-child { color: var(--purple); }
.bcard { background: rgba(255,253,249,.6); border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; font-size: 12px; color: var(--muted); }
.bcard b { display: block; font-size: 13px; font-weight: 600; color: #6F675B; margin-bottom: 6px; }
.bcard .row { display: flex; justify-content: space-between; gap: 8px; }
.bcard .row span:last-child { font-weight: 600; color: #6F675B; }
.bcard.hot { background: var(--card); border-color: var(--purple-line); box-shadow: 0 14px 30px -14px rgba(43,42,38,.3); color: var(--muted); animation: slidein .5s ease both; }
.bcard.hot b, .bcard.hot .row span:last-child { color: var(--ink); }
.bcard.hot.done { border-color: rgba(78,138,91,.55); }
.bcard .ev { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 9px; color: var(--ink); display: grid; gap: 6px; }
.bcard .ev .ai, .bcard .ev .ok { font-size: 12px; }
@media (max-width: 767px) {
  .wf-sales .board, .wf-renew .board { grid-template-columns: 1fr; min-height: 0; }
  .col .bcard:not(.hot) { display: none; }
  .col { gap: 8px; }
}

/* ---- Client record ---- */
.wf-client .cl-bd { display: grid; gap: 16px; padding: 20px; background: #F5F1EA; }
@media (min-width: 768px) { .wf-client .cl-bd { grid-template-columns: 1fr 1.4fr; } }
.pane { background: var(--card); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; }
.pane-in { padding: 16px; flex: 1; }
.pane .label { display: block; margin-bottom: 12px; }
.hh h5 { margin: 0 0 3px; font-size: 13px; font-weight: 600; }
.hh p { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.hh .grp { margin-bottom: 12px; min-height: 40px; }
.hh .ph { width: 85%; margin: 8px 0; }
.hh .ph.short { width: 65%; }
.pol { border: 1px dashed #D8D0C3; border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; font-size: 13px; }
.pol.full { border-style: solid; background: var(--surface); }
.pol .top { display: flex; justify-content: space-between; font-weight: 600; }
.pol .sub { color: var(--muted); margin-top: 6px; font-size: 12.5px; }
.pol .flag { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-top: 6px; }
.pol .flag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #D9601E; }
.pane-ft { border-top: 1px solid var(--line); min-height: 42px; padding: 0 16px; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }

/* ---- Service ticket and certificate request ---- */
.duo { display: grid; gap: 24px; }
@media (min-width: 1024px) { .duo { grid-template-columns: 1fr 1fr; } }
.wf-ticket .tk-bd { background: #F5F1EA; padding: 20px; min-height: 276px; }
.msg { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; font-size: 13.5px; display: grid; gap: 6px; }
.msg .ai { font-size: 12px; }
.tasks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.tasks li { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.tasks li.done { color: var(--ink); }
.circ { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #D8D0C3; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--card); }
.circ.cur { border-color: var(--purple); background: var(--purple-soft); }
.circ.ok { background: var(--success); border-color: var(--success); color: #fff; }
.circ.ok.pop { animation: rise .35s ease both; }
.circ .i { width: 10px; height: 10px; stroke-width: 3; }
.tk-ft { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; font-size: 12.5px; color: var(--muted); min-height: 34px; }
.wf-cert { background: var(--card); padding: 22px 20px; min-height: 326px; }
.wf-cert h4 { margin: 0; font-size: 15px; font-weight: 600; }
.wf-cert .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.prog { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 18px 0 16px; }
.prog .seg { height: 3px; border-radius: 2px; background: var(--line); transition: background .4s; }
.prog .seg.on { background: var(--purple); }
.prog.all .seg { background: var(--success); }
.prog .label { margin-top: 7px; display: block; }
.prog .cur .label { color: var(--ink); }
.evs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.evs li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.evs li .circ { margin-top: 1px; }
.evs li > div { display: grid; gap: 3px; }
.evs .ai { font-size: 12px; }

/* ---- Inbox ---- */
.wf-inbox .ib-bd { display: grid; gap: 16px; padding: 20px; background: #F5F1EA; min-height: 274px; }
@media (min-width: 768px) { .wf-inbox .ib-bd { grid-template-columns: 1fr 1.4fr; } }
.mails { display: grid; gap: 6px; align-content: start; }
.mail { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font-size: 12.5px; transition: background .3s, border-color .3s; }
.mail b { display: block; font-size: 13px; font-weight: 600; }
.mail span { color: var(--muted); }
.mail.picked { background: #EEE6EE; border-color: var(--purple-line); }
.ib-open { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; font-size: 13px; display: grid; gap: 10px; align-content: start; }
.ib-open h5 { margin: 0; font-size: 14px; font-weight: 600; }
.ib-open .from { color: var(--muted); font-size: 12px; margin-top: -6px; }
.ib-open .ai { min-height: 18px; font-size: 12px; }
.reply { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; min-height: 40px; padding: 10px 12px; font-size: 13px; color: var(--ink); }
.reply.empty { color: var(--muted); }
.reply-ft { display: flex; justify-content: flex-end; min-height: 30px; align-items: center; }
.send-reply { height: 30px; padding: 0 12px; border-radius: 6px; border: 0; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; }
.send-reply.on { background: var(--purple); color: #fff; }
@media (max-width: 767px) { .mails .mail:not(:first-child) { display: none; } }

/* ---- Reports ---- */
.wf-reports .rp-bd { background: #F5F1EA; padding: 20px; display: grid; gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 12px 12px; transition: opacity .4s; }
.tile .n { font-size: 17px; font-weight: 600; margin-top: 4px; }
.tile.dim { opacity: .35; }
.chart { background: var(--card); border: 1px solid var(--line); border-radius: 6px; height: 132px; padding: 12px 12px 12px; display: flex; align-items: flex-end; gap: 8px; }
.chart .bar { flex: 1; background: #9876B5; border-radius: 3px 3px 0 0; height: 2%; transition: height .9s cubic-bezier(.2,.7,.2,1); }
.ptable { width: 100%; border-collapse: collapse; font-size: 12.5px; transition: opacity .5s, transform .5s; }
.ptable.hide { opacity: 0; transform: translateY(8px); }
.ptable th { text-align: left; padding: 6px 0 8px; border-bottom: 1px solid var(--line); }
.ptable td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.ptable td:nth-child(2) { color: var(--muted); }
.up { color: var(--success); }
.down { color: var(--warning); }
@media (max-width: 480px) { .ptable th:nth-child(2), .ptable td:nth-child(2) { display: none; } }
/* Phones: reserve room so frames do not jump as values fill in. */
@media (max-width: 480px) {
  .wf-dec .rrow { min-height: 36px; }
  .reply { min-height: 74px; }
  .cert-rows .rrow { min-height: 22px; }
}
@media (max-width: 640px) {
  .wf-asst .chat { height: 580px; }
  .chat-msgs { justify-content: flex-end; padding: 16px; }
  .chat-in { margin: 0 16px 16px; }
}
