/* styles-v6.css — v5's chat styling, minus the rail. The content column runs
   full width, the header facts go to three columns, and the stage picker is a
   dropdown in the action row. */
@import url("styles-v5.css");

/* top bar scrolls away with the page; the hamburger is in it at every width,
   as in production */
.app-header{position:static}
.app-header__mobile{display:flex}
@media (min-width:992px){.app-header__mobile{display:none}}
.app-sidebar-mobile-toggle{padding:0 !important;display:grid;place-items:center;flex:0 0 35px}
.app-sidebar-mobile-toggle svg{flex:0 0 24px}
@media (min-width:992px){.app-header__mobile .h-30px{display:none}}
.app-header .app-header-menu{display:flex;align-items:center}
.app-header .app-header-menu h1{margin:0;font-size:1.25rem}
.app-header .app-navbar{align-items:center}

/* channel banner sits at the end of the thread, right above the composer */
.thread5__banner{margin:1.25rem 0 .75rem}

/* consumer edited their dossier after the match: one hue, used nowhere else,
   for "the file changed" — informational, warmer than the pipeline ramp,
   quieter than danger. Iterate here and every surface follows. */
:root{--upd:#b4761a;--upd-tint:#fdf5e8;--upd-line:#ecd6ac;--upd-ink:#7d5211}

/* thread system rows: a new opportunity reads warmer, a closed channel colder */
.sysrow--new span{background:rgba(0,174,239,.1);color:#0b6f95;font-weight:600}
.sysrow--ended span{background:var(--bs-danger-light,#fdf1f2);color:#a3363f;font-weight:600;display:inline-flex;align-items:center;gap:.4rem}

/* the update's permanent record: a divider, not a bubble — it never carries an
   avatar, a reply affordance or an unread count. Names the fields; the values
   live in Lead Details so there is only ever one source of truth. */
.updrow{display:flex;justify-content:center;padding:.35rem 0}
.updrow span{display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:.15rem .45rem;color:var(--kt-text-muted);font-size:.85rem;font-weight:500;text-align:center}
.updrow b{font-weight:600;margin-right:.1rem}
.updrow button{border:0;background:none;padding:0;font:inherit;font-weight:500;color:var(--kt-text-muted);text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.updrow button:hover{color:var(--bs-gray-900)}

/* the alert: shows on arrival, clears when the mover has been in the lead —
   the thread keeps the record, so nothing is lost by dismissing it */
.updbanner{display:flex;align-items:flex-start;gap:.6rem;background:var(--upd-tint);border:1px solid var(--upd-line);border-left:3px solid var(--upd);border-radius:.475rem;padding:.6rem .75rem;margin:0 0 .75rem;color:var(--upd-ink);font-size:.9rem}
.updbanner>i.bi{color:var(--upd);font-size:1rem;margin-top:.05rem}
.updbanner__col{display:flex;flex-direction:column;gap:.1rem;min-width:0}
.updbanner b{font-weight:700}
.updbanner__when{color:color-mix(in oklch,var(--upd-ink) 70%,#fff);font-size:.8rem}
.updbanner__acts{margin-left:auto;display:flex;align-items:center;gap:.35rem;flex:0 0 auto}
.updbanner__see{border:1px solid var(--upd-line);background:#fff;color:var(--upd-ink);font-weight:700;font-size:.8rem;padding:.28rem .6rem;border-radius:.375rem;cursor:pointer}
.updbanner__see:hover{border-color:var(--upd);color:var(--upd)}
.updbanner__x{border:0;background:none;color:var(--upd-ink);opacity:.65;padding:.2rem .3rem;line-height:1;cursor:pointer}
.updbanner__x:hover{opacity:1}
/* phone: the text gets the full width instead of being wrung out by the
   action buttons — dismiss pins to the corner, the action drops below */
@media (max-width:575.98px){
  .updbanner{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:.15rem .5rem;padding:.6rem 2rem .6rem .7rem}
  .updbanner>i.bi{grid-column:1;grid-row:1;margin-top:.15rem}
  .updbanner__col{grid-column:2;grid-row:1;gap:.1rem}
  .updbanner__acts{grid-column:2;grid-row:2;margin:.35rem 0 0;justify-content:flex-start}
  .updbanner__see{min-height:32px}
  .updbanner__x{position:absolute;top:.35rem;right:.3rem;padding:.4rem .45rem;font-size:.8rem}
}

/* the field itself carries the marker; the previous value is available but not
   competing — this is the one place old → new belongs */
.updfield{display:inline-flex;align-items:center;gap:.3rem;margin-left:.4rem;background:var(--upd-tint);border:1px solid var(--upd-line);color:var(--upd-ink);font-size:.65rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;padding:.05rem .35rem;border-radius:999px;vertical-align:.08em;cursor:default}
.updfield i.bi{font-size:.7rem;color:var(--upd)}
.updwas{display:block;font-size:.8rem;color:var(--kt-text-muted);margin-top:.1rem}
.updwas s{text-decoration-color:var(--bs-gray-400)}

/* identity row: name, two small actions, state tag as the closing bookend */
.leadbar__tag{order:9;margin-left:.35rem}
.leadbar__acts{flex:1 1 auto;display:flex;align-items:center;justify-content:flex-end;gap:.5rem;margin-left:.35rem}
.leadbar__acts .btn{font-size:.85rem;padding:.4rem .7rem;display:inline-flex;align-items:center;gap:.35rem}
.leadbar__acts .leadbar__wa,.leadbar__acts .leadbar__wa i.bi{background:#25d366;border-color:#25d366;color:#fff}
.leadbar__acts .leadbar__wa i.bi{background:none}
.leadbar__acts .leadbar__wa:hover{background:#1eb855;border-color:#1eb855;color:#fff}
.leadbar__locked{background:var(--bs-gray-100);color:var(--kt-text-muted);opacity:1;cursor:default}
.stagetrack{border-top:0}

/* last-seen signal in the identity row */
.leadbar__dot{margin:0 .4rem;color:var(--bs-gray-400)}
.leadbar__seen{cursor:default}

/* tabs sit the same distance from the top as from the sides (nav-link adds 8px) */
.card.new>.card-body{padding-top:1rem}

/* photos in the thread: small tiles, click to expand */
.shots{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.5rem}
.shot{width:92px;height:92px;padding:0;border:0;border-radius:.5rem;overflow:hidden;background:#e2e8f0;display:grid;place-items:center;color:#94a3b8;font-size:1.5rem;cursor:zoom-in}
.lightbox__frame{position:relative;height:min(70vh,560px);background:var(--bs-gray-100);display:grid;place-items:center;color:var(--bs-gray-400);font-size:3rem}
.lightbox__nav{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:50%;border:0;background:rgba(15,23,42,.55);color:#fff;font-size:1.1rem;display:grid;place-items:center}
.lightbox__nav:hover{background:rgba(15,23,42,.8)}
.lightbox__nav--prev{left:.75rem}
.lightbox__nav--next{right:.75rem}
.lightbox__count{flex:0 0 auto;font-size:.85rem;color:var(--kt-text-muted)}
.shot:hover{box-shadow:0 0 0 2px var(--bs-primary)}
.post__shotmeta{display:flex;justify-content:flex-end;margin-top:.35rem}
.lightbox{position:fixed;inset:0;z-index:1080;background:rgba(15,23,42,.7);display:flex;align-items:center;justify-content:center;padding:2rem}
.lightbox__body{background:#fff;border-radius:.75rem;overflow:hidden;max-width:min(880px,90vw);width:100%}
.lightbox__bar{display:flex;align-items:center;gap:.75rem;padding:.7rem .9rem;font-size:.85rem;color:var(--bs-gray-700)}
.lightbox__bar span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lightbox__bar .btn i{margin-right:.3rem}

.pagetop{display:flex;align-items:center;gap:.75rem;margin:1.5rem 0 .6rem}
.pagetop .backlink{margin:0}
.pagetop .tag{margin-left:auto}
.pagetop__alt{display:inline-flex;align-items:center;gap:.3rem;font-size:.85rem;font-weight:600;color:var(--bs-primary)}
.pagetop__alt i.bi{font-size:.75rem}
.pagetop__alt:hover{text-decoration:underline}
.backlink{display:inline-flex;align-items:center;gap:.3rem;margin:0 0 .6rem;font-size:.85rem;font-weight:600;color:var(--kt-text-muted)}
.backlink:hover{color:var(--bs-gray-900)}
.backlink i.bi{font-size:.75rem}
@media (max-width:767.98px){.backlink{margin:.75rem 0 .35rem}
/* phone: the reference takes its own line so both exits stay on one row at
   full tap size instead of being squeezed out by it */
.pagetop{margin:.75rem 0 .5rem;flex-wrap:wrap;gap:.15rem 1.1rem}
.pagetop .backlink{margin:0}
.pagetop .backlink,.pagetop__alt{min-height:44px}}

/* documents tab — every file the thread has carried, newest first */
.docs{list-style:none;margin:0;padding:.25rem 0 0}
.docs__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.upl{display:flex;align-items:center;gap:.9rem;border:1px dashed var(--bs-gray-300);border-radius:.7rem;padding:.85rem 1rem;margin-bottom:1.25rem}
.upl.is-over{border-color:var(--bs-primary);background:#f5f9fd}
.upl>i.bi{font-size:1.4rem;color:var(--kt-text-muted)}
.upl__col{display:flex;flex-direction:column;gap:.1rem;min-width:0;flex:1}
.upl__col strong{font-size:1rem;color:var(--bs-gray-900)}
.upl__col span{font-size:.85rem;color:var(--kt-text-muted)}
.upl .btn{flex:0 0 auto}
.doc{display:flex;align-items:center;gap:.875rem;padding:.875rem .25rem;border-bottom:1px solid var(--bs-gray-200)}
.doc:last-child{border-bottom:0}
.doc__icon{font-size:1.4rem;color:var(--kt-text-muted);flex:0 0 auto}
.doc__col{display:flex;flex-direction:column;gap:.15rem;min-width:0;flex:1}
.doc__name{font-weight:600;color:var(--bs-gray-900);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.doc__meta{font-size:.85rem;color:var(--kt-text-muted)}
.doc__acts{display:flex;align-items:center;gap:.5rem;flex:0 0 auto}
.doc__acts .btn i{margin-right:.35rem}
.doc__gone{font-size:.85rem;color:var(--kt-text-muted);padding:0 .35rem}
.docs--empty{display:flex;flex-direction:column;align-items:center;gap:.75rem;padding:3.5rem 1rem;text-align:center;color:var(--kt-text-muted)}
.docs--empty i{font-size:1.75rem;color:var(--bs-gray-400)}
.docs--empty p{margin:0;max-width:30rem}
.post--flash .post__bubble{animation:docflash 1.5s ease-out}
@keyframes docflash{0%,55%{box-shadow:0 0 0 3px rgba(0,174,239,.45)}100%{box-shadow:0 0 0 3px rgba(0,174,239,0)}}
@media (max-width:640px){.doc{flex-wrap:wrap}.doc__acts{width:100%;padding-left:2.3rem}.upl{flex-wrap:wrap}.upl .btn{width:100%;min-height:40px}}

/* full-width content column */
.row-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2rem}
.route__pin{width:9px;height:9px;border-radius:50%;display:inline-block}
.route__pin--a{background:var(--bs-primary)}
.route__pin--b{background:var(--highlight)}

/* identity + stage in one card */
.app-toolbar{padding:.75rem 0 !important}
.page-heading{display:none}
.leadcard{margin-bottom:1.25rem}
.leadbar{display:flex;align-items:center;gap:.85rem;padding:.85rem 1.5rem;margin-bottom:0}
.avatar.avatar-40{width:40px;height:40px;font-size:1rem}
.leadbar__ref{margin-left:.6rem;font-family:inherit;font-size:.85rem;font-weight:400;color:var(--kt-text-muted);white-space:nowrap}
.leadbar__id{flex:1 1 auto;min-width:0}
.leadbar__id h1{margin:0;font-size:1.25rem}
.leadbar__id p{margin:0;font-size:.85rem;color:var(--kt-text-muted)}

/* ── messages tab: thread + at-a-glance column ─────────── */
.thread5{display:grid;grid-template-columns:minmax(0,1fr);gap:0 2.5rem;align-items:start}
.thread5__head{grid-column:1/-1}
.thread5__main{min-width:0;position:relative}
/* desktop: the thread is a capped scroll region so the composer stays put.
   The chrome above it is tightened so the conversation gets the height. */
@media (min-width:768px){
  .leadbar{padding-bottom:.35rem}
  .nav.nav-line-tabs{margin-bottom:.5rem !important}
  .tab-content>.tab-pane{padding-top:0 !important}
  .thread5{padding-top:0}
  .thread5{align-items:stretch}
  .thread5__main{display:flex;flex-direction:column;max-height:calc(100dvh - 3rem);min-height:820px}
  .thread5__posts{flex:1 1 auto;min-height:0;overflow-y:auto;padding-right:.6rem;scrollbar-gutter:stable}
  .thread5__banner{flex:0 0 auto}
  /* composer is the floor of the column */
  .reply{flex:0 0 auto;position:sticky;bottom:0;background:#fff;padding-top:.75rem;border-top:1px solid var(--bs-border-color)}
  .glance{align-self:start;position:sticky;top:1rem}
}
/* jump to the newest message: anchored above the composer on desktop */
.jumpdown{position:relative;align-self:center;margin:.1rem 0 .6rem;z-index:20;flex:0 0 auto;display:inline-flex;align-items:center;gap:.35rem;height:34px;padding:0 .85rem;border-radius:20px;background:#fff;border:1px solid var(--bs-gray-300);box-shadow:0 4px 14px rgba(15,23,42,.14);font-size:.85rem;font-weight:600;color:var(--bs-gray-700)}
.jumpdown:hover{border-color:var(--bs-primary);color:var(--bs-primary)}
.jumpdown i.bi{font-size:.85rem}
.thread5__posts,.thread5__empty,.reply{max-width:76ch}
@media (min-width:1200px){
  .thread5--aside{grid-template-columns:minmax(0,1fr) 280px}
  .thread5--aside.thread5--shut{grid-template-columns:minmax(0,1fr) 34px}
  .thread5__posts,.thread5__empty,.reply{max-width:none}
}
.glance{border-left:1px solid var(--bs-border-color);padding-left:1.75rem}
.glance__head{display:flex;align-items:center;gap:.4rem;margin-bottom:.9rem}
.glance__title{font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--kt-text-muted)}
.glance__collapse{margin-left:auto;background:none;border:0;padding:.15rem .2rem;color:var(--bs-gray-400);font-size:.85rem;line-height:1}
.glance__collapse:hover{color:var(--bs-gray-700)}
.glancerail{align-self:stretch;display:flex;flex-direction:column;align-items:center;gap:.6rem;padding:.85rem .1rem;background:none;border:0;border-left:1px solid var(--bs-border-color);color:var(--kt-text-muted)}
.glancerail:hover{color:var(--bs-primary)}
.glancerail span{writing-mode:vertical-rl;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.glancerail i.bi{font-size:.85rem}
.glance__contact{display:flex;align-items:center;gap:.5rem;margin-bottom:.35rem}
.glance__phone{flex:1 1 auto;display:flex;align-items:center;gap:.5rem;height:36px;padding:0 .75rem;border-radius:.475rem;background:var(--bs-gray-100);color:var(--bs-gray-900);font-size:.95rem;font-weight:600}
.glance__phone:hover{background:var(--bs-gray-200);color:var(--bs-gray-900);text-decoration:none}
.glance__phone i.bi{font-size:1rem;color:var(--kt-text-muted)}
.glance__wa{flex:0 0 auto;width:36px;height:36px;border-radius:.475rem;display:grid;place-items:center;color:#0a7945;background:#e9f7ef;font-size:1.05rem}
.glance__wa:hover{background:#d8f0e2;color:#0a7945;text-decoration:none}
.glance__nophone{display:flex;gap:.45rem;align-items:flex-start;text-align:left;font-size:.85rem;line-height:1.5;color:var(--kt-text-muted);background:var(--bs-gray-100);border-radius:.475rem;padding:.55rem .65rem;margin-bottom:1.1rem}
.glance__nophone i.bi{color:var(--kt-text-muted);margin-top:.1rem}
.glance__num{display:flex;align-items:center;gap:.45rem;font-size:1rem;font-weight:600;color:var(--bs-gray-900);margin-bottom:.3rem}
.glance__num i.bi{font-size:.85rem;color:var(--kt-text-muted)}
.glance__num a{color:inherit}
.glance__num a:hover{color:var(--bs-primary)}
.glance__verified{display:inline-flex;align-items:center;gap:.25rem;font-size:.75rem;font-weight:600;color:#198754;margin-bottom:1.1rem}
.glance__route{display:flex;flex-direction:column;gap:.35rem;padding-bottom:1rem;border-bottom:1px solid var(--bs-gray-200);margin-bottom:1rem}
.glance__leg{display:flex;gap:.6rem;align-items:center}
.glance__leg .route__pin{margin-top:0;flex:0 0 auto}
.bflag{border-radius:2px;box-shadow:0 0 0 1px rgba(24,28,50,.08);flex:0 0 auto}
/* same chip as the lead list: 16×12 at 2px radius */
.glance__flag{width:16px;height:12px;border-radius:2px;object-fit:cover}
.glance__leg strong{font-size:.95rem;color:var(--bs-gray-900)}
.glance__facts{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.4rem .9rem;margin:0 0 1rem;padding-bottom:1rem;border-bottom:1px solid var(--bs-gray-200)}
.glance__facts dt{font-size:.75rem;font-weight:600;color:var(--kt-text-muted)}
.glance__facts dd{margin:0;font-size:.95rem;line-height:1.45;color:var(--bs-gray-800)}
.glance__remarks{padding-top:0}
.glance__label{font-size:.75rem;font-weight:600;color:var(--kt-text-muted);margin-bottom:.3rem}
.glance__remarks p{margin:0;font-size:.95rem;line-height:1.55;color:var(--bs-gray-700);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.glance__link{display:inline-flex;align-items:center;gap:.35rem;margin-top:1rem;font-size:.85rem;font-weight:700;color:var(--bs-primary)}
.glance__link:hover{text-decoration:underline}
.glance__link i.bi{font-size:.85rem}
/* activity log: note composer + inline annotation */
.updates__head{margin-bottom:1rem}
.notebox{border:1px solid var(--bs-gray-300);border-radius:.7rem;padding:.6rem .75rem;background:#fff;margin-bottom:1.5rem}
.notebox:focus-within{border-color:var(--bs-primary);box-shadow:0 0 0 .2rem rgba(64,115,158,.12)}
.notebox textarea{display:block;width:100%;border:0;background:none;resize:none;font:inherit;font-size:1rem;line-height:1.55;color:var(--bs-gray-900);padding:.15rem}
.notebox textarea:focus{outline:0}
.notebox__foot{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin-top:.5rem}
.notebox__stage{display:inline-flex;align-items:center;gap:.4rem;font-size:.85rem;color:var(--kt-text-muted)}
.notebox__stage select{font:inherit;font-size:.85rem;color:var(--bs-gray-800);border:1px solid var(--bs-gray-300);border-radius:.4rem;padding:.25rem 1.4rem .25rem .5rem;background:#fff}
.notebox__foot .btn{margin-left:auto}
.notebox--inline .notebox__foot{justify-content:flex-end;gap:.5rem}
.notebox--inline .notebox__foot .btn{margin-left:0}
.notebox--inline .notebox__foot .primary{order:2}
.notebox--inline{margin:.35rem 0 0}
.update--new{padding-bottom:1.25rem;border-bottom:1px solid var(--bs-gray-200)}
.updates__add{align-self:flex-start;display:inline-flex;align-items:center;gap:.4rem;background:none;border:1px dashed var(--bs-gray-300);border-radius:.5rem;padding:.5rem .85rem;font-size:.85rem;font-weight:600;color:var(--bs-primary)}
.updates__add:hover{border-color:var(--bs-primary);background:#f5f9fd}
.updates__add i.bi{font-size:.75rem}
.update--new .update__addnote{font-size:.85rem}
.update__addnote{display:inline-flex;align-items:center;gap:.35rem;margin-top:.15rem;background:none;border:0;padding:0;font-size:.85rem;font-weight:600;color:var(--bs-primary)}
.update__del{background:none;border:0;padding:.2rem .25rem;margin-left:.15rem;color:var(--bs-gray-400);font-size:.85rem;line-height:1;opacity:0;transition:opacity .12s,color .12s}
.update:hover .update__del,.update__del:focus-visible{opacity:1}
.update__del:hover{color:#d3305a}
.undobar{display:flex;align-items:center;gap:.75rem;background:var(--bs-gray-100);border-radius:.5rem;padding:.5rem .75rem;font-size:.95rem;color:var(--bs-gray-700)}
.undobar button{margin-left:auto;background:none;border:0;padding:0;font-size:.95rem;font-weight:700;color:var(--bs-primary)}
.undobar button:hover{text-decoration:underline}
.update__addnote:hover{text-decoration:underline}
.update__added{margin-left:.5rem;font-size:.75rem;color:var(--kt-text-muted)}

/* chat composer: one bar — attach, field, send */
.composer{display:flex;align-items:flex-end;gap:.35rem;border:1px solid var(--bs-gray-300);border-radius:1.4rem;padding:.3rem .4rem;background:#fff;transition:border-color .12s,box-shadow .12s}
.composer:focus-within{border-color:var(--bs-primary);box-shadow:0 0 0 .2rem rgba(64,115,158,.12)}
.composer__input{flex:1 1 auto;min-width:0;border:0;background:none;resize:none;font:inherit;font-size:.95rem;line-height:1.55;color:var(--bs-gray-900);padding:.5rem .25rem;max-height:160px}
.composer__input:focus{outline:0}
.composer__input::placeholder{color:var(--kt-text-muted)}
.composer__icon{flex:0 0 auto;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:var(--kt-text-muted);font-size:1.05rem}
.composer__icon:hover{background:var(--bs-gray-100);color:var(--bs-primary)}
.composer__send{flex:0 0 auto;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--highlight);color:#fff;font-size:1rem;transition:background .12s,opacity .12s}
.composer__send:hover:not(:disabled){background:var(--highlight-hover)}
.composer__send:disabled{background:var(--bs-gray-300);cursor:default}
.composer__hint{margin-top:.35rem;padding-right:.5rem;text-align:right;font-size:.75rem;color:var(--kt-text-muted)}

/* bubbles: consumer in brand rose, mover blue-tinted, timestamp inside.
   No avatars — the sender's name sits small inside the bubble instead. */
.post{max-width:82%;gap:0}
.post__avatar{display:none}
.post__who{display:block;font-size:.75rem;font-weight:600;color:var(--kt-text-muted);margin-bottom:.35rem;letter-spacing:.01em}
.post__bubble{background:#fdf2f7;border:1px solid #f6dae8;border-radius:1rem;border-top-left-radius:.35rem;padding:.7rem .95rem;max-width:100%}
.post--in .post__avatar{background:var(--highlight)}
.post--out .post__bubble{background:#eef4f9;border-color:#dae7f1;border-top-left-radius:1rem;border-top-right-radius:.35rem}
.post__meta{float:right;display:inline-flex;align-items:center;gap:.5rem;font-size:.75rem;color:var(--kt-text-muted);margin:.5rem 0 0 1rem;line-height:1}
.post__bubble::after{content:"";display:block;clear:both}
.post__body{display:block;overflow:hidden}
.post .erc-attachments{overflow:hidden}
.post .erc-attachments .post__meta{float:none;margin:0 0 0 auto;align-self:flex-end}
.post .erc-attachments{border-top-color:#f6dae8}
.post--out .erc-attachments{border-top-color:#dae7f1}

/* route map: on demand, not always on */
.routelink{display:inline-flex;align-items:center;gap:.4rem;background:none;border:0;padding:0;font-size:.85rem;font-weight:600;color:var(--bs-primary)}
.routelink:hover{text-decoration:underline}
.routelink i{font-size:1rem}
.glance__route .routelink{margin-top:.45rem}
.mapdlg{position:fixed;inset:0;z-index:1080;background:rgba(21,28,43,.55);display:flex;align-items:center;justify-content:center;padding:2.5rem}
.mapdlg__panel{background:#fff;border-radius:.75rem;width:min(920px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 60px rgba(21,28,43,.28)}
.mapdlg__head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1.25rem 1.5rem}
.mapdlg__title{font-size:1.05rem;font-weight:600;color:var(--bs-gray-900)}
.mapdlg__sub{font-size:.85rem;color:var(--kt-text-muted);margin-top:.15rem}
.mapdlg__close{background:none;border:0;color:var(--kt-text-muted);font-size:1rem;line-height:1;padding:.35rem}
.mapdlg__close:hover{color:var(--bs-gray-900)}
.mapdlg__canvas{height:min(520px,62vh);background:var(--bs-gray-200)}
@media (max-width:575.98px){.mapdlg{padding:0}.mapdlg__panel{border-radius:0;height:100%}.mapdlg__canvas{flex:1;height:auto}}

@media (max-width:1199.98px){
  .glance{border-left:0;border-top:1px solid var(--bs-border-color);padding-left:0;padding-top:1.5rem;margin-top:2rem}
  .glance__route,.glance__facts{max-width:56ch}
}

/* ── sales stage track ─────────────────────────────────── */
.stagetrack{display:flex;align-items:center;gap:1.25rem;padding:0 0 1.25rem;margin-bottom:.25rem;flex-wrap:wrap}
.btn-light-danger{background:#fdf1f4;color:#d3305a}
.btn-light-danger:hover{background:#fae0e7;color:#b52549}
.btn-light-danger:disabled{opacity:.45;cursor:default}
.btn-quiet{background:none;border:1px solid var(--bs-gray-300);color:var(--bs-gray-700)}
.btn-quiet:hover{background:var(--bs-gray-100);color:var(--bs-gray-900)}
.stagetrack__label{font-size:.85rem !important;font-weight:600 !important;color:var(--kt-text-muted) !important}
.track__node{width:20px;height:20px}
.track__step.is-on .track__node{border-width:6px}
.track__step::before{top:9px}
.track__text{font-size:.85rem}
.track__step>button,.track__step>div{gap:.3rem}
.stagetrack__label{flex:0 0 auto;font-size:1rem;font-weight:700;color:var(--bs-gray-800)}
.stagetrack.is-lost .track{opacity:.45}
.track{display:flex;align-items:flex-start;flex:1 1 420px;min-width:0;margin:0;padding:0;list-style:none;counter-reset:none}
.track__step{flex:1 1 0;min-width:0;position:relative}
/* the connector runs between node centres — from the previous step's centre
   (-50%) to this one's (+50%), under the nodes — and is hidden on the first
   step */
.track__step::before{content:"";position:absolute;top:11px;left:-50%;width:100%;height:2px;background:var(--bs-gray-300)}
.track__step:first-child::before{display:none}
.track__step.is-done::before,.track__step.is-on::before{background:var(--highlight)}
.track__step>button,.track__step>div{display:flex;flex-direction:column;align-items:center;gap:.45rem;width:100%;text-align:center;padding:0 .25rem}
.track__step>button:disabled{cursor:default}
.track__node{position:relative;z-index:2;width:24px;height:24px;border-radius:50%;background:#fff;border:2px solid var(--bs-gray-300);display:grid;place-items:center;font-size:.75rem;color:#fff;transition:border-color .12s,background .12s}
.track__step>button:hover:not(:disabled) .track__node{border-color:var(--highlight)}
.track__step.is-done .track__node{background:var(--highlight);border-color:var(--highlight)}
.track__step.is-on .track__node{border-color:var(--highlight);border-width:7px;background:#fff}
.track__text{font-size:.85rem;font-weight:600;color:var(--bs-gray-700);line-height:1.3}
.track__step.is-on .track__text{color:var(--highlight)}
.track__step--won .track__node{border-style:dashed;color:var(--bs-gray-400);background:var(--bs-gray-100)}
.track__step--won .track__node i.bi{color:var(--kt-text-muted);font-size:.75rem}
.track__step--won.is-on .track__node{background:#0f7a4b;border-color:#0f7a4b;border-style:solid}
.track__step--won.is-on .track__node i.bi{color:#fff}
.track__step--won.is-on::before{background:#0f7a4b}
.track__step--won.is-on .track__text{color:#0f7a4b}
.stagetrack__side{flex:0 0 auto;display:flex;align-items:center;gap:.5rem;margin-left:auto}
.stagetrack__act{font-size:.95rem;font-weight:700;color:var(--bs-primary)}
.stagetrack__act:hover{text-decoration:underline}
.stagetrack__act:disabled{opacity:.4;cursor:default;text-decoration:none}
.stagetrack__act--quiet{color:var(--kt-text-muted);font-weight:400}

/* ── status updates tab ────────────────────────────────── */
.updates__head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding-bottom:1.25rem;border-bottom:1px solid var(--bs-border-color);margin-bottom:1.5rem}
.updates__head h3{margin:0;font-size:1.15rem}
.updates__head p{margin:.2rem 0 0;font-size:.95rem;color:var(--kt-text-muted)}
.updates__list{display:flex;flex-direction:column;gap:1.5rem;max-width:82ch}
.update{display:flex;gap:.9rem}
.update__avatar{flex:0 0 auto;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-size:.85rem;font-weight:700;color:#fff;background:var(--bs-primary)}
.update__col{flex:1 1 auto;min-width:0}
/* the delete button sits in a fixed slot at the row's end, so the date lines
   up on every entry — reminders, which can't be deleted, included */
.update__meta{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin-bottom:.4rem;padding-right:1.75rem}
.update__meta .update__del{position:absolute;right:0;top:50%;transform:translateY(-50%);margin:0}
.update__who{font-size:1rem;font-weight:700;color:var(--bs-gray-900)}
.update__time{margin-left:auto;flex:0 0 auto;font-size:.85rem;color:var(--kt-text-muted)}
.update__col p{font-size:.95rem;line-height:1.65;color:var(--bs-gray-800)}

@media (max-width:1199.98px){
  .row-3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:991.98px){
  .row-3{grid-template-columns:minmax(0,1fr);gap:1.25rem}
  .card-body.row-3{gap:1.25rem}
}
@media (max-width:767.98px){
  .app-toolbar{display:none}
  .app-header .app-header-menu{min-width:0;flex:1 1 auto}
  .app-header .app-header-menu h1{display:none}
  .app-header__mobile{flex:0 0 auto}
  .app-navbar{flex:0 0 auto}
  .app-content{padding-bottom:0}
  .card.new>.card-body{padding:0 1rem 1rem}
  .leadcard{margin:.75rem 0 .75rem;border-radius:.75rem;overflow:hidden}
  .leadbar{padding:.75rem 1rem;gap:.7rem;align-items:flex-start}
  .leadbar__id h1{font-size:1.05rem;display:flex;flex-wrap:wrap;align-items:baseline;gap:0 .5rem}
  .leadbar__ref{margin-left:0}
  .leadbar__id p{font-size:.75rem;line-height:1.45}
  .leadbar__dot{display:none}
  .leadbar__recv{display:none}
  .leadbar__seen{display:block}
  .container-fluid{padding:0 1rem !important}
  .app-header{height:auto;min-height:60px}
  .app-header__inner{align-items:center}

  /* stage folds away — the conversation is what the mover came for */
  /* jump to the newest message / composer */
  .jumpdown--fixed{margin:0;align-self:auto;position:fixed;left:50%;transform:translateX(-50%);bottom:calc(5.5rem + env(safe-area-inset-bottom));z-index:20;display:inline-flex;align-items:center;gap:.35rem;height:34px;padding:0 .85rem;border:1px solid var(--bs-gray-300);border-radius:20px;background:#fff;color:var(--bs-gray-700);font-size:.85rem;font-weight:600;box-shadow:0 4px 14px rgba(15,23,42,.14)}
  .jumpdown i.bi{font-size:.85rem}

  .leadbar{flex-wrap:wrap}

  /* tabs: one scrollable row, always reachable */
  .nav.nav-line-tabs{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;margin:0 -1rem;padding:0 1rem;scroll-padding-inline:1rem}
  .nav.nav-line-tabs::after{content:"";flex:0 0 1rem}
  .nav.nav-line-tabs::-webkit-scrollbar{display:none}
  .nav.nav-line-tabs .nav-item{flex:0 0 auto}
  .nav.nav-line-tabs .nav-link{white-space:nowrap;min-height:46px}

  /* thread: glance facts first as a compact card, then the conversation */
  .thread5--phone{display:flex;flex-direction:column}
  /* phone: contact + status actions live with the name, not in the thread */
  .glance--phone{border:0;padding:0;margin:0 0 1rem}
  .glance--phone .glance__nophone{margin:.25rem 0 0}
  .leadbar__acts{width:100%;order:5;margin-left:0;flex-wrap:wrap;justify-content:flex-start}
  .leadbar__tag{order:4;margin-left:auto}
  .leadbar__acts .btn{flex:1 1 30%;min-height:40px;display:flex;align-items:center;justify-content:center;gap:.35rem;font-size:.85rem}
  .leadbar__acts .leadbar__wa{flex:0 0 40px;padding:0;font-size:1rem}
  .btn-light-success{background:#e9f7ef;color:#0a7945}
  .btn-light-success:hover{background:#d8f0e2;color:#0a7945}

  /* bubbles get the width; avatars go */
  .post{max-width:92%;gap:0}
  .post__avatar{display:none}
  .post__body{font-size:.95rem}
  .post__bubble{padding:.65rem .8rem}
  .thread5__posts{gap:.85rem}

  /* composer pinned to the bottom of the viewport */
  .reply{position:sticky;bottom:0;margin-top:1rem;padding:.5rem 1rem calc(.5rem + env(safe-area-inset-bottom));margin-left:-1rem;margin-right:-1rem;background:#fff;border-top:1px solid var(--bs-border-color);z-index:10}
  .reply--locked{position:static;margin:1rem -1rem 0}
  .composer{border-radius:1.5rem}
  .composer__input{font-size:16px;padding:.6rem .3rem}
  .composer__icon,.composer__send{width:40px;height:40px}
  .composer__hint{display:none}
  .thread5__banner{margin:1rem 0 .25rem;font-size:.95rem}

  /* documents + activity: comfortable targets */
  .doc{padding:.85rem .1rem}
  .doc__acts .btn{min-height:40px}
  .notebox textarea{font-size:16px}
  .notebox__stage select{min-height:40px;font-size:.95rem}
  .updates__list{gap:1.25rem}

  .stagetrack{gap:1rem;padding:.25rem 0 1rem}
  .track{flex:1 1 100%;flex-direction:column;align-items:stretch;gap:.1rem}
  /* vertical track: previous node centre to this one, through the 20px node's middle */
  .track__step::before{top:-50%;left:9px;width:2px;height:100%}
  .track__step>button,.track__step>div{flex-direction:row;align-items:center;gap:.7rem;text-align:left;padding:.45rem 0;min-height:44px}
  .stagetrack__side{margin-left:0;width:100%;justify-content:space-between}
  .update__time{margin-left:0}
  .update__del{opacity:1;padding:.35rem;font-size:1rem}
}
@media (max-width:400px){
  .glance--phone .glance__phone{font-size:1rem}
  .doc__name{font-size:1rem}
}

/* stage picker — same inline status dropdown as the inbox overview */
.stagepick{position:relative;display:inline-flex}
.stagepick__btn{display:inline-flex;align-items:center;gap:.4rem}
.stagepick__btn--fixed{cursor:default}
.stagepick__k{font-weight:700;font-size:.75rem;text-transform:uppercase;letter-spacing:.04em}
.stagepick__btn i.bi{font-size:.75rem;opacity:.85;margin:0}
.stagepick__menu{position:absolute;z-index:60;top:calc(100% + 6px);right:0;min-width:14rem;background:#fff;border:1px solid var(--bs-gray-200);border-radius:.6rem;box-shadow:0 12px 32px rgba(15,23,42,.16);padding:.3rem;display:flex;flex-direction:column}
.stagepick__opt{display:flex;flex-direction:column;gap:.05rem;text-align:left;background:none;border:0;padding:.42rem .55rem;border-radius:.45rem}
.stagepick__opt:hover,.stagepick__opt.on{background:var(--bs-gray-100)}
.stagepick__lab{display:flex;align-items:center;justify-content:space-between;gap:.5rem;font-size:.85rem;font-weight:600;color:var(--bs-gray-900)}
.stagepick__lab i.bi{color:var(--bs-primary)}
.stagepick__hint{font-size:.75rem;color:var(--kt-text-muted)}

/* mover-declared win, consumer not yet confirmed — a waiting state, not a win */
.track__step.is-pending>button{cursor:pointer}
.track__step.is-pending .track__node{background:#fff;border-style:dashed}
.track__pending,.stagepick__pending{font-style:normal;font-weight:400;font-size:.75rem}
.track__pending{display:block;color:var(--kt-text-muted)}
.stagepick__pending{margin-left:-.1rem}

/* ── lead details: production layout ───────────────────────────────────────
   Lifted from requests/show.blade.php — blue form-label over value, the move
   on the left, volume calculator on the right, answers full-width below.
   Update markers hang off the labels; nothing else is re-styled. */
.details__grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.5rem 3rem;align-items:start}
.details .form-label{display:flex;align-items:center;flex-wrap:wrap;gap:.35rem;margin-bottom:.5rem;font-size:1.05rem;font-weight:600;color:#40739E}
.details p{margin:0 0 1.5rem;font-size:.95rem}
.details p:last-child{margin-bottom:0}
.details__rest{margin-top:1.5rem}
.details .badge.bg-light{color:var(--bs-gray-900)!important;font-weight:600}
.details__route{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .75rem;margin-top:1.5rem}
/* Metronic extends Bootstrap's spacing scale past 5; the blade markup uses
   6/7, which Bootstrap alone doesn't resolve. Values from style.bundle.css. */
.details .mb-6{margin-bottom:1.5rem!important}
.details .mb-7{margin-bottom:1.75rem!important}
.details .mb-3{margin-bottom:1rem!important}
.details .ms-3{margin-left:.75rem}
.details a.d-block{display:block}
.details__km{font-size:.9rem;color:var(--kt-text-muted)}
.details__phone{font-weight:600}
.lang-translation small{font-size:.8rem;margin-top:.35rem}
.details__locked{display:inline-flex;align-items:center;gap:.4rem;color:var(--kt-text-muted)}
.details__locked i.bi{font-size:.8rem}

/* tooltip: the explanation lives beside the field it explains */
.infotip{position:relative;display:inline-flex;margin-left:.3rem;vertical-align:baseline}
.infotip__btn{background:none;border:0;padding:0;line-height:1;color:var(--kt-text-muted);cursor:help}
.infotip__btn:hover,.infotip__btn:focus-visible{color:var(--bs-primary)}
.infotip__btn i.bi{font-size:.85rem}
.infotip__bubble{position:absolute;z-index:70;left:-.5rem;top:calc(100% + 8px);width:19rem;max-width:min(19rem,70vw);background:var(--bs-gray-900,#1e1e2d);color:#fff;font-size:.8rem;font-weight:400;line-height:1.45;text-transform:none;letter-spacing:0;padding:.5rem .65rem;border-radius:.45rem;box-shadow:0 10px 26px rgba(15,23,42,.24);opacity:0;visibility:hidden;transition:opacity .12s}
.infotip__btn:hover+.infotip__bubble,.infotip__btn:focus-visible+.infotip__bubble{opacity:1;visibility:visible}

/* volume calculator */
.vol__head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.5rem}
.vol__all{background:none;border:0;padding:0;font-size:.85rem;font-weight:600;color:var(--bs-primary)}
.vol__all:hover{text-decoration:underline}
.vol__rooms{border-top:1px solid var(--bs-gray-200)}
.vol__room{border-bottom:1px solid var(--bs-gray-200)}
.vol__row{width:100%;display:flex;align-items:center;gap:.75rem;background:none;border:0;padding:.7rem .25rem;text-align:left}
.vol__row:hover{background:var(--bs-gray-100)}
.vol__name{flex:1 1 auto;font-size:.95rem;font-weight:600;color:var(--bs-gray-900)}
.vol__sub{font-size:.85rem;color:var(--kt-text-muted)}
.vol__row i.bi{font-size:.75rem;color:var(--kt-text-muted)}
.vol__items{list-style:none;margin:0;padding:0 .25rem .6rem}
.vol__items li{display:flex;align-items:baseline;gap:.6rem;padding:.2rem 0;font-size:.85rem}
.vol__qty{min-width:2rem;color:var(--kt-text-muted)}
.vol__items li>span:nth-child(2){flex:1 1 auto}
.vol__m3{color:var(--kt-text-muted);white-space:nowrap}
.vol__total{display:flex;flex-wrap:wrap;gap:.35rem 2rem;padding:.85rem .25rem 0;font-size:.85rem;color:var(--kt-text-muted)}
.vol__total strong{display:block;font-size:1.05rem;color:var(--bs-gray-900)}
@media (max-width:991.98px){.details__grid{grid-template-columns:minmax(0,1fr);gap:1.5rem}}

/* demo only: the design tool opened Tweaks from its own chrome; in the demo a
   small floating button does it instead */
.tweaks-toggle{position:fixed;right:1.5rem;bottom:1.5rem;z-index:99;display:inline-flex;align-items:center;gap:.4rem;padding:.5rem .85rem;border-radius:20px;background:#fff;border:1px solid var(--bs-border-color);box-shadow:0 10px 30px -10px rgba(76,87,125,.35);font-size:.8rem;font-weight:700;color:var(--bs-gray-700)}
.tweaks-toggle:hover{color:var(--highlight);border-color:var(--highlight)}
