.api-key-console {
  min-height: 100vh;
  padding: 24px;
  color: #ebf1fb;
  background:
    radial-gradient(circle at 86% -8%, rgba(17, 68, 95, 0.32), transparent 34%),
    linear-gradient(180deg, #060b14 0%, #0a1220 100%);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 196, 210, 0.9) rgba(6, 13, 24, 0.82);
}

.api-key-console,
.api-key-console * {
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 196, 210, 0.9) rgba(6, 13, 24, 0.82);
}

.api-key-console *::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.api-key-console *::-webkit-scrollbar-track {
  background: rgba(6, 13, 24, 0.84);
  border-radius: 999px;
}

.api-key-console *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(84, 207, 193, 0.92), rgba(63, 143, 201, 0.92));
  border-radius: 999px;
  border: 2px solid rgba(6, 13, 24, 0.9);
}

.api-key-console *::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(112, 226, 212, 0.97), rgba(88, 169, 228, 0.97));
}

.api-key-console__header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.api-key-console__header h1 {
  margin: 0;
  font-size: 1.84rem;
  font-weight: 700;
}

.api-key-console__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 7px 11px;
  color: inherit;
  background: rgba(12, 20, 34, 0.92);
  cursor: pointer;
  text-decoration: none;
}

.api-key-console__tabs {
  margin-top: 18px;
  display: flex;
  gap: 14px;
}

.api-key-console__tab {
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 0;
  font-size: 1.7rem;
  background: transparent;
  color: rgba(231, 238, 249, 0.56);
  cursor: pointer;
}

.api-key-console__tab.is-active {
  color: #ecf3ff;
  border-bottom-color: #1de3c0;
}

.api-key-console__card {
  margin-top: 20px;
  border: 1px solid rgba(121, 146, 182, 0.24);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(10, 18, 31, 0.9), rgba(8, 14, 24, 0.96));
}

.api-key-console__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.api-key-console__card-head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.api-key-console__create {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(29, 227, 192, 0.3);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(11, 39, 38, 0.5);
  color: #1de3c0;
  font-size: 0.92rem;
  cursor: pointer;
}

.api-key-console__create:hover {
  border-color: rgba(29, 227, 192, 0.65);
}

.api-key-console__head-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.api-key-console__balance {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  border: 1px solid rgba(29, 227, 192, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(14, 36, 38, 0.55);
}

.api-key-console__balance-label {
  color: rgba(207, 220, 237, 0.78);
  font-size: 0.86rem;
}

.api-key-console__balance-value {
  color: #61f2d7;
  font-size: 0.96rem;
  font-weight: 700;
}

.api-key-console__table-wrap {
  overflow-x: auto;
}

.api-key-console__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.api-key-console__table th,
.api-key-console__table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.api-key-console__table th {
  color: rgba(219, 229, 242, 0.66);
  font-weight: 600;
}

.api-key-console__status {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(29, 227, 192, 0.35);
  border-radius: 999px;
  padding: 3px 9px;
  color: #61f2d7;
  font-size: 0.82rem;
}

.api-key-console__status.is-disabled {
  border-color: rgba(255, 183, 77, 0.45);
  color: #ffd28a;
}

.api-key-console__actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.api-key-console__actions button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(226, 236, 249, 0.9);
  cursor: pointer;
}

.api-key-console__actions button:hover {
  border-color: rgba(29, 227, 192, 0.68);
  color: #20e3c1;
}

.api-key-console__actions button.is-disabled,
.api-key-console__actions button.is-disabled:hover {
  border-color: rgba(182, 197, 220, 0.36);
  color: rgba(200, 212, 232, 0.64);
  cursor: pointer;
}

.api-key-console__actions button.is-warning {
  border-color: rgba(255, 183, 77, 0.65);
  color: #ffd28a;
}

.api-key-console__actions button.is-warning:hover {
  border-color: rgba(255, 183, 77, 0.92);
  color: #ffe0ae;
}

.api-key-console__actions button.is-danger {
  border-color: rgba(255, 141, 141, 0.6);
  color: #ffbcbc;
}

.api-key-console__actions button.is-danger:hover {
  border-color: rgba(255, 141, 141, 0.9);
  color: #ffd9d9;
}

.api-key-console__empty {
  text-align: center !important;
  color: rgba(191, 204, 222, 0.72);
}

.api-key-console__load-error {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.api-key-console__load-error p {
  margin: 0;
}

.api-key-console__retry {
  border: 1px solid rgba(29, 227, 192, 0.45);
  border-radius: 9px;
  padding: 5px 10px;
  background: rgba(14, 37, 41, 0.7);
  color: #7cebd6;
  cursor: pointer;
}

.api-key-console__retry:hover {
  border-color: rgba(29, 227, 192, 0.72);
}

.api-key-console__tip {
  margin: 0;
  padding: 10px 14px;
  color: rgba(199, 212, 233, 0.78);
  font-size: 0.82rem;
}

.api-key-console__notice {
  margin: 16px 0 0;
  border: 1px solid rgba(29, 227, 192, 0.45);
  border-radius: 10px;
  padding: 12px;
  background: rgba(7, 29, 31, 0.75);
}

.api-key-console__notice h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
  color: #70edd6;
}

.api-key-console__notice pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  color: #e7f8f4;
}

.api-key-console__notice-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.api-key-console__notice-actions button {
  border-radius: 8px;
  border: 1px solid rgba(29, 227, 192, 0.6);
  background: rgba(14, 37, 41, 0.7);
  color: #7cebd6;
  padding: 6px 10px;
  cursor: pointer;
}

.api-key-console__toast {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 30;
  border: 1px solid rgba(29, 227, 192, 0.4);
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(7, 29, 31, 0.92);
  color: #2be8c7;
}

.api-key-console__toast.is-error {
  border-color: rgba(255, 141, 141, 0.5);
  color: #ffc2c2;
}

.api-key-console__modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(2px);
}

.api-key-console__modal {
  width: min(920px, calc(100vw - 28px));
  border: 1px solid rgba(122, 148, 184, 0.28);
  border-radius: 14px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(35, 50, 59, 0.94), rgba(32, 46, 56, 0.96));
  color: #ebf3ff;
  position: relative;
}

.api-key-console__modal h3 {
  margin: 0 0 20px;
  font-size: 2rem;
}

.api-key-console__modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  border: none;
  background: transparent;
  color: rgba(215, 223, 235, 0.62);
  cursor: pointer;
  font-size: 1.2rem;
}

.api-key-console__field {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.api-key-console__field > span {
  color: rgba(227, 236, 247, 0.72);
  font-size: 1rem;
}

.api-key-console__field-input {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(16, 22, 34, 0.88);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
}

.api-key-console__field-input input {
  border: none;
  width: 100%;
  color: #edf4ff;
  background: transparent;
  outline: none;
  font-size: 0.98rem;
}

.api-key-console__field-input em {
  color: rgba(203, 215, 235, 0.62);
  font-style: normal;
  font-size: 0.86rem;
  white-space: nowrap;
}

.api-key-console__field-input.is-static {
  color: rgba(231, 241, 255, 0.9);
}

.api-key-console__hint {
  margin: -8px 0 12px 132px;
  color: rgba(213, 224, 243, 0.64);
}

.api-key-console__field-error {
  margin: -8px 0 12px 132px;
  color: #ff9da6;
}

.api-key-console__confirm {
  display: block;
  margin: 0 auto;
  width: min(560px, calc(100% - 24px));
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #001612;
  background: #16d4ae;
  cursor: pointer;
}

.api-key-console__confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .api-key-console {
    padding: 16px;
  }

  .api-key-console__header h1 {
    font-size: 1.5rem;
  }

  .api-key-console__tab {
    font-size: 1.3rem;
  }

  .api-key-console__card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .api-key-console__head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .api-key-console__table th,
  .api-key-console__table td {
    white-space: nowrap;
  }

  .api-key-console__field {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .api-key-console__field-error {
    margin-left: 0;
  }

  .api-key-console__hint {
    margin-left: 0;
  }
}
