/* PlusERP global dialog standard: shared by alerts, confirmations, prompts,
   selections and financial amount dialogs. */
:root{
  --erp-dialog-blue:#155eef;
  --erp-dialog-danger:#c6283d;
  --erp-dialog-success:#078a4b;
  --erp-dialog-warning:#b86208;
  --erp-dialog-radius:10px;
  --erp-dialog-shadow:0 24px 68px rgba(2,12,30,.34);
  --erp-dialog-backdrop:rgba(15,23,42,.48);
  --erp-dialog-speed:140ms
}
body.app-dialog-open{overflow:hidden}
.app-alert-overlay{
  z-index:5000!important;padding:24px!important;background:var(--erp-dialog-backdrop)!important;
  backdrop-filter:blur(2px);animation:erp-dialog-backdrop-in var(--erp-dialog-speed) ease-out both
}
.app-alert-dialog{
  display:grid!important;grid-template-rows:auto minmax(0,auto) auto;width:min(480px,calc(100vw - 32px))!important;
  min-width:min(420px,calc(100vw - 32px));max-width:560px;max-height:calc(100vh - 48px);
  padding:0!important;overflow:hidden;border:1px solid rgba(15,42,76,.16)!important;
  border-radius:var(--erp-dialog-radius)!important;background:#fff!important;box-shadow:var(--erp-dialog-shadow)!important;
  transform-origin:center;animation:erp-dialog-in var(--erp-dialog-speed) ease-out both
}
.app-alert-dialog.financial-amount-dialog{width:min(480px,calc(100vw - 32px))!important}
.app-alert-title{
  min-width:0;min-height:52px!important;display:grid!important;grid-template-columns:24px minmax(0,1fr) 32px;
  align-items:center;gap:10px;margin:0!important;padding:0 14px 0 18px!important;border:0!important;
  border-radius:0!important;background:var(--erp-dialog-blue)!important;color:#fff!important;
  cursor:default!important;touch-action:auto!important;user-select:text!important
}
.app-alert-title.app-dialog-success{background:var(--erp-dialog-success)!important}
.app-alert-title.app-dialog-warning{background:var(--erp-dialog-warning)!important}
.app-alert-title.app-dialog-error,.app-alert-title.app-dialog-danger{background:var(--erp-dialog-danger)!important}
.app-alert-title::after{content:none!important;display:none!important}
.app-dialog-title-icon{display:grid;place-items:center;width:24px;height:24px;color:#fff}
.app-dialog-title-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.app-dialog-title-text{overflow:hidden;color:#fff;font-size:16px;font-weight:700;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}
.app-dialog-close{
  width:32px;height:32px;display:grid;place-items:center;padding:0;border:0;border-radius:6px;
  background:transparent;color:#fff;cursor:pointer
}
.app-dialog-close:hover,.app-dialog-close:focus-visible{background:rgba(255,255,255,.16);outline:2px solid rgba(255,255,255,.7);outline-offset:-2px}
.app-dialog-close svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.app-alert-message,.financial-amount-description{
  min-height:0;max-height:calc(100vh - 190px);margin:0!important;padding:22px 20px!important;overflow:auto;
  background:#fff;color:#132238!important;font-size:14px!important;line-height:1.5!important
}
.app-alert-message+.app-alert-input{margin:0 20px 20px;width:calc(100% - 40px)}
.financial-amount-description{padding-bottom:12px!important}
.financial-amount-details,.financial-amount-field,.financial-amount-meta,.financial-amount-validation{margin-inline:20px}
.app-alert-actions{
  min-height:62px;display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:0!important;
  padding:12px 16px!important;border-top:1px solid #dce5ef;background:#fbfcfe
}
.app-alert-actions .btn{min-width:92px;min-height:38px;padding:0 18px;border-radius:7px;font-size:14px;font-weight:700}
.app-confirm-actions .btn{min-width:108px}
.app-alert-actions .btn.danger{border-color:var(--erp-dialog-danger);background:var(--erp-dialog-danger);color:#fff}
.app-alert-link{font-size:13px}
.app-alert-dialog.cheque-deposit-dialog{
  width:min(560px,calc(100vw - 32px))!important;max-width:560px
}
.cheque-deposit-dialog .cheque-deposit-form{
  display:grid;grid-template-rows:minmax(0,1fr) auto;gap:0;min-height:0;overflow:hidden
}
.cheque-deposit-dialog .cheque-deposit-fields{
  display:grid;gap:18px;padding:22px 24px 20px;overflow:auto;background:#fff
}
.cheque-deposit-dialog .cheque-deposit-field{
  display:grid;gap:8px;min-width:0;color:#132238;font-size:14px;font-weight:800
}
.cheque-deposit-dialog .cheque-deposit-field small{
  margin-left:6px;color:#64748b;font-size:12px;font-weight:700
}
.cheque-deposit-dialog .cheque-deposit-field strong{color:#dc2626}
.cheque-deposit-dialog .cheque-deposit-field .app-alert-input{
  box-sizing:border-box;width:100%;min-height:46px;height:46px;margin:0;padding:10px 12px;resize:none
}
.cheque-deposit-dialog .cheque-deposit-hint{
  margin:-4px 0 0;color:#64748b;font-size:13px;line-height:1.45
}
.cheque-deposit-dialog .app-alert-actions{position:static;margin:0!important}
.app-alert-dialog.cheque-history-dialog{
  display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;width:min(720px,calc(100vw - 32px))!important;max-width:720px;height:min(820px,calc(100vh - 48px));max-height:calc(100vh - 48px);overflow:hidden
}
.cheque-history-dialog .cheque-history-content{
  min-height:0;padding:22px 24px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;background:#fff
}
.cheque-history-summary{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:18px;border:1px solid #dce6f2;border-radius:9px;background:#f8fbff
}
.cheque-history-summary div{min-width:0}
.cheque-history-summary span,.cheque-history-reason span{
  display:block;margin-bottom:5px;color:#64748b;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase
}
.cheque-history-summary strong{display:block;overflow-wrap:anywhere;color:#10233f;font-size:14px}
.cheque-history-reason{
  margin-top:16px;padding:14px 16px;border:1px solid #fecaca;border-left:4px solid #dc2626;border-radius:8px;background:#fff7f7
}
.cheque-history-reason strong{color:#991b1b;font-size:15px}
.cheque-history-timeline{margin-top:22px}
.cheque-history-timeline h3{margin:0 0 14px;color:#10233f;font-size:16px}
.cheque-history-timeline article{position:relative;margin-left:8px;padding:0 0 20px 24px;border-left:2px solid #d9e6f5}
.cheque-history-timeline article:last-of-type{padding-bottom:0;border-left-color:transparent}
.cheque-history-timeline article>i{position:absolute;left:-7px;top:3px;width:12px;height:12px;border:3px solid #fff;border-radius:50%;background:#2563eb;box-shadow:0 0 0 1px #93b4e3}
.cheque-history-event-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.cheque-history-event-head strong{color:#10233f;font-size:14px}
.cheque-history-event-head time{color:#64748b;font-size:12px;white-space:nowrap}
.cheque-history-timeline article p{margin:4px 0;color:#52647b;font-size:13px;text-transform:capitalize}
.cheque-history-timeline blockquote{margin:8px 0 0;padding:9px 11px;border-left:3px solid #f59e0b;border-radius:4px;background:#fff8e8;color:#713f12;font-size:13px;font-style:normal}
.cheque-history-timeline article small{display:block;margin-top:7px;color:#64748b;font-size:12px}
.cheque-history-empty{color:#64748b;font-size:14px}
.cheque-history-dialog .app-alert-actions{position:static;z-index:1;margin:0!important;background:#fff}
.app-alert-dialog.cheque-history-loading-dialog{width:min(520px,calc(100vw - 32px))!important;max-width:520px}
.cheque-history-loading{display:flex;align-items:center;gap:16px;padding:28px 24px;background:#fff}
.cheque-history-loading>span{width:28px;height:28px;flex:0 0 28px;border:3px solid #d8e5f5;border-top-color:#2563eb;border-radius:50%;animation:cheque-history-spin .75s linear infinite}
.cheque-history-loading div{display:grid;gap:4px}
.cheque-history-loading strong{color:#10233f;font-size:15px}
.cheque-history-loading small{color:#64748b;font-size:13px;line-height:1.4}
@keyframes cheque-history-spin{to{transform:rotate(360deg)}}
@keyframes erp-dialog-backdrop-in{from{opacity:0}to{opacity:1}}
@keyframes erp-dialog-in{from{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}
@media(max-width:520px){
  .app-alert-overlay{padding:12px!important}
  .app-alert-dialog{width:calc(100vw - 24px)!important;min-width:0;max-height:calc(100vh - 24px)}
  .app-alert-title{padding-inline:14px 10px!important}
  .app-alert-message,.financial-amount-description{max-height:calc(100vh - 210px);padding:18px 16px!important}
  .app-alert-message+.app-alert-input{margin-inline:16px;width:calc(100% - 32px)}
  .app-alert-actions{flex-wrap:wrap;padding:10px 12px!important}
  .app-alert-actions .btn{flex:1 1 110px}
  .cheque-deposit-dialog .cheque-deposit-fields{gap:16px;padding:18px 16px 16px}
  .cheque-history-dialog .cheque-history-content{padding:16px}
  .cheque-history-summary{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px}
  .cheque-history-event-head{display:grid;gap:4px}
}
@media(prefers-reduced-motion:reduce){
  .app-alert-overlay,.app-alert-dialog{animation:none!important}
}
