.audit-history-modal {
  --audit-time-column: 7.8rem;
}

.audit-history-modal .modal-dialog {
  max-width: min(58rem, calc(100vw - 2rem));
}

.audit-history-modal__content {
  background:
    linear-gradient(
      145deg,
      rgba(37, 99, 235, 0.24) 0%,
      rgba(59, 130, 246, 0.14) 38%,
      rgba(14, 165, 233, 0.08) 68%,
      rgba(37, 99, 235, 0.16) 100%
    ),
    var(--bs-body-bg);
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: var(--mm-radius-lg);
  box-shadow: var(--mm-shadow);
  color: var(--bs-body-color);
  overflow: hidden;
}

.audit-history-modal__header {
  align-items: center;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.2), rgba(14, 165, 233, 0.06));
  border-bottom: 0;
  gap: 1rem;
  padding: 1rem 1.15rem;
}

.audit-history-modal__heading {
  align-items: center;
  display: flex;
  gap: 0.85rem;
  min-width: 0;
}

.audit-history-modal__icon {
  align-items: center;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(147, 197, 253, 0.3);
  border-radius: 0.8rem;
  color: #bfdbfe;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.1rem;
  height: 2.55rem;
  justify-content: center;
  width: 2.55rem;
}

.audit-history-modal__header .modal-title {
  color: var(--bs-emphasis-color);
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.audit-history-modal__subtitle {
  color: var(--bs-secondary-color);
  font-size: 0.82rem;
  line-height: 1.35;
  margin: 0.28rem 0 0;
}

.audit-history-modal__body {
  background: transparent;
  padding: 0.75rem 1rem 1rem;
}

.audit-history-table-wrap {
  overflow-x: auto;
}

.audit-history-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--bs-body-color);
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  min-width: 34rem;
  width: 100%;
}

.audit-history-table > :not(caption) > * > * {
  background-color: transparent;
  border: 0;
  box-shadow: none;
}

.audit-history-table thead th {
  background: rgba(30, 64, 175, 0.2);
  color: var(--bs-emphasis-color);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  padding: 0.78rem 0.9rem;
  text-transform: uppercase;
}

.audit-history-table thead th:first-child {
  border-top-left-radius: 0.75rem;
  width: var(--audit-time-column);
}

.audit-history-table thead th:last-child {
  border-top-right-radius: 0.75rem;
}

.audit-history-table tbody tr:nth-child(odd) > * {
  background: rgba(59, 130, 246, 0.09);
}

.audit-history-table tbody tr:nth-child(even) > * {
  background: rgba(14, 165, 233, 0.035);
}

.audit-history-table tbody tr:hover > * {
  background: rgba(96, 165, 250, 0.15);
}

.audit-history-table tbody td {
  padding: 0.82rem 0.9rem;
  transition: background-color 140ms ease;
  vertical-align: middle;
}

.audit-history-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 0.75rem;
}

.audit-history-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 0.75rem;
}

.audit-history-table__time {
  line-height: 1.2;
  white-space: nowrap;
}

.audit-history-table__date {
  color: var(--bs-emphasis-color);
  display: block;
  font-size: 0.87rem;
  font-weight: 750;
}

.audit-history-table__clock {
  color: var(--bs-secondary-color);
  display: block;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.025em;
  margin-top: 0.18rem;
}

.audit-history-table__event {
  color: var(--bs-body-color);
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.audit-history-modal__footer {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.13), rgba(14, 165, 233, 0.04));
  border-top: 0;
  justify-content: space-between;
  padding: 0.8rem 1.15rem;
}

.audit-history-modal__count {
  color: var(--bs-secondary-color);
  font-size: 0.78rem;
  font-weight: 700;
}

.audit-history-modal__footer .btn {
  border-radius: 999px;
  font-weight: 700;
  min-width: 5.5rem;
}

.audit-history-empty {
  align-items: center;
  background: rgba(59, 130, 246, 0.07);
  border-radius: 0.9rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  min-height: 13rem;
  padding: 2rem;
  text-align: left;
}

.audit-history-empty__icon {
  align-items: center;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 50%;
  color: #bfdbfe;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.25rem;
  height: 3rem;
  justify-content: center;
  width: 3rem;
}

.audit-history-empty h3 {
  color: var(--bs-emphasis-color);
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.audit-history-empty p {
  color: var(--bs-secondary-color);
  font-size: 0.88rem;
  margin: 0;
}

@media (max-width: 575.98px) {
  .audit-history-modal {
    --audit-time-column: 6.2rem;
  }

  .audit-history-modal .modal-dialog {
    margin: 0.6rem;
    max-width: calc(100vw - 1.2rem);
  }

  .audit-history-modal__header {
    padding: 0.9rem;
  }

  .audit-history-modal__icon {
    height: 2.3rem;
    width: 2.3rem;
  }

  .audit-history-modal__subtitle {
    font-size: 0.76rem;
  }

  .audit-history-modal__body {
    padding: 0.55rem 0.6rem 0.75rem;
  }

  .audit-history-table {
    min-width: 30rem;
  }

  .audit-history-table thead th,
  .audit-history-table tbody td {
    padding-left: 0.72rem;
    padding-right: 0.72rem;
  }

  .audit-history-table__date {
    font-size: 0.8rem;
  }

  .audit-history-table__clock {
    font-size: 0.72rem;
  }

  .audit-history-table__event {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .audit-history-modal__footer {
    padding: 0.75rem 0.9rem;
  }
}
