/* TERROIRS VIVANTS — BETA: compact and readable order-detail actions.
   Left = editing/documents, right = next step / secondary actions. */
body #app .shell .main .tev-hierarchy-actions{
  display:block!important;box-sizing:border-box!important;
  width:100%!important;max-width:100%!important;
  padding:12px 0 0!important;margin:12px 0 0!important;
  border-top:1px solid var(--tev-border,#e6dfe2)!important;
  overflow:visible!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-hierarchy-actions-inner{
  display:flex!important;flex-direction:row!important;
  flex-wrap:nowrap!important;align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;width:100%!important;max-width:100%!important;min-width:0!important;
  margin:0!important;padding:0!important;
  white-space:normal!important;overflow:visible!important;
}
body #app .shell .main .tev-hierarchy-actions :is(.tev-h-utilities,.tev-h-workflow){
  display:flex!important;flex:0 1 auto!important;align-items:center!important;
  flex-wrap:wrap!important;gap:5px!important;min-width:0!important;
  width:auto!important;max-width:100%!important;margin:0!important;padding:0!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-workflow{
  margin-left:auto!important;justify-content:flex-end!important;
}
body #app .shell .main .tev-hierarchy-actions :is(.tev-h-modifier,.tev-h-primary,.tev-h-action-menu){
  display:inline-flex!important;flex:0 0 auto!important;
  align-items:center!important;justify-content:center!important;
  min-width:0!important;max-width:100%!important;
  width:auto!important;height:auto!important;margin:0!important;padding:0!important;
  border:0!important;background:transparent!important;box-shadow:none!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-action-menu{position:relative!important}
body #app .shell .main .tev-hierarchy-actions :is(.tev-h-modifier,.tev-h-primary)>.btn,
body #app .shell .main .tev-hierarchy-actions .tev-h-primary>.tev-invoice-actions>.btn,
body #app .shell .main .tev-hierarchy-actions .tev-h-action-menu>.tev-h-action-trigger{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  gap:7px!important;flex:0 0 auto!important;
  box-sizing:border-box!important;width:auto!important;min-width:0!important;
  height:36px!important;min-height:36px!important;
  padding:7px 12px!important;margin:0!important;
  border:1px solid #dbd1d9!important;border-radius:10px!important;
  background:#fff!important;color:#4a123f!important;
  box-shadow:none!important;transform:none!important;
  white-space:nowrap!important;text-align:center!important;
  line-height:1.15!important;font-size:11px!important;font-weight:650!important;
  letter-spacing:0!important;cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-modifier>.btn{
  color:#564652!important;border-color:#e0d8de!important;background:#fbfafb!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-modifier>.btn:hover,
body #app .shell .main .tev-hierarchy-actions .tev-h-documents>.tev-h-action-trigger:hover{
  background:#f4eef2!important;border-color:#c5b5c0!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-primary>.btn,
body #app .shell .main .tev-hierarchy-actions .tev-h-primary>.tev-invoice-actions>.btn,
body #app .shell .main .tev-hierarchy-actions .tev-h-primary>.tev-h-action-menu>.tev-h-action-trigger{
  background:#493494!important;border-color:#493494!important;color:#fff!important;
  font-weight:750!important;padding:7px 15px!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-primary>.btn:hover,
body #app .shell .main .tev-hierarchy-actions .tev-h-primary>.tev-h-invoice-actions>.btn:hover,
body #app .shell .main .tev-hierarchy-actions .tev-h-primary>.tev-h-action-menu>.tev-h-action-trigger:hover{
  background:#38267d!important;border-color:#38267d!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-more>.tev-h-action-trigger{
  border-color:#e0d8de!important;background:#f8f5f7!important;color:#5d4758!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-more>.tev-h-action-trigger:hover{
  background:#f0eaf0!important;
}
.tev-hierarchy-actions .tev-h-icon{
  display:inline-block;flex:0 0 15px;width:15px;height:15px;
  vertical-align:middle;
}
.tev-hierarchy-actions .tev-h-icon-chevron{
  width:11px;height:11px;flex-basis:11px;opacity:.65;
  transition:transform .16s ease;
}
.tev-hierarchy-actions .tev-h-menu-open>.tev-h-action-trigger .tev-h-icon-chevron{transform:rotate(180deg)}
/* Closed panels never contribute to the layout, regardless of generic app CSS. */
body #app .shell .main .tev-hierarchy-actions .tev-h-action-menu>.tev-h-action-popover[hidden]{
  display:none!important;visibility:hidden!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-action-menu>.tev-h-action-popover:not([hidden]){
  position:fixed!important;
  top:var(--tev-h-popup-top,180px)!important;
  left:var(--tev-h-popup-left,16px)!important;
  bottom:auto!important;right:auto!important;
  z-index:40000!important;isolation:isolate;
  box-sizing:border-box!important;
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  width:var(--tev-h-popup-width,244px)!important;min-width:0!important;
  max-width:calc(100vw - 24px)!important;
  max-height:min(58vh,340px)!important;overflow-x:hidden!important;overflow-y:auto!important;
  gap:1px!important;padding:6px!important;margin:0!important;
  border:1px solid #e4dce2!important;border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 10px 27px rgba(41,26,38,.15),0 2px 5px rgba(41,26,38,.04)!important;
  white-space:normal!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-action-popover button.btn{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  box-sizing:border-box!important;flex:0 0 auto!important;
  gap:9px!important;width:100%!important;max-width:100%!important;
  min-width:0!important;min-height:36px!important;height:auto!important;
  padding:8px 10px!important;margin:0!important;
  border:0!important;border-radius:8px!important;
  color:#453942!important;background:transparent!important;
  text-align:left!important;white-space:normal!important;
  font-size:11px!important;line-height:1.3!important;font-weight:600!important;
  letter-spacing:0!important;transform:none!important;box-shadow:none!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-action-popover button.btn:hover{
  color:#4a123f!important;background:#f6f1f5!important;
}
.tev-hierarchy-actions .tev-h-action-popover .tev-h-doc-item .tev-h-icon{
  flex:0 0 16px;width:16px;height:16px;color:#785c72;
}
.tev-hierarchy-actions .tev-h-action-popover .tev-h-doc-item>span{
  flex:1;min-width:0;text-align:left;
}
.tev-hierarchy-actions .tev-h-action-popover .tev-h-doc-item>small{
  flex:0 0 auto;align-self:center;
  font-size:9px;font-weight:700;color:#8b7b88;
  padding:2px 5px;background:#f4f1f3;border-radius:4px;
}
.tev-hierarchy-actions .tev-h-proforma-entry .tev-h-proforma-copy{
  display:flex;min-width:0;flex:1;flex-direction:column;gap:2px;align-items:flex-start;
  text-align:left!important;
}
.tev-hierarchy-actions .tev-h-proforma-entry strong{
  font-size:11px;font-weight:650;color:#4a123f;
}
.tev-hierarchy-actions .tev-h-proforma-entry small{
  font-size:9px;font-weight:400;color:#897b85;text-align:left!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-proforma-entry.btn{
  background:#f8f5f7!important;min-height:47px!important;
}
.tev-hierarchy-actions .tev-h-domain-docs{
  display:flex;flex-direction:column;gap:1px;padding-bottom:5px;margin-bottom:5px;
  border-bottom:1px solid #f1ebef;
}
.tev-hierarchy-actions .tev-h-domain-heading{
  display:block;padding:6px 9px 3px;
  font-size:9px;font-weight:700;color:#84717f;letter-spacing:.02em;
}
.tev-hierarchy-actions .tev-h-action-danger{
  display:flex;flex-direction:column;gap:1px;
  border-top:1px solid #efe6e8;padding-top:5px;margin-top:5px;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-action-danger>button.btn{
  background:#fff8f8!important;color:#a52d39!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-action-danger>button.btn:hover{
  background:#ffeff0!important;
}
.tev-hierarchy-actions .tev-h-action-popover .tev-invoice-actions{
  display:flex!important;flex-direction:column;gap:1px;min-width:0;
}
.tev-hierarchy-actions .tev-h-action-popover .pill{
  margin:5px 8px;align-self:flex-start;
}
.tev-hierarchy-actions .tev-h-primary>.tev-invoice-actions{
  display:inline-flex;align-items:center;gap:5px;
}
body #app .shell .main .tev-hierarchy-actions .btn:focus-visible{
  outline:2px solid #a477a0!important;outline-offset:2px!important;
}
@media(max-width:760px){
  body #app .shell .main .tev-hierarchy-actions .tev-hierarchy-actions-inner{
    flex-wrap:wrap!important;gap:7px!important;
  }
  body #app .shell .main .tev-hierarchy-actions .tev-h-utilities,
  body #app .shell .main .tev-hierarchy-actions .tev-h-workflow{
    flex:1 1 auto!important;
  }
  body #app .shell .main .tev-hierarchy-actions .tev-h-workflow{
    justify-content:flex-end!important;
  }
  body #app .shell .main .tev-hierarchy-actions :is(.tev-h-modifier,.tev-h-primary)>.btn,
  body #app .shell .main .tev-hierarchy-actions .tev-h-action-menu>.tev-h-action-trigger{
    height:35px!important;min-height:35px!important;padding:7px 10px!important;
  }
}

/* BETA: consistent uppercase labels on every toolbar and dropdown button. */
body #app .shell .main .tev-hierarchy-actions button,
body #app .shell .main .tev-hierarchy-actions button :is(span,strong,small) {
  text-transform:uppercase!important;
}

/* BETA: STATUT has exactly three clear choices, with unavailable actions disabled. */
body #app .shell .main .tev-hierarchy-actions .tev-h-more>.tev-h-action-trigger {
  background:#f4f0f3!important;border-color:#d7c9d3!important;
  color:#4a123f!important;font-weight:750!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-action-popover .tev-h-status-disabled:disabled {
  color:#a69ba4!important;background:transparent!important;
  cursor:not-allowed!important;opacity:.65!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-action-popover .tev-h-status-disabled:disabled:hover {
  background:transparent!important;color:#a69ba4!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-action-popover .tev-h-status-unprocess {
  color:#493494!important;
}
body #app .shell .main .tev-hierarchy-actions .tev-h-action-popover .tev-h-status-delete:not(:disabled) {
  color:#a52d39!important;background:#fff7f8!important;
}

/* Keep the administrative order status distinct from the invoice state. */
body #app .shell .main .tev-order-screen-status{
  display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:7px;
}
body #app .shell .main .tev-order-screen-status .tev-invoice-status-pill{
  font-size:10px!important;white-space:nowrap;
}
