:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 86% 14%, rgba(87, 142, 220, 0.22), transparent 40%),
    linear-gradient(145deg, #050d16, #071528 55%, #07111b);
  color: #e7f0ff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.records-page {
  width: min(1200px, 96vw);
  margin: 24px auto 32px;
  display: grid;
  gap: 14px;
}

.records-header,
.records-toolbar,
.records-table-card {
  border: 1px solid rgba(136, 170, 214, 0.24);
  border-radius: 14px;
  background: rgba(8, 19, 34, 0.84);
  backdrop-filter: blur(10px);
}

.records-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.records-header h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.02em;
}

.records-back,
.records-console-link {
  color: #9fcef8;
  text-decoration: none;
  font-size: 14px;
}

.records-back:hover,
.records-console-link:hover {
  color: #c3e2ff;
}

.records-toolbar {
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.records-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 148px;
}

.records-toolbar label span {
  font-size: 12px;
  color: #9cb2cc;
}

.records-toolbar select {
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(144, 175, 211, 0.34);
  background: rgba(4, 12, 22, 0.82);
  color: #e7f0ff;
  padding: 0 10px;
}

.records-toolbar__actions {
  display: flex;
  gap: 8px;
}

button {
  cursor: pointer;
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(123, 173, 255, 0.45);
  background: linear-gradient(135deg, #204972, #2a6ea8);
  color: #e9f4ff;
  padding: 0 14px;
}

button.secondary {
  background: rgba(14, 31, 52, 0.88);
  border-color: rgba(142, 173, 214, 0.35);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.records-table-head h2 {
  margin: 0;
  font-size: 16px;
}

.records-table-card {
  padding: 14px 16px;
}

.records-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.records-table-head span {
  color: #99b4d3;
  font-size: 13px;
}

.records-table-wrap {
  overflow: auto;
  border: 1px solid rgba(139, 171, 210, 0.25);
  border-radius: 10px;
}

.records-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.records-table th,
.records-table td {
  border-bottom: 1px solid rgba(130, 164, 206, 0.2);
  padding: 10px;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

.records-table th {
  color: #9bb4d4;
  background: rgba(6, 16, 30, 0.86);
  font-weight: 600;
}

.records-empty {
  color: #93a8c3;
  text-align: center;
}

.records-id {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: #c7dbf6;
  word-break: break-all;
}

.records-subtext {
  margin-top: 4px;
  color: #8ea5c2;
  font-size: 12px;
}

.records-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 22px;
  padding: 0 9px;
  font-size: 12px;
}

.records-badge.is-green {
  color: #8be7c4;
  background: rgba(45, 158, 112, 0.15);
  border-color: rgba(82, 222, 163, 0.28);
}

.records-badge.is-red {
  color: #ffb1b1;
  background: rgba(193, 74, 74, 0.16);
  border-color: rgba(240, 114, 114, 0.3);
}

.records-badge.is-yellow {
  color: #f6d38f;
  background: rgba(193, 147, 58, 0.16);
  border-color: rgba(232, 182, 81, 0.3);
}

.records-badge.is-gray {
  color: #c0cee3;
  background: rgba(109, 130, 162, 0.2);
  border-color: rgba(143, 168, 203, 0.25);
}

.records-actions {
  display: flex;
  gap: 8px;
}

.records-actions button {
  height: 28px;
  font-size: 12px;
  padding: 0 9px;
}

.records-pagination {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.records-pagination span {
  color: #9ab0cb;
  font-size: 13px;
}

.records-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(2, 8, 14, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.records-modal.hidden {
  display: none;
}

.records-modal__panel {
  width: min(900px, 94vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(131, 164, 204, 0.34);
  background: rgba(7, 18, 32, 0.98);
  padding: 14px 16px;
  position: relative;
}

.records-modal__panel h3 {
  margin: 0 0 12px;
}

.records-modal__close {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(138, 166, 203, 0.34);
  background: rgba(10, 21, 36, 0.8);
  font-size: 20px;
  line-height: 1;
  padding: 0;
}

.records-modal__body {
  display: grid;
  gap: 9px;
}

.records-detail-item {
  border: 1px solid rgba(129, 160, 198, 0.24);
  border-radius: 10px;
  background: rgba(8, 19, 35, 0.9);
  padding: 9px 10px;
}

.records-detail-item label {
  display: block;
  margin-bottom: 6px;
  color: #98b1cf;
  font-size: 12px;
}

.records-detail-item code,
.records-detail-item pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d5e6ff;
  font-size: 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.records-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid rgba(130, 199, 243, 0.36);
  background: rgba(7, 36, 58, 0.95);
  color: #ddf2ff;
  font-size: 13px;
}

.records-toast.is-error {
  border-color: rgba(239, 129, 129, 0.44);
  background: rgba(68, 16, 16, 0.96);
  color: #ffd0d0;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .records-page {
    width: 95vw;
    margin: 14px auto 20px;
  }

  .records-header {
    padding: 13px 12px;
    flex-wrap: wrap;
  }

  .records-header h1 {
    font-size: 19px;
  }

  .records-toolbar {
    padding: 12px;
  }

  .records-table-card {
    padding: 12px;
  }
}
