.regab-archive-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #43566d !important;
  background: #fff !important;
  border: 1px solid #d8e2ec !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
}

.regab-archive-open-button:hover,
.regab-archive-open-button:focus-visible {
  color: #172437 !important;
  background: #f8fafc !important;
  border-color: #c8d6e3 !important;
}

.regab-archive-row {
  cursor: copy;
}

.regab-archive-row:hover td {
  outline-color: rgba(59, 130, 246, .24);
}

.regab-archive-overlay {
  position: fixed;
  inset: 0;
  z-index: 90000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(10px);
}

.regab-archive-dialog,
.regab-archive-browser {
  width: min(760px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
  display: grid;
  gap: 18px;
  padding: 28px;
  color: #172437;
  background: #fff;
  border: 1px solid #d8e2ec;
  border-radius: 24px;
  box-shadow: 0 28px 100px rgba(15, 23, 42, .32);
}

.regab-archive-browser {
  width: min(1180px, calc(100vw - 32px));
}

.regab-archive-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.regab-archive-kicker {
  margin-bottom: 6px;
  color: #3977ed;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.regab-archive-dialog h2,
.regab-archive-browser h2 {
  margin: 0;
  color: inherit;
  font-size: 30px;
  line-height: 1.1;
}

.regab-archive-dialog p,
.regab-archive-browser p {
  margin: 7px 0 0;
  color: #718196;
  font-weight: 800;
}

.regab-archive-close {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #60758b;
  background: #f8fafc;
  border: 1px solid #d8e2ec;
  border-radius: 14px;
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.regab-archive-warning {
  padding: 14px 16px;
  color: #7a4b00;
  background: #fff7df;
  border: 1px solid #f3d493;
  border-radius: 16px;
  font-weight: 850;
}

.regab-archive-dialog label,
.regab-archive-tools label {
  display: grid;
  gap: 7px;
  color: #728294;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.regab-archive-dialog label span,
.regab-archive-tools label span {
  text-transform: none;
  letter-spacing: 0;
}

.regab-archive-dialog select,
.regab-archive-dialog textarea,
.regab-archive-tools input,
.regab-archive-tools select {
  width: 100%;
  box-sizing: border-box;
  color: #172437;
  background: #f8fafc;
  border: 1px solid #d8e2ec;
  border-radius: 14px;
  font: inherit;
  font-weight: 850;
  outline: none;
}

.regab-archive-dialog select,
.regab-archive-tools input,
.regab-archive-tools select {
  min-height: 52px;
  padding: 0 14px;
}

.regab-archive-tools label {
  min-width: 0;
}

.regab-archive-tools select[name="archiveYear"] {
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 46px 0 16px !important;
  color: #172437;
  background-color: #f8fafc;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 22px,
    calc(100% - 13px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  border: 1px solid #d8e2ec;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(57, 119, 237, .04);
  font-size: 14px;
  font-weight: 950;
  line-height: 52px;
  appearance: none;
  -webkit-appearance: none;
}

body.theme-dark .regab-archive-tools select[name="archiveYear"] {
  color: #edf6ff;
  background-color: #071522;
  border-color: #2c5a86;
  box-shadow: inset 0 0 0 1px rgba(90, 146, 243, .06);
}

.regab-archive-dialog textarea {
  min-height: 130px;
  padding: 14px;
  resize: vertical;
}

.regab-archive-dialog select:focus,
.regab-archive-dialog textarea:focus,
.regab-archive-tools input:focus,
.regab-archive-tools select:focus {
  border-color: #3977ed;
  box-shadow: 0 0 0 4px rgba(57, 119, 237, .14);
}

.regab-archive-error {
  padding: 13px 15px;
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 14px;
  font-weight: 900;
}

.regab-archive-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.regab-archive-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px);
  gap: 12px;
  align-items: end;
}

.regab-archive-list {
  display: grid;
  gap: 18px;
}

.regab-archive-year {
  display: grid;
  gap: 10px;
}

.regab-archive-year h3 {
  margin: 0;
  color: #172437;
  font-size: 20px;
}

.regab-archive-cards {
  display: grid;
  gap: 10px;
}

.regab-archive-card {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  background: #f8fafc;
  border: 1px solid #dfe8f1;
  border-radius: 16px;
}

.regab-archive-card a {
  color: #172437;
  font-size: 17px;
  font-weight: 950;
  text-decoration: none;
}

.regab-archive-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.regab-archive-meta span {
  min-height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  color: #3865aa;
  background: #eaf2ff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}

.regab-archive-note {
  max-width: 900px;
  color: #314459 !important;
}

.regab-archive-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.regab-archive-empty {
  padding: 28px;
  color: #718196;
  background: #f8fafc;
  border: 1px dashed #cfe0f0;
  border-radius: 14px;
  font-weight: 850;
}

.regab-archive-empty.is-error {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fecaca;
}

.regab-archive-toast {
  position: fixed;
  right: 28px;
  top: 28px;
  z-index: 91000;
  max-width: min(520px, calc(100vw - 40px));
  padding: 16px 18px;
  color: #172437;
  background: #fff;
  border: 1px solid #d8e2ec;
  border-radius: 16px;
  box-shadow: 0 18px 70px rgba(15, 23, 42, .26);
  font-weight: 900;
}

.regab-archive-toast.is-success {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}

.regab-archive-toast.is-error {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fecaca;
}

body.theme-dark .regab-archive-dialog,
body.theme-dark .regab-archive-browser {
  color: #edf6ff;
  background: #0c2134;
  border-color: #244b70;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .46);
}

body.theme-dark .regab-archive-dialog p,
body.theme-dark .regab-archive-browser p,
body.theme-dark .regab-archive-dialog label,
body.theme-dark .regab-archive-tools label {
  color: #a7b8cc;
}

body.theme-dark .regab-archive-close,
body.theme-dark .regab-archive-dialog select,
body.theme-dark .regab-archive-dialog textarea,
body.theme-dark .regab-archive-tools input,
body.theme-dark .regab-archive-tools select,
body.theme-dark .regab-archive-card,
body.theme-dark .regab-archive-empty {
  color: #edf6ff;
  background: #071522;
  border-color: #244b70;
}

body.theme-dark .regab-archive-card a,
body.theme-dark .regab-archive-year h3 {
  color: #edf6ff;
}

body.theme-dark .regab-archive-card p {
  color: #a7b8cc;
}

body.theme-dark .regab-archive-note {
  color: #dce9f7 !important;
}

body.theme-dark .regab-archive-meta span {
  color: #9cc3ff;
  background: rgba(57, 119, 237, .16);
  border: 1px solid rgba(57, 119, 237, .32);
}

body.theme-dark .regab-archive-toast {
  color: #edf6ff;
  background: #0c2134;
  border-color: #244b70;
}

@media (max-width: 760px) {
  .regab-archive-dialog,
  .regab-archive-browser {
    padding: 20px;
  }

  .regab-archive-tools,
  .regab-archive-card {
    grid-template-columns: 1fr;
  }

  .regab-archive-actions,
  .regab-archive-card-actions {
    justify-content: stretch;
    flex-direction: column;
  }
}
