/* ===== Sales & purchase runtime dialogs: round 2 exact currency-management spirit ===== */
.sales-purchase-runtime-backdrop{
  position:fixed;
  inset:0;
  z-index:2860;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  background:transparent !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

.sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog{
  position:relative;
  width:min(566px, 92vw);
  max-width:92vw;
  max-height:min(82vh, 882px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:10px;
  border:1px solid rgba(47,103,243,.94);
  background:#2f67f3;
  box-shadow:0 34px 88px rgba(15,23,42,.28), 0 0 0 1px rgba(96,165,250,.18);
  isolation:isolate;
  opacity:1;
  transform:none;
}

.sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog.is-maximized{
  width:min(760px, 96vw);
}

.sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog::before,
.sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog::after{
  content:none !important;
}

.sales-purchase-runtime-dialog__head{
  min-height:32px;
  padding:0 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  z-index:2;
  border-radius:10px 10px 0 0;
  border-bottom:1px solid rgba(255,255,255,.14);
  background:var(--window-head-chrome, linear-gradient(90deg, #6998ff, #2457dd));
  box-shadow:none;
}

.sales-purchase-runtime-dialog__window-actions{
  position:absolute;
  inset-inline-start:8px;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  gap:6px;
}

.sales-purchase-runtime-dialog__heading{
  width:100%;
  max-width:calc(100% - 88px);
  margin:0 auto;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}

.sales-purchase-runtime-dialog__title{
  margin:0;
  font:700 14.6px/1.1 var(--taif-font-family);
  color:#fff;
  letter-spacing:.01em;
  text-shadow:0 1px 2px rgba(2,6,23,.22);
}

.sales-purchase-runtime-dialog__chrome-btn{
  width:31px;
  height:31px;
  border:none;
  border-radius:10px;
  display:grid;
  place-items:center;
  padding:0;
  color:#fff;
  cursor:pointer;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:none;
  transition:filter .18s ease, transform .18s ease, background .18s ease;
}

.sales-purchase-runtime-dialog__chrome-btn svg{
  width:14px;
  height:14px;
}

.sales-purchase-runtime-dialog__chrome-btn:is(:hover, :focus, :focus-visible){
  outline:none;
  filter:brightness(1.05);
  transform:translateY(-1px);
}

.sales-purchase-runtime-dialog__chrome-btn:active{
  transform:translateY(0);
}

.sales-purchase-runtime-dialog__close{
  background:linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color:rgba(255,255,255,.16);
}

.sales-purchase-runtime-dialog__body{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  gap:11px;
  padding:12px 13px 13px;
  background:linear-gradient(180deg, rgba(244,248,255,.99), rgba(248,251,255,.98));
}

.sales-purchase-runtime-dialog__subtitle-block{
  margin:0;
  text-align:center;
  color:#5b6f88;
  font:700 12.1px/1.65 var(--taif-font-family);
}

.sales-purchase-runtime-dialog__record-card{
  display:flex;
  flex-direction:column;
  gap:9px;
  padding:12px 14px;
  border-radius:9px;
  border:1px solid rgba(186,210,255,.95);
  background:linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,250,255,.96));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.92);
}

.sales-purchase-runtime-dialog__record-badges{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  flex-wrap:wrap;
}

.sales-purchase-runtime-dialog__badge{
  min-height:33px;
  padding:0 16px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
  font:700 11.5px/1 var(--taif-font-family);
}

.sales-purchase-runtime-dialog__badge--type{
  background:rgba(59,130,246,.08);
  color:#2563eb;
  border:1px solid rgba(147,197,253,.8);
}

.sales-purchase-runtime-dialog__badge--mono{
  background:rgba(255,255,255,.98);
  color:#253142;
  border:1px solid rgba(203,213,225,.92);
  letter-spacing:.02em;
}

.sales-purchase-runtime-dialog__record-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px 14px;
  flex-wrap:wrap;
  color:#425168;
  font:700 12.8px/1.6 var(--taif-font-family);
}

.sales-purchase-runtime-dialog__record-meta strong{
  color:#1f2937;
}

.sales-purchase-runtime-dialog__message,
.sales-purchase-runtime-dialog__warning{
  margin:0;
  text-align:center;
  border-radius:9px;
  padding:14px 16px;
  font:700 14px/1.8 var(--taif-font-family);
}

.sales-purchase-runtime-dialog__message{
  border:1px solid rgba(191,219,254,.86);
  background:rgba(255,255,255,.88);
  color:#1f2937;
}

.sales-purchase-runtime-dialog__warning{
  border:1px solid rgba(239,68,68,.18);
  background:rgba(254,242,242,.92);
  color:#991b1b;
}

.sales-purchase-runtime-dialog__actions{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:6px;
  direction:ltr;
}

.sales-purchase-runtime-dialog--success .sales-purchase-runtime-dialog__actions{
  grid-template-columns:minmax(0, 1fr);
}

.sales-purchase-runtime-dialog .entries-action-btn.sales-purchase-runtime-dialog__action-btn{
  min-height:42px;
  border-radius:9px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 16px;
  border:1px solid rgba(203,213,225,.92);
  background:linear-gradient(180deg, rgba(255,255,255,.99), rgba(241,245,249,.95));
  color:#334155;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.92);
  font:800 13.8px/1 var(--taif-font-family);
}

.sales-purchase-runtime-dialog .sales-purchase-runtime-dialog__action-icon{
  width:16px;
  height:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}

.sales-purchase-runtime-dialog .sales-purchase-runtime-dialog__action-icon svg{
  width:16px;
  height:16px;
  display:block;
}

.sales-purchase-runtime-dialog .entries-action-btn.sales-purchase-runtime-dialog__action-btn .taif-control-text{
  color:inherit !important;
}

.sales-purchase-runtime-dialog .entries-action-btn.sales-purchase-runtime-dialog__action-btn[data-sales-purchase-dialog-role="cancel"],
.sales-purchase-runtime-dialog .entries-action-btn.sales-purchase-runtime-dialog__action-btn.entries-action-btn--ghost{
  border-color:rgba(203,213,225,.92);
  background:linear-gradient(180deg, rgba(255,255,255,.99), rgba(241,245,249,.95));
  color:#334155;
}

.sales-purchase-runtime-dialog .entries-action-btn.sales-purchase-runtime-dialog__action-btn.entries-action-btn--danger{
  border-color:rgba(248,113,113,.4);
  background:linear-gradient(180deg, #ff4d4f 0%, #dc2626 100%);
  color:#fff;
  box-shadow:0 12px 24px rgba(185,28,28,.16), inset 0 1px 0 rgba(255,255,255,.18);
}

.sales-purchase-runtime-dialog .entries-action-btn.sales-purchase-runtime-dialog__action-btn.entries-action-btn--success{
  border-color:rgba(34,197,94,.34);
  background:linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color:#fff;
  box-shadow:0 12px 24px rgba(22,163,74,.16), inset 0 1px 0 rgba(255,255,255,.18);
}

.sales-purchase-runtime-dialog .entries-action-btn.sales-purchase-runtime-dialog__action-btn:is(:hover, :focus, :focus-visible):not([disabled]){
  outline:none;
  filter:brightness(1.02);
}

@media (max-width: 640px){
  .sales-purchase-runtime-backdrop{
    padding:10px;
  }

  .sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog{
    width:min(100%, calc(100vw - 10px));
  }

  .sales-purchase-runtime-dialog__record-meta{
    flex-direction:column;
    align-items:flex-start;
  }

  .sales-purchase-runtime-dialog__actions{
    grid-template-columns:1fr;
  }
}

/* ===== Sales & purchase runtime dialogs: round 3 final alignment to currency-management modal ===== */
.sales-purchase-runtime-backdrop{
  background:transparent !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  filter:none !important;
  padding:12px !important;
}

.sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog{
  gap:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  border-radius:10px !important;
  border:1px solid rgba(47,103,243,.95) !important;
  background:#fff !important;
  color:#0f172a !important;
  box-shadow:0 24px 44px rgba(15,23,42,.14) !important;
}

.sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog.sales-purchase-runtime-dialog--confirm{
  width:min(568px, calc(100vw - 24px)) !important;
}

.sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog.sales-purchase-runtime-dialog--success{
  width:min(460px, calc(100vw - 24px)) !important;
}

.sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog.is-maximized{
  width:min(760px, 96vw) !important;
}

.sales-purchase-runtime-dialog__head{
  min-height:37px !important;
  padding:0 10px !important;
  border-radius:10px 10px 0 0 !important;
  border-bottom:1px solid rgba(191,219,254,.9) !important;
  background:var(--window-head-chrome, linear-gradient(90deg, #6998ff, #2457dd)) !important;
  box-shadow:none !important;
}

.sales-purchase-runtime-dialog__window-actions{
  inset-inline-start:9px !important;
  gap:6px !important;
}

.sales-purchase-runtime-dialog__heading{
  max-width:calc(100% - 96px) !important;
}

.sales-purchase-runtime-dialog__title{
  font-size:13.8px !important;
  font-weight:800 !important;
  line-height:1.05 !important;
  color:#fff !important;
  text-shadow:none !important;
}

.sales-purchase-runtime-dialog__chrome-btn{
  width:30px !important;
  height:30px !important;
  border-radius:9px !important;
  background:rgba(255,255,255,.16) !important;
  border:1px solid rgba(255,255,255,.15) !important;
  color:#fff !important;
  box-shadow:none !important;
}

.sales-purchase-runtime-dialog__close{
  background:linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.sales-purchase-runtime-dialog__chrome-btn svg{
  width:14px !important;
  height:14px !important;
}

.sales-purchase-runtime-dialog__body{
  padding:9px 14px 11px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
  background:linear-gradient(180deg, rgba(255,255,255,.995), rgba(248,251,255,.985)) !important;
}

.sales-purchase-runtime-dialog__subtitle-block{
  margin:0 !important;
  padding:0 !important;
  border:none !important;
  background:transparent !important;
  box-shadow:none !important;
  text-align:center !important;
  color:#64748b !important;
  font-size:12.2px !important;
  font-weight:700 !important;
  line-height:1.5 !important;
}

.sales-purchase-runtime-dialog__record-card{
  display:flex !important;
  flex-direction:column !important;
  gap:9px !important;
  padding:10px 16px !important;
  border-radius:8px !important;
  border:1px solid rgba(191,219,254,.92) !important;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,249,255,.96)) !important;
  box-shadow:none !important;
}

.sales-purchase-runtime-dialog__record-badges{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:9px !important;
  flex-wrap:wrap !important;
}

.sales-purchase-runtime-dialog__badge{
  min-height:36px !important;
  padding:0 14px !important;
  border-radius:999px !important;
  font-size:11px !important;
  font-weight:800 !important;
}

.sales-purchase-runtime-dialog__badge--type{
  background:rgba(219,234,254,.92) !important;
  color:#1d4ed8 !important;
  border:1px solid rgba(147,197,253,.85) !important;
}

.sales-purchase-runtime-dialog__badge--mono{
  background:rgba(255,255,255,.98) !important;
  color:#253142 !important;
  border:1px solid rgba(203,213,225,.92) !important;
  letter-spacing:.02em !important;
}

.sales-purchase-runtime-dialog__record-meta{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px 12px !important;
  flex-wrap:wrap !important;
  color:#475569 !important;
  font-size:12.4px !important;
  font-weight:700 !important;
  line-height:1.4 !important;
}

.sales-purchase-runtime-dialog__record-meta strong{
  color:#0f172a !important;
}

.sales-purchase-runtime-dialog__message,
.sales-purchase-runtime-dialog__warning{
  margin:0 !important;
  border-radius:8px !important;
  padding:10px 12px !important;
  min-height:54px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  font-size:12.3px !important;
  font-weight:700 !important;
  line-height:1.58 !important;
  box-shadow:none !important;
}

.sales-purchase-runtime-dialog__message--panel,
.sales-purchase-runtime-dialog__message{
  border:1px solid rgba(191,219,254,.9) !important;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,249,255,.96)) !important;
  color:#0f172a !important;
}

.sales-purchase-runtime-dialog__warning{
  border:1px solid rgba(254,202,202,.95) !important;
  background:rgba(254,242,242,.96) !important;
  color:#c2410c !important;
}

.sales-purchase-runtime-dialog__actions{
  margin-top:0 !important;
  display:grid !important;
  grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  gap:7px !important;
  direction:ltr !important;
}

.sales-purchase-runtime-dialog--success .sales-purchase-runtime-dialog__actions{
  grid-template-columns:1fr !important;
}

.sales-purchase-runtime-dialog .entries-action-btn.sales-purchase-runtime-dialog__action-btn{
  min-width:0 !important;
  min-height:40px !important;
  padding:0 14px !important;
  border-radius:8px !important;
  border:1px solid rgba(203,213,225,.92) !important;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(241,245,249,.95)) !important;
  box-shadow:none !important;
  font-size:13.2px !important;
  font-weight:800 !important;
  gap:6px !important;
}

.sales-purchase-runtime-dialog .entries-action-btn.sales-purchase-runtime-dialog__action-btn.entries-action-btn--danger{
  border-color:rgba(248,113,113,.42) !important;
  background:linear-gradient(180deg, #ff5252 0%, #dc2626 100%) !important;
  color:#fff !important;
}

.sales-purchase-runtime-dialog .entries-action-btn.sales-purchase-runtime-dialog__action-btn.entries-action-btn--success{
  border-color:rgba(34,197,94,.38) !important;
  background:linear-gradient(180deg, #22c55e 0%, #16a34a 100%) !important;
  color:#fff !important;
}

.sales-purchase-runtime-dialog .entries-action-btn.sales-purchase-runtime-dialog__action-btn[data-sales-purchase-dialog-role="cancel"],
.sales-purchase-runtime-dialog .entries-action-btn.sales-purchase-runtime-dialog__action-btn.entries-action-btn--ghost{
  color:#334155 !important;
  border-color:rgba(203,213,225,.92) !important;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(241,245,249,.95)) !important;
}

.sales-purchase-runtime-dialog .sales-purchase-runtime-dialog__action-icon,
.sales-purchase-runtime-dialog .sales-purchase-runtime-dialog__action-icon svg{
  width:15px !important;
  height:15px !important;
}

@media (max-width: 640px){
  .sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog.sales-purchase-runtime-dialog--confirm,
  .sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog.sales-purchase-runtime-dialog--success{
    width:min(100%, calc(100vw - 10px)) !important;
  }

  .sales-purchase-runtime-dialog__record-meta{
    flex-direction:column !important;
    align-items:flex-start !important;
  }

  .sales-purchase-runtime-dialog__actions{
    grid-template-columns:1fr !important;
  }
}

/* ===== Sales & purchase question dialogs: round 4 compact alignment to currency-management confirm ===== */
.sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog.sales-purchase-runtime-dialog--confirm{
  width:min(504px, 88vw) !important;
  min-height:auto !important;
  height:auto !important;
  max-height:min(266px, 52vh) !important;
  border-radius:10px !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__head{
  min-height:32px !important;
  padding:0 10px !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__heading{
  max-width:calc(100% - 88px) !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__title{
  font-size:14.6px !important;
  letter-spacing:.01em !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__body{
  padding:9px 14px 11px !important;
  gap:8px !important;
  overflow:hidden !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__subtitle-block,
.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__message:empty{
  display:none !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__record-card{
  padding:7px 11px !important;
  border-radius:8px !important;
  gap:8px !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__record-badges{
  gap:8px !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__badge{
  min-height:33px !important;
  padding:0 12px !important;
  font-size:12px !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__badge--type{
  min-width:54px !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__badge--mono{
  min-width:103px !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__record-meta{
  font-size:11.7px !important;
  gap:6px 10px !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__warning{
  padding:9px 12px !important;
  min-height:54px !important;
  font-size:12.2px !important;
  line-height:1.58 !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__actions{
  gap:7px !important;
  grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
}

.sales-purchase-runtime-dialog--confirm .entries-action-btn.sales-purchase-runtime-dialog__action-btn{
  min-height:36px !important;
  padding:0 10px !important;
  border-radius:8px !important;
  font-size:12.8px !important;
}

.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__action-icon,
.sales-purchase-runtime-dialog--confirm .sales-purchase-runtime-dialog__action-icon svg{
  width:13px !important;
  height:13px !important;
}


/* ===== Sales & purchase question dialogs: exact currency-management delete-confirm match (round 5) ===== */
.sales-purchase-runtime-backdrop{
  background:transparent !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

.sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog.sales-purchase-runtime-dialog--confirm{
  width:min(504px, 88vw) !important;
  min-height:auto !important;
  height:auto !important;
  max-height:min(266px, 52vh) !important;
  border-radius:10px !important;
  border:1px solid rgba(47,103,243,.94) !important;
  background:#2f67f3 !important;
  box-shadow:0 34px 88px rgba(15,23,42,.28), 0 0 0 1px rgba(96,165,250,.18) !important;
  overflow:hidden !important;
}

.sales-purchase-runtime-dialog__head{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  position:relative !important;
  min-height:32px !important;
  padding:0 10px !important;
  border-radius:10px 10px 0 0 !important;
  border-bottom:1px solid rgba(255,255,255,.14) !important;
  background:var(--window-head-chrome, linear-gradient(90deg, #6998ff, #2457dd)) !important;
  box-shadow:none !important;
}

.sales-purchase-runtime-dialog__window-actions{
  position:absolute !important;
  inset:auto !important;
  top:50% !important;
  left:10px !important;
  right:auto !important;
  bottom:auto !important;
  transform:translateY(-50%) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:4px !important;
  direction:ltr !important;
  z-index:3 !important;
  pointer-events:auto !important;
}

.sales-purchase-runtime-dialog__chrome-btn{
  width:25px !important;
  height:25px !important;
  border-radius:6px !important;
  display:grid !important;
  place-items:center !important;
  padding:0 !important;
  cursor:auto !important;
  position:relative !important;
  font-size:0 !important;
  line-height:0 !important;
  outline:none !important;
  -webkit-tap-highlight-color:transparent !important;
  border:1px solid rgba(255,255,255,.24) !important;
  background:linear-gradient(180deg, rgba(56,189,248,.30), rgba(59,130,246,.18)) !important;
  color:#fff !important;
  box-shadow:none !important;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease !important;
}

.sales-purchase-runtime-dialog__close{
  border:1px solid rgba(220,38,38,.34) !important;
  background:linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  color:#fff !important;
  box-shadow:none !important;
}

.sales-purchase-runtime-dialog__chrome-btn svg{
  width:13px !important;
  height:13px !important;
  display:block !important;
  overflow:visible !important;
  pointer-events:none !important;
  flex:none !important;
}

.sales-purchase-runtime-dialog__chrome-btn svg path{
  vector-effect:non-scaling-stroke !important;
}

.sales-purchase-runtime-dialog__chrome-btn:is(:hover, :focus, :focus-visible){
  transform:translateY(-1px) !important;
  outline:none !important;
  box-shadow:none !important;
}

.sales-purchase-runtime-dialog__close:is(:hover, :focus, :focus-visible){
  transform:translateY(-1px) !important;
  border-color:rgba(239,68,68,.42) !important;
  background:linear-gradient(135deg, #ef4444 0%, #c81e1e 100%) !important;
  box-shadow:none !important;
}

.sales-purchase-runtime-dialog__chrome-btn:active{
  transform:translateY(-1px) !important;
}

.sales-purchase-runtime-dialog__close:active{
  transform:translateY(-1px) !important;
}

.sales-purchase-runtime-dialog__heading{
  max-width:calc(100% - 88px) !important;
}

.sales-purchase-runtime-dialog__title{
  font-size:14.6px !important;
  letter-spacing:.01em !important;
  text-shadow:0 1px 2px rgba(2,6,23,.22) !important;
}

.sales-purchase-runtime-dialog__body{
  padding:9px 14px 11px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
  background:linear-gradient(180deg, rgba(244,248,255,.99), rgba(248,251,255,.98)) !important;
  overflow:hidden !important;
}

.sales-purchase-runtime-dialog__record-card{
  padding:7px 11px !important;
  border-radius:8px !important;
  border:1px solid rgba(191,219,254,.92) !important;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,249,255,.96)) !important;
  box-shadow:none !important;
}

.sales-purchase-runtime-dialog__warning.currency-management-confirm-warning{
  padding:9px 12px !important;
  min-height:54px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  border-radius:8px !important;
  border:1px solid rgba(254,202,202,.95) !important;
  background:rgba(254,242,242,.96) !important;
  color:#991b1b !important;
  font-size:12.2px !important;
  font-weight:700 !important;
  line-height:1.58 !important;
}

.sales-purchase-runtime-dialog__actions.currency-management-modal-actions--compact{
  margin-top:0 !important;
  padding:0 !important;
  display:flex !important;
  align-items:stretch !important;
  justify-content:stretch !important;
  gap:7px !important;
  direction:rtl !important;
}

.sales-purchase-runtime-dialog__actions.currency-management-modal-actions--compact .currency-management-btn{
  flex:1 1 0 !important;
  min-width:0 !important;
  min-height:36px !important;
  padding:0 12px !important;
  border-radius:8px !important;
  justify-content:center !important;
}

/* Currency-like buttons (scoped to sales/purchase question dialogs) */
.sales-purchase-runtime-dialog .currency-management-btn{
  border:1px solid rgba(15,23,42,.10) !important;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.78)) !important;
  color:#0b1220 !important;
  font:700 12.5px/1 var(--taif-font-family) !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;
  cursor:pointer !important;
}

.sales-purchase-runtime-dialog .currency-management-btn--danger{
  background:linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color:#fff !important;
  border-color:rgba(239,68,68,.34) !important;
}

.sales-purchase-runtime-dialog .currency-management-btn--success{
  background:linear-gradient(135deg, #22c55e, #16a34a) !important;
  color:#fff !important;
  border-color:rgba(34,197,94,.34) !important;
}

/* ===== Runtime dialog button interaction: same motion/press as currency-management windows ===== */
:where(.sales-purchase-runtime-backdrop){
  --spq-button-lift-y:-2px;
  --spq-button-lift-scale:1.045;
  --spq-button-press-scale:1.065;
  --spq-button-transition:transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease, filter .18s ease;
}

.sales-purchase-runtime-backdrop :is(
  .sales-purchase-runtime-dialog__chrome-btn,
  .currency-management-btn
){
  --spq-button-rest-transform:translateY(0);
  --spq-button-hover-border:rgba(15,23,42,.20);
  --spq-button-hover-shadow:0 14px 26px rgba(15,23,42,.14);
  --spq-button-active-shadow:0 12px 22px rgba(15,23,42,.16);
  --spq-button-focus-ring:0 0 0 2px rgba(15,23,42,.10);
  --spq-button-cue-color:#05070b;
  --spq-button-hover-filter:none;
  --spq-button-active-filter:none;
  position:relative !important;
  isolation:isolate !important;
  transform-origin:center center !important;
  backface-visibility:hidden !important;
  will-change:transform, box-shadow, filter !important;
  transition:var(--spq-button-transition) !important;
  outline:none !important;
}

.sales-purchase-runtime-backdrop .sales-purchase-runtime-dialog__chrome-btn{
  --spq-button-lift-scale:1.10;
  --spq-button-press-scale:1.135;
  --spq-button-cue-color:#ffffff;
}

.sales-purchase-runtime-backdrop :is(.currency-management-btn--primary, .sales-purchase-runtime-dialog__expand){
  --spq-button-hover-border:rgba(147,197,253,.46);
  --spq-button-hover-shadow:0 16px 30px rgba(37,99,235,.24);
  --spq-button-active-shadow:0 18px 34px rgba(37,99,235,.28);
  --spq-button-focus-ring:0 0 0 2px rgba(59,130,246,.16);
  --spq-button-cue-color:#ffffff;
  --spq-button-hover-filter:brightness(1.06) saturate(1.04);
  --spq-button-active-filter:brightness(1.10) saturate(1.05);
}

.sales-purchase-runtime-backdrop :is(.currency-management-btn--danger, .sales-purchase-runtime-dialog__close){
  --spq-button-hover-border:rgba(239,68,68,.44);
  --spq-button-hover-shadow:0 16px 30px rgba(185,28,28,.26);
  --spq-button-active-shadow:0 18px 34px rgba(185,28,28,.30);
  --spq-button-focus-ring:0 0 0 2px rgba(239,68,68,.15);
  --spq-button-cue-color:#ffffff;
  --spq-button-hover-filter:brightness(1.06) saturate(1.03);
  --spq-button-active-filter:brightness(1.10) saturate(1.04);
}

.sales-purchase-runtime-backdrop .currency-management-btn--success{
  --spq-button-hover-border:rgba(34,197,94,.44);
  --spq-button-hover-shadow:0 16px 30px rgba(21,128,61,.24);
  --spq-button-active-shadow:0 18px 34px rgba(21,128,61,.28);
  --spq-button-focus-ring:0 0 0 2px rgba(34,197,94,.16);
  --spq-button-cue-color:#ffffff;
  --spq-button-hover-filter:brightness(1.06) saturate(1.03);
  --spq-button-active-filter:brightness(1.10) saturate(1.04);
}

.sales-purchase-runtime-backdrop :is(
  .sales-purchase-runtime-dialog__chrome-btn,
  .currency-management-btn
):is(:hover, :focus-visible):not([disabled]){
  transform:var(--spq-button-rest-transform) translateY(var(--spq-button-lift-y)) scale(var(--spq-button-lift-scale)) !important;
  border-color:var(--spq-button-hover-border) !important;
  box-shadow:var(--spq-button-focus-ring), var(--spq-button-hover-shadow) !important;
  color:var(--spq-button-cue-color) !important;
  filter:var(--spq-button-hover-filter) !important;
  outline:none !important;
  z-index:3 !important;
}

.sales-purchase-runtime-backdrop :is(
  .sales-purchase-runtime-dialog__chrome-btn,
  .currency-management-btn
):active:not([disabled]){
  transform:var(--spq-button-rest-transform) translateY(var(--spq-button-lift-y)) scale(var(--spq-button-press-scale)) !important;
  border-color:var(--spq-button-hover-border) !important;
  box-shadow:var(--spq-button-focus-ring), var(--spq-button-active-shadow) !important;
  color:var(--spq-button-cue-color) !important;
  filter:var(--spq-button-active-filter) !important;
  outline:none !important;
  z-index:4 !important;
}

.sales-purchase-runtime-backdrop :is(
  .sales-purchase-runtime-dialog__chrome-btn,
  .currency-management-btn
)[disabled]{
  transform:var(--spq-button-rest-transform) !important;
  box-shadow:none !important;
  filter:none !important;
}

.sales-purchase-runtime-dialog__action-icon,
.sales-purchase-runtime-dialog__action-icon svg{
  width:13px !important;
  height:13px !important;
}


/* Purchase/Sale navigator: give the "next" arrow breathing room near the date field. */
.sales-purchase-topdock-layout--inline-fields .sales-purchase-navstack--prev{
  position:relative;
  left:6px;
}


.sales-purchase-toast.entries-toast{
  position:fixed;
  top:16px;
  left:50vw;
  z-index:2605;
  display:inline-flex;
  align-items:center;
  gap:10px;
  width:max-content;
  max-width:min(calc(100vw - 28px), var(--sales-purchase-toast-max-width, 360px));
  min-height:44px;
  padding:10px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.62);
  background:linear-gradient(180deg, rgba(34,197,94,.98), rgba(22,163,74,.98));
  box-shadow:0 16px 36px rgba(15,23,42,.18), 0 10px 24px rgba(34,197,94,.14);
  color:#fff;
  font-size:14px;
  font-weight:800;
  line-height:1.45;
  text-align:center;
  opacity:0;
  pointer-events:none;
  transform:translate(-50%, -12px) scale(.985);
  transition:opacity .18s ease, transform .18s ease;
}

.sales-purchase-toast.entries-toast.is-visible{
  opacity:1;
  transform:translate(-50%, 0) scale(1);
}

.sales-purchase-toast__icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 28px;
  width:28px;
  height:28px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}

.sales-purchase-toast__icon svg{
  width:16px;
  height:16px;
}

.sales-purchase-toast__message{
  display:block;
  min-width:0;
  white-space:normal;
  overflow-wrap:anywhere;
}

@media (max-width: 900px){
  .sales-purchase-toast.entries-toast{
    max-width:min(calc(100vw - 22px), var(--sales-purchase-toast-max-width, 320px));
    padding:10px 14px;
    font-size:13px;
  }
}
