.global-modal-overlay{
  position:fixed;
  inset:0;
  z-index:99999;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:20px;
  box-sizing:border-box;

  background:rgba(0,0,0,.45);
}

.global-modal{
  width:100%;
  max-height:90vh;

  display:flex;
  flex-direction:column;

  background:#ffffff;
  border-radius:16px;
  box-shadow:0 20px 50px rgba(0,0,0,.25);

  overflow:hidden;
  text-align:left;
}

.global-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;

  padding:18px 22px;

  background:#ffffff;
  border-bottom:1px solid #e5e7eb;
}

.global-modal-title{
  margin:0;

  font-size:20px;
  line-height:1.3;
  color:#111827;
}

.global-modal-close{
  width:34px;
  height:34px;

  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;

  padding:0;

  border:1px solid #d1d5db;
  border-radius:8px;

  background:#ffffff;
  color:#374151;

  cursor:pointer;
  font-size:18px;
}

.global-modal-close:hover{
  background:#f3f4f6;
}

.global-modal-body{
  padding:22px;
  overflow:auto;
}

.global-modal-footer{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;

  padding:16px 22px;

  background:#f9fafb;
  border-top:1px solid #e5e7eb;
}

.global-modal-loading{
  padding:35px 20px;

  text-align:center;
  color:#6b7280;
}

.global-modal-empty{
  padding:30px 20px;

  text-align:center;
  color:#6b7280;
}

@media(max-width:600px){

  .global-modal-overlay{
    padding:10px;
  }

  .global-modal{
    max-height:95vh;
    border-radius:12px;
  }

  .global-modal-header{
    padding:15px 16px;
  }

  .global-modal-body{
    padding:16px;
  }

  .global-modal-title{
    font-size:18px;
  }

}

.global-modal-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  flex-wrap:wrap;

  margin-bottom:15px;
}

.global-modal-table-container{
  max-height:60vh;
  overflow:auto;

  border:1px solid #e5e7eb;
  border-radius:10px;
}

.global-modal-table-container .global-data-table{
  width:100%;
  border-collapse:collapse;
}

.global-modal-table-container thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:#f9fafb;
}

.global-modal-amount{
  text-align:right;
  white-space:nowrap;
  font-weight:700;
}

.global-modal-amount-positive{
  color:#15803d;
}

.global-modal-amount-negative{
  color:#dc2626;
}

.global-modal-amount-neutral{
  color:#374151;
}

.global-modal-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;

  margin-top:15px;
}

.global-modal-pagination button{
  min-width:34px;
  min-height:32px;

  padding:6px 10px;

  border:1px solid #d1d5db;
  border-radius:7px;

  background:#ffffff;
  color:#374151;

  cursor:pointer;
}

.global-modal-pagination button:hover:not(:disabled){
  background:#f3f4f6;
}

.global-modal-pagination button:disabled{
  cursor:not-allowed;
  opacity:.45;
}

.global-modal-pagination button.active{
  background:#2563eb;
  border-color:#2563eb;
  color:#ffffff;
}

.global-modal-page-info{
  color:#6b7280;
  font-size:12px;
}

@media(max-width:600px){

  .global-modal-summary{
    align-items:flex-start;
    flex-direction:column;
  }

  .global-modal-table-container{
    max-height:65vh;
  }

}