/* ITDA v30.80 electronic approval modal + finance row polish */
.draft-io-delete{
  min-width:46px!important;
  height:30px!important;
  padding:0 7px!important;
  font-size:10px!important;
  line-height:1!important;
  white-space:nowrap!important;
  word-break:keep-all!important;
  letter-spacing:-.02em!important;
}

.draft-modal-actionbar{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 14px;
  padding:0 0 12px;
  border-bottom:1px solid var(--border,#e2e8f0);
}
.draft-modal-action{min-width:78px;white-space:nowrap}
.draft-modal-action.is-busy{opacity:.55;pointer-events:none}
.draft-modal-approver{
  display:grid;
  grid-template-columns:auto minmax(100px,1fr) auto;
  align-items:center;
  gap:8px 10px;
  border:1px solid var(--line,var(--border,#e2e8f0));
  border-radius:10px;
  padding:9px 10px;
  background:#fff;
}
.draft-modal-approver>b{min-width:0}
.draft-modal-approver>.help{text-align:right}
.draft-modal-opinion{
  grid-column:2/-1;
  font-size:12px;
  line-height:1.5;
  color:#475569;
  background:#f8fafc;
  border-radius:8px;
  padding:7px 9px;
}
.draft-modal-document{margin-top:0}

@media(max-width:760px){
  .draft-io-delete{
    min-width:44px!important;
    height:34px!important;
    padding:0 6px!important;
    font-size:10px!important;
  }
  .draft-modal-actionbar{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    position:sticky;
    top:-1px;
    z-index:4;
    background:#fff;
    padding:8px 0 10px;
  }
  .draft-modal-action{width:100%;min-width:0;min-height:42px}
  .draft-modal-approver{grid-template-columns:auto 1fr}
  .draft-modal-approver>.help{grid-column:2;text-align:left;font-size:12px}
  .draft-modal-opinion{grid-column:1/-1;font-size:13px}
  .draft-modal-cards{grid-template-columns:1fr!important}
}

/* v30.82 draft detail header actions */
.post-login-detail-head{
  align-items:flex-start;
  gap:16px;
}
.post-login-detail-heading{min-width:0;flex:1 1 auto}
.post-login-detail-head-right{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex:0 0 auto;
}
.post-login-detail-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  flex-wrap:wrap;
}
.post-login-detail-actions:empty{display:none}
.post-login-detail-actions .draft-modal-actionbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  flex-wrap:wrap;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  position:static;
  top:auto;
  z-index:auto;
}
.post-login-detail-actions .draft-modal-action{
  min-width:0;
  min-height:36px;
  height:36px;
  padding:0 12px;
  font-size:12px;
  font-weight:850;
  white-space:nowrap;
  border-radius:9px;
}
.post-login-detail-close{flex:0 0 auto}

/* v30.82 resubmit form */
.draft-resubmit-page{max-width:900px;margin:0 auto;padding:2px}
.draft-resubmit-note{
  display:flex;gap:10px;align-items:flex-start;
  padding:12px 14px;margin-bottom:14px;
  border:1px solid #bfdbfe;border-radius:12px;background:#eff6ff;
  color:#1e3a8a;font-size:12px;line-height:1.55;
}
.draft-resubmit-note strong{display:block;margin-bottom:2px;font-size:13px}
.draft-resubmit-section{margin-bottom:14px}
.draft-resubmit-section .panel-head{padding-bottom:10px}
.draft-resubmit-section-title{display:flex;align-items:center;gap:8px}
.draft-resubmit-section-title .step{
  width:24px;height:24px;border-radius:50%;display:grid;place-items:center;
  background:#2563eb;color:#fff;font-size:10px;font-weight:900;
}
.resubmit-existing-files,.resubmit-new-files,.resubmit-approvers{display:grid;gap:7px}
.resubmit-file-row,.resubmit-approver-row{
  display:flex;align-items:center;gap:9px;
  min-height:46px;padding:8px 10px;border:1px solid var(--border,#e2e8f0);
  border-radius:10px;background:#fff;
}
.resubmit-file-row.is-delete{opacity:.48;background:#f8fafc;text-decoration:line-through}
.resubmit-file-name,.resubmit-person{min-width:0;flex:1}
.resubmit-file-name b,.resubmit-person b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.resubmit-file-name small,.resubmit-person small{font-size:10px;color:#64748b}
.resubmit-mini-actions{display:flex;gap:5px;align-items:center;flex:0 0 auto}
.resubmit-mini-actions .btn{min-width:34px;height:30px;padding:0 8px;font-size:10px;white-space:nowrap}
.resubmit-add-approver{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;margin-top:9px}
.resubmit-file-picker{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:9px}
.resubmit-file-picker input[type=file]{display:none}
.resubmit-io-wrap{overflow:auto;border:1px solid var(--border,#e2e8f0);border-radius:11px}
.resubmit-io-table{min-width:640px;margin:0!important}
.resubmit-io-table .input{min-width:110px}
.resubmit-io-delete{min-width:42px!important;font-size:10px!important;white-space:nowrap!important;padding:0 7px!important}
.draft-resubmit-submitbar{
  position:sticky;bottom:0;z-index:6;display:flex;justify-content:flex-end;gap:8px;
  margin:16px -2px -2px;padding:12px 2px 2px;
  background:linear-gradient(to bottom,rgba(255,255,255,0),#fff 28%);
}

@media(max-width:760px){
  .post-login-detail-head{gap:10px;flex-wrap:wrap}
  .post-login-detail-heading{flex:1 1 calc(100% - 46px)}
  .post-login-detail-head-right{width:100%;order:2;gap:6px;align-items:center}
  .post-login-detail-actions{flex:1;min-width:0;justify-content:flex-end}
  .post-login-detail-actions .draft-modal-actionbar{width:100%;display:flex;justify-content:flex-end;gap:6px}
  .post-login-detail-actions .draft-modal-action{
    min-height:38px;height:38px;padding:0 10px;font-size:12px;flex:0 1 auto;
  }
  .post-login-detail-close{width:40px;height:40px}
  .draft-resubmit-page{padding:0}
  .draft-resubmit-note{font-size:13px}
  .resubmit-add-approver{grid-template-columns:1fr 1fr}
  .resubmit-add-approver .btn{grid-column:1/-1;width:100%;min-height:42px}
  .resubmit-file-row,.resubmit-approver-row{align-items:flex-start;flex-wrap:wrap}
  .resubmit-mini-actions{margin-left:auto}
  .resubmit-file-name,.resubmit-person{flex:1 1 calc(100% - 100px)}
  .draft-resubmit-submitbar .btn{min-height:44px;flex:1}
}

/* v30.83 draft detail finance summary + export tools */
.draft-detail-tools{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.draft-io-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  padding:12px 14px 14px;
  border-top:1px solid var(--border,#e2e8f0);
  background:#fbfdff;
}
.draft-io-summary>div{
  display:grid;gap:4px;
  min-width:0;
  padding:11px 12px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#fff;
}
.draft-io-summary span{font-size:10px;color:#64748b;font-weight:750}
.draft-io-summary strong{font-size:16px;color:#0f172a;letter-spacing:-.03em;overflow-wrap:anywhere}
.draft-io-summary .is-positive strong{color:#059669}
.draft-io-summary .is-negative strong{color:#dc2626}
@media(max-width:620px){
  .draft-io-summary{grid-template-columns:1fr;padding:10px}
  .draft-detail-tools{justify-content:flex-start}
}


/* v30.84 approval detail readable free-form content */
.draft-content-card{
  margin:0 0 14px;
  border:1px solid #dbe4f0;
  border-radius:14px;
  background:#fff;
  box-shadow:0 5px 18px rgba(15,23,42,.045);
  overflow:hidden;
}
.draft-content-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:13px 16px 11px;
  border-bottom:1px solid #e8edf5;
  background:linear-gradient(180deg,#fbfdff 0%,#f8fbff 100%);
}
.draft-content-card-head h3{margin:0;font-size:15px;color:#0f172a;letter-spacing:-.02em}
.draft-content-card-head p{margin:3px 0 0;font-size:11px;color:#64748b;line-height:1.45}
.draft-content-card .draft-modal-document{
  margin:0!important;
  padding:20px 22px 22px!important;
  max-width:none!important;
  border:0!important;
  border-radius:0!important;
  background:#fff!important;
  color:#1e293b;
  font-size:15px;
  line-height:1.82;
  letter-spacing:-.012em;
  overflow-wrap:anywhere;
}
.draft-content-card .draft-modal-document>:first-child{margin-top:0!important}
.draft-content-card .draft-modal-document>:last-child{margin-bottom:0!important}
.draft-content-card .draft-modal-document p{margin:.42em 0 .9em;line-height:1.82}
.draft-content-card .draft-modal-document p:empty{min-height:.7em;margin:.2em 0}
.draft-content-card .draft-modal-document :is(h1,h2,h3,h4,h5,h6){
  margin:1.28em 0 .55em;
  color:#0f172a;
  line-height:1.38;
  letter-spacing:-.025em;
}
.draft-content-card .draft-modal-document h1{font-size:22px}
.draft-content-card .draft-modal-document h2{font-size:19px}
.draft-content-card .draft-modal-document h3{font-size:17px}
.draft-content-card .draft-modal-document :is(h4,h5,h6){font-size:15px}
.draft-content-card .draft-modal-document :is(strong,b){
  color:#0f172a;
  font-weight:850;
}
.draft-content-card .draft-modal-document :is(ul,ol){
  margin:.5em 0 1em;
  padding-left:1.65em;
}
.draft-content-card .draft-modal-document li{margin:.28em 0;line-height:1.72;padding-left:.12em}
.draft-content-card .draft-modal-document blockquote{
  margin:1em 0;
  padding:11px 14px;
  border-left:3px solid #93b4ff;
  border-radius:0 10px 10px 0;
  background:#f7faff;
  color:#334155;
}
.draft-content-card .draft-modal-document hr{border:0;border-top:1px solid #dfe6ef;margin:20px 0}
.draft-content-card .draft-modal-document table{
  width:100%;
  border-collapse:collapse;
  margin:14px 0 18px;
  font-size:14px;
}
.draft-content-card .draft-modal-document :is(th,td){
  padding:9px 10px;
  border:1px solid #dce4ee;
  vertical-align:top;
}
.draft-content-card .draft-modal-document th{background:#f6f9fc;font-weight:850;color:#0f172a}
.draft-content-card .draft-modal-document a{color:#2563eb;text-underline-offset:2px}
@media(max-width:760px){
  .draft-content-card-head{padding:12px 13px 10px}
  .draft-content-card .draft-modal-document{padding:16px 14px 18px!important;font-size:14px;line-height:1.78}
  .draft-content-card .draft-modal-document p{line-height:1.78}
}
