.records-page {
  min-height: 100%;
  width: 100%;
  padding: 40px;
  box-sizing: border-box;
}

.records-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 54px;
  gap: 12px;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--border, #282e39);
  margin-bottom: 20px;
}

.records-page-mailing .records-head-actions [data-action="new-mailing"] {
  min-width: 128px;
}

.records-head-actions [data-action="refresh"] {
  min-width: 109px;
}

.records-head-actions [data-action="saved-filters"] {
  min-width: 105px;
}

.records-page-logs .records-header {
  min-height: 32px;
  padding-bottom: 0;
  margin-bottom: 20px;
  border-bottom: 0;
}

.records-header h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--text, #ecedee);
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
}

.records-count,
.records-filter-count {
  display: inline-flex;
  min-width: 24px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding-inline: 6px;
  border-radius: 999px;
  background: #3f414a;
  color: #d0d0d5;
  font-size: 12px;
  font-weight: 400;
}

.records-filter-count {
  min-width: 18px;
  min-height: 18px;
  margin-left: 3px;
}

.records-head-actions,
.records-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.records-toolbar {
  margin-bottom: 20px;
  gap: 10px;
}

.records-page-users .records-toolbar [data-action="filters"] {
  min-width: 80px;
}

.records-page-mailing .records-toolbar [data-action="filters"],
.records-page-logs .records-toolbar [data-action="filters"] {
  min-width: 105px;
}

.records-spacer {
  flex: 1 1 auto;
}

.records-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid var(--border, #343a49);
  border-radius: 8px;
  padding: 5px 12px;
  background: transparent;
  color: var(--text, #ecedee);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.records-button:hover,
.records-columns[open] > .records-button {
  background: #2c3554;
}

.records-button:focus-visible,
.records-log-tabs button:focus-visible,
.records-columns summary:focus-visible {
  outline: 2px solid var(--primary, #0089ee);
  outline-offset: 2px;
}

.records-primary {
  border-color: transparent;
  background: #0384f6;
  color: white;
}

.records-primary:hover {
  background: #147cdb;
}

.records-soft {
  border-color: transparent;
  background: #062b4d;
  color: #8bc3f5;
}

.records-button:disabled {
  opacity: .48;
  cursor: default;
}

.records-button:disabled:hover {
  background: #062b4d;
}

.records-search {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  width: 200px;
  color: var(--muted, #9699a6);
  border: 1px solid #3b4051;
  border-radius: 8px;
  background: #1c2236;
  padding-inline: 10px;
}

.records-search:focus-within {
  border-color: var(--primary, #0089ee);
}

.records-search input {
  min-width: 0;
  width: 100%;
  height: 36px;
  border: 0;
  padding: 0;
  outline: 0;
  background: transparent;
  color: var(--text, #ecedee);
  font-family: inherit;
  font-size: 14px;
}

.records-search input::placeholder {
  color: var(--muted, #9699a6);
}

.records-search svg,
.records-button svg,
.records-empty-icon svg {
  flex: none;
}

.records-selection-count {
  border-left: 1px solid var(--border, #343a49);
  padding: 4px 12px;
  color: var(--muted, #a4a5ae);
  font-size: 12px;
  white-space: nowrap;
}

.records-scroll {
  overflow-x: auto;
}

.records-table {
  width: 100%;
  min-width: 660px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.records-page-users .records-table {
  min-width: 1160px;
}

.records-page-mailing .records-table {
  min-width: 800px;
}

.records-table th {
  height: 40px;
  overflow: hidden;
  padding: 0 12px;
  border-right: 1px solid #242a3a;
  background: #1c2236;
  color: #a3a5b0;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-table th:first-child {
  border-radius: 8px 0 0 8px;
}

.records-table th:last-child {
  border-radius: 0 8px 8px 0;
  border-right: 0;
}

.records-table th.records-selection {
  width: 44px;
  text-align: center;
}

.records-selection input,
.records-popover input {
  width: 17px;
  height: 17px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--primary, #0089ee);
}

.records-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 16px;
}

.records-empty h3 {
  margin: 0;
  color: var(--text, #ecedee);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.records-empty-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #292e39;
  color: #a2a5ae;
}

.records-columns {
  position: relative;
}

.records-columns summary {
  list-style: none;
}

.records-columns summary::-webkit-details-marker {
  display: none;
}

.records-popover {
  position: absolute;
  z-index: 4;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  min-width: 200px;
  gap: 2px;
  padding: 6px;
  border: 1px solid #383f51;
  border-radius: 12px;
  background: #1b2133;
  box-shadow: 0 10px 25px #0007;
}

.records-popover label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border-radius: 6px;
  padding: 4px 7px;
  color: var(--text, #ecedee);
  font-size: 12px;
  cursor: pointer;
}

.records-popover label:hover {
  background: #2a3045;
}

.records-popover input {
  flex: none;
}

.records-log-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.records-log-tabs button {
  min-width: 64px;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  padding: 6px 12px;
  background: transparent;
  color: var(--text, #ecedee);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.records-log-tabs button:hover {
  background: #2a3045;
}

.records-log-tabs [aria-selected="true"],
.records-log-tabs [aria-selected="true"]:hover {
  background: #0384f6;
  color: white;
}

.records-filter-form,
.records-recipient-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.records-filter-form label,
.records-recipient-filters label {
  display: grid;
  gap: 8px;
  color: var(--muted, #a4a5ae);
  font-size: 13px;
}

.records-filter-form input,
.records-filter-form select,
.records-recipient-filters input,
.records-recipient-filters select {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #3a4050;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--field, #1b2133);
  color: var(--text, #ecedee);
  font: inherit;
  color-scheme: dark;
}

.records-mail-dialog {
  width: min(850px, 80vw);
}

.records-mail-dialog p {
  margin: 0 0 16px;
  color: var(--muted, #a4a5ae);
  font-size: 14px;
}

.records-saved-filters {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.records-saved-filters li {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.records-empty-notice {
  margin: 0 0 12px;
  color: var(--muted, #a4a5ae);
  font-size: 14px;
}

.records-recipient-filters {
  margin-bottom: 16px;
}

.records-recipient-filters[hidden] {
  display: none;
}

.records-mail-dialog .records-table {
  min-width: 590px;
}

.records-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .records-page {
    padding: 24px 20px 28px;
  }
}

@media (max-width: 540px) {
  .records-page {
    padding: 18px 12px 24px;
  }

  .records-filter-form,
  .records-recipient-filters {
    grid-template-columns: 1fr;
  }
}
