:root {
  color-scheme: dark;
  --bg: #0d0f14;
  --panel: #1a1d24;
  --panel-soft: #20242d;
  --line: rgba(255, 255, 255, 0.06);
  --text: #eef4ff;
  --muted: #8e98a8;
  --cyan: #13e5ff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

body {
  overflow: hidden;
}

.account-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 68% 8%, rgba(255, 255, 255, 0.05), transparent 10%),
    radial-gradient(circle at 72% 78%, rgba(0, 214, 255, 0.03), transparent 14%),
    #0d0f14;
}

.account-auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.account-back-link {
  position: fixed;
  top: 22px;
  left: 24px;
  color: #cfe6ff;
  text-decoration: none;
}

.auth-card {
  width: min(100%, 520px);
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(33, 37, 46, 0.98), rgba(22, 25, 31, 0.98)),
    var(--panel);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #fff, transparent 16%),
    linear-gradient(135deg, #1be3ff, #2564ff);
  box-shadow: 0 0 24px rgba(0, 214, 255, 0.34);
}

.auth-brand h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.auth-brand p {
  margin: 0;
  color: var(--muted);
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.auth-tab {
  flex: 1;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: #cfe0f4;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.auth-tab.active {
  color: #fff;
  border-color: rgba(19, 229, 255, 0.22);
  background: linear-gradient(180deg, rgba(0, 214, 255, 0.16), rgba(7, 45, 57, 0.38));
}

.auth-tab:hover {
  transform: translateY(-1px);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field span {
  color: #cbd7e7;
  font-size: 14px;
}

.auth-field input {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  outline: 0;
  color: #edf6ff;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.auth-field input:focus {
  border-color: rgba(19, 229, 255, 0.34);
  box-shadow: 0 0 0 3px rgba(13, 140, 164, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.auth-captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px;
  gap: 12px;
}

.captcha-box {
  display: grid;
  place-items: center;
  min-height: 78px;
  border-radius: 14px;
  border: 1px solid rgba(0, 214, 255, 0.14);
  background: rgba(7, 26, 34, 0.48);
  cursor: pointer;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.captcha-box img,
.captcha-box svg {
  display: block;
  max-width: 100%;
}

.captcha-box:hover {
  transform: translateY(-1px);
  border-color: rgba(19, 229, 255, 0.24);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.16);
}

.auth-error {
  margin: 0;
  min-height: 20px;
  color: #ff8f96;
  font-size: 13px;
}

.auth-submit {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  color: #03222b;
  font-weight: 700;
  background: linear-gradient(180deg, #1be0ff, #06bbdd);
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(0, 214, 255, 0.26);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(0, 214, 255, 0.3);
}

.auth-submit:disabled {
  opacity: 0.68;
  cursor: wait;
}

.account-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 466px;
  gap: 28px;
  height: 100vh;
  min-height: 0;
  padding: 22px 24px 24px;
}

.account-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.account-main-head {
  display: grid;
  gap: 18px;
  padding: 6px 4px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.account-main-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-main-title h1 {
  margin: 0;
  font-size: 26px;
}

.account-back-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(0, 214, 255, 0.18);
  color: #99efff;
  text-decoration: none;
  background: rgba(8, 37, 45, 0.56);
}

.account-main-tools {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.works-tabs {
  display: inline-flex;
  padding: 5px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.works-tabs button,
.works-batch-btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #cfd8e6;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.works-tabs button.active {
  color: #fff;
  border-color: rgba(0, 214, 255, 0.24);
  background: linear-gradient(180deg, rgba(0, 214, 255, 0.18), rgba(10, 57, 70, 0.36));
}

.works-notice {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(245, 181, 74, 0.34);
  color: #ffca74;
  background: rgba(84, 55, 16, 0.24);
}

.works-board {
  min-height: 0;
  display: grid;
  place-items: center;
}

.works-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #8892a0;
}

.works-empty-icon {
  font-size: 54px;
  opacity: 0.72;
}

.account-sidebar {
  min-width: 0;
  padding-right: 4px;
}

.account-sidebar-scroll {
  height: calc(100vh - 48px);
  overflow-y: auto;
  padding-right: 8px;
  overscroll-behavior: contain;
}

.account-sidebar-scroll::-webkit-scrollbar {
  width: 8px;
}

.account-sidebar-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.profile-card,
.feature-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(28, 31, 38, 0.96);
}

.profile-card {
  padding: 18px 26px 22px;
}

.profile-card-head,
.feature-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  font-size: 18px;
  font-weight: 700;
}

.id-pill {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 214, 255, 0.22);
  color: #0fe5ff;
  background: rgba(10, 42, 53, 0.42);
  cursor: pointer;
}

.profile-summary {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-avatar {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.95), transparent 20%),
    linear-gradient(135deg, #e3f3ff, #8eb5ff 42%, #3b8bff);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
  color: #f5fbff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-name-group h2 {
  margin: 0 0 10px;
  font-size: 32px;
}

.profile-name-group span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  color: #d0d8e5;
  background: rgba(255,255,255,0.04);
}

.profile-fields,
.profile-metrics {
  display: grid;
}

.profile-fields {
  gap: 22px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-row,
.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-row > div,
.metric-row {
  min-width: 0;
}

.profile-row span,
.metric-row span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.profile-row strong,
.metric-row strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  color: #f0f6ff;
}

.profile-row button {
  min-width: 92px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 214, 255, 0.24);
  color: #0fe5ff;
  background: rgba(7, 37, 45, 0.44);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.profile-row button:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 214, 255, 0.34);
  background: rgba(10, 50, 61, 0.54);
}

.profile-metrics {
  padding-top: 18px;
}

.metric-row {
  min-height: 68px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-highlight {
  color: #11e8ff !important;
}

.feature-card {
  margin-top: 26px;
  padding: 0 18px 18px;
}

.feature-card-head {
  padding: 12px 2px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 18px;
}

.feature-item {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 16px 16px 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #eef5ff;
  background: rgba(255,255,255,0.025);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.feature-item span {
  color: var(--muted);
  font-size: 13px;
}

.feature-item:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.tone-gold { box-shadow: inset 3px 0 0 #c88a12; }
.tone-purple { box-shadow: inset 3px 0 0 #7a31d2; }
.tone-red { box-shadow: inset 3px 0 0 #cf4b52; }
.tone-green { box-shadow: inset 3px 0 0 #1fbd8e; }
.tone-blue { box-shadow: inset 3px 0 0 #417fff; }
.tone-cyan { box-shadow: inset 3px 0 0 #16d8d0; }
.tone-teal { box-shadow: inset 3px 0 0 #12bee0; }
.tone-indigo { box-shadow: inset 3px 0 0 #5553ff; }
.tone-pink { box-shadow: inset 3px 0 0 #d14695; }
.tone-yellow { box-shadow: inset 3px 0 0 #c99c0d; }

.logout-btn {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  border-radius: 12px;
  border: 1px solid rgba(189, 64, 77, 0.4);
  color: #ff6675;
  background: rgba(75, 21, 30, 0.34);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.logout-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 102, 117, 0.52);
  background: rgba(90, 26, 37, 0.44);
}

.account-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  min-width: 220px;
  max-width: min(90vw, 520px);
  padding: 12px 16px;
  border-radius: 12px;
  color: #eef6ff;
  background: rgba(18, 22, 30, 0.98);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 36px rgba(0,0,0,0.28);
  text-align: center;
}

.account-toast[hidden] {
  display: none !important;
}

.account-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 32px;
}

.account-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 8, 0.72);
  backdrop-filter: blur(14px);
}

.account-modal {
  position: relative;
  width: min(100%, 1180px);
  max-height: calc(100vh - 64px);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(28, 31, 40, 0.985), rgba(18, 20, 27, 0.985)),
    var(--panel);
  box-shadow:
    0 42px 120px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(32, 209, 255, 0.04);
}

.account-modal--usage {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
}

.account-modal--support,
.account-modal--payment {
  width: min(100%, 580px);
}

.account-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 34px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.account-modal-head--compact {
  align-items: center;
}

.account-modal-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-modal-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.account-modal-icon svg {
  width: 26px;
  height: 26px;
}

.account-modal-icon--solo {
  flex: 0 0 50px;
}

.account-modal-icon--green {
  color: #17d29b;
  background: linear-gradient(180deg, rgba(22, 117, 88, 0.38), rgba(8, 61, 49, 0.48));
}

.account-modal-icon--blue {
  color: #4c98ff;
  background: linear-gradient(180deg, rgba(40, 88, 174, 0.38), rgba(18, 45, 98, 0.48));
}

.account-modal-icon--cyan {
  color: #7ef3ff;
  background: linear-gradient(180deg, rgba(18, 123, 145, 0.4), rgba(12, 61, 77, 0.52));
  box-shadow:
    inset 0 0 0 1px rgba(39, 224, 255, 0.16),
    0 0 0 1px rgba(39, 224, 255, 0.08);
}

.account-modal-icon--gold {
  color: #ffd277;
  background: linear-gradient(180deg, rgba(143, 95, 21, 0.42), rgba(70, 46, 16, 0.56));
  box-shadow:
    inset 0 0 0 1px rgba(255, 210, 119, 0.14),
    0 0 24px rgba(255, 166, 43, 0.1);
}

.account-modal-head h2 {
  margin: 0;
  font-size: 22px;
}

.account-modal-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.account-modal-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.account-modal-close:hover {
  transform: translateY(-1px);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.usage-refund-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 34px;
  color: #ffbf4c;
  background: rgba(89, 61, 18, 0.34);
  border-top: 1px solid rgba(255, 191, 76, 0.05);
  border-bottom: 1px solid rgba(255, 191, 76, 0.08);
}

.usage-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 34px;
}

.usage-stat-card {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 84px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}

.usage-stat-card span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.usage-stat-card strong {
  font-size: 24px;
}

.usage-stat-highlight {
  color: #17d29b;
}

.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
}

.status-dot--success {
  background: #1ed48a;
  box-shadow: 0 0 0 4px rgba(30, 212, 138, 0.12);
}

.status-dot--refund {
  background: #ffb225;
  box-shadow: 0 0 0 4px rgba(255, 178, 37, 0.12);
}

.usage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 34px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.usage-range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.usage-range-tabs button,
.usage-export-btn {
  min-height: 30px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c7d1de;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.usage-range-tabs button.active {
  color: #6ff5ff;
  border-color: rgba(27, 225, 255, 0.26);
  background: rgba(11, 90, 103, 0.36);
}

.usage-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.usage-select {
  min-width: 164px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dfe9f6;
  background: rgba(255, 255, 255, 0.03);
}

.usage-export-btn {
  color: #6aa9ff;
  border-color: rgba(88, 144, 255, 0.28);
  background: rgba(31, 63, 122, 0.22);
}

.usage-table-shell {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.usage-table-head {
  display: grid;
  grid-template-columns: 1.7fr 0.8fr 1fr 0.8fr 0.9fr 0.9fr 0.9fr 1.4fr 1.4fr;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  color: rgba(255, 255, 255, 0.44);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.usage-table-body {
  min-height: 440px;
  max-height: calc(100vh - 350px);
  overflow: auto;
}

.account-modal--api {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
}

.api-key-create-card,
.api-key-secret-card,
.api-key-doc-card {
  margin: 16px 34px 0;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 207, 104, 0.1), transparent 30%),
    rgba(255, 255, 255, 0.026);
}

.api-key-create-card {
  display: grid;
  grid-template-columns: 1.2fr minmax(220px, 0.7fr) auto;
  align-items: end;
  gap: 16px;
}

.api-key-create-card strong,
.api-key-doc-card strong {
  display: block;
  font-size: 16px;
}

.api-key-create-card span,
.api-key-doc-card p,
.api-key-create-card label span {
  color: var(--muted);
}

.api-key-create-card label {
  display: grid;
  gap: 8px;
}

.api-key-create-card input {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #eef6ff;
  background: rgba(0, 0, 0, 0.18);
  outline: none;
}

.api-key-primary-btn,
.api-key-secret-card button,
.api-key-row-actions button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  color: #16130b;
  font-weight: 800;
  background: linear-gradient(135deg, #ffe39b, #ffad3d);
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

.api-key-primary-btn:hover,
.api-key-secret-card button:hover,
.api-key-row-actions button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.api-key-secret-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border-color: rgba(255, 197, 90, 0.18);
  background: rgba(91, 62, 16, 0.28);
}

.api-key-secret-card span {
  color: #ffd277;
}

.api-key-secret-card code,
.api-key-doc-card code,
.api-key-table-row code {
  font-family: "Space Grotesk", monospace;
}

.api-key-secret-card code {
  min-width: 0;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 12px;
  color: #fff6dc;
  background: rgba(0, 0, 0, 0.22);
}

.api-key-endpoints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 10px;
}

.api-key-endpoints code,
.api-key-doc-card p code {
  padding: 5px 8px;
  border-radius: 8px;
  color: #a9f4ff;
  background: rgba(26, 153, 174, 0.14);
}

.api-key-doc-card p {
  margin: 0;
}

.api-key-table-shell {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.api-key-table-head,
.api-key-table-row {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr 0.9fr 0.7fr 0.9fr 0.9fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px 34px;
}

.api-key-table-head {
  color: rgba(255, 255, 255, 0.46);
  font-size: 13px;
}

.api-key-table-body {
  overflow: auto;
  max-height: calc(100vh - 520px);
  min-height: 230px;
}

.api-key-table-row {
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.api-key-table-row span {
  min-width: 0;
}

.api-key-table-row strong,
.api-key-table-row small {
  display: block;
}

.api-key-table-row small {
  margin-top: 4px;
  color: var(--muted);
}

.api-key-table-row code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #dce9fb;
}

.api-key-status-active {
  color: #28df9c;
}

.api-key-status-revoked {
  color: #ff7f73;
}

.api-key-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.api-key-row-actions button {
  min-height: 32px;
  padding: 0 10px;
  color: #eaf5ff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}

.api-key-row-actions button[data-api-key-delete] {
  color: #ffbbb3;
  background: rgba(255, 95, 74, 0.12);
}

.api-key-empty-state {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  color: var(--muted);
}

.api-key-empty-state strong {
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
}

.usage-empty-state,
.payment-empty-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  place-content: center;
  gap: 14px;
  padding: 40px 20px 56px;
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
}

.usage-empty-state strong,
.payment-empty-state strong {
  color: rgba(255, 255, 255, 0.66);
  font-size: 18px;
}

.usage-empty-state p,
.payment-empty-state p {
  margin: 0;
}

.usage-empty-icon,
.payment-empty-icon {
  color: rgba(255, 255, 255, 0.18);
}

.usage-empty-icon svg,
.payment-empty-icon svg {
  width: 62px;
  height: 62px;
}

.payment-empty-state {
  min-height: 330px;
}

.support-card {
  margin: 0 34px 0;
  padding: 22px 28px 24px;
  border-radius: 24px;
  border: 1px solid rgba(43, 229, 255, 0.12);
  background:
    radial-gradient(circle at 0% 100%, rgba(32, 214, 255, 0.08), transparent 28%),
    rgba(20, 22, 30, 0.94);
}

.support-agent {
  display: flex;
  align-items: center;
  gap: 16px;
}

.support-agent-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #14e1ff;
  font-size: 28px;
  background: rgba(12, 104, 121, 0.26);
  box-shadow: inset 0 0 0 1px rgba(36, 218, 255, 0.12);
}

.support-agent strong {
  display: block;
  font-size: 18px;
}

.support-agent span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--muted);
}

.support-divider {
  height: 1px;
  margin: 22px 0 20px;
  background: linear-gradient(90deg, rgba(39, 224, 255, 0.14), rgba(255, 255, 255, 0.04), rgba(39, 224, 255, 0.14));
}

.support-qr-panel {
  display: grid;
  place-items: center;
}

.support-qr-frame {
  width: 212px;
  min-height: 212px;
  max-height: 264px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, #fefefe, #eef4f8);
  overflow: hidden;
  box-shadow:
    0 0 0 2px rgba(33, 216, 255, 0.14),
    0 20px 44px rgba(0, 0, 0, 0.22);
}

.support-qr-frame img,
.support-qr-frame svg {
  width: 100%;
  height: auto;
  max-height: 264px;
  display: block;
  object-fit: contain;
}

.support-info-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 16px 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(35, 211, 255, 0.12);
  background: rgba(21, 41, 46, 0.52);
}

.support-info-card--muted {
  background: rgba(25, 45, 52, 0.46);
}

.support-info-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 700;
}

.support-info-icon--wechat {
  color: #7fe26d;
  background: rgba(34, 117, 63, 0.3);
}

.support-info-icon--clock {
  color: #8f7cff;
  background: rgba(57, 54, 122, 0.32);
}

.support-info-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.support-info-copy span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.support-info-copy strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  word-break: break-all;
}

.support-copy-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #12ecff;
  background: rgba(13, 118, 137, 0.42);
  cursor: pointer;
}

.support-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 22px 34px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.support-primary-btn,
.support-secondary-btn {
  min-height: 54px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.support-primary-btn {
  border: 0;
  color: #02222a;
  font-weight: 700;
  background: linear-gradient(180deg, #25dfff, #14bed8);
  box-shadow: 0 16px 34px rgba(18, 213, 238, 0.24);
}

.support-secondary-btn {
  border: 1px solid rgba(33, 211, 255, 0.22);
  color: #44ebff;
  background: rgba(14, 57, 66, 0.4);
}

.support-primary-btn:hover,
.support-secondary-btn:hover,
.support-copy-btn:hover,
.usage-range-tabs button:hover,
.usage-export-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 1280px) {
  .account-dashboard {
    grid-template-columns: minmax(0, 1fr) 420px;
  }
}

@media (max-width: 960px) {
  body {
    overflow: auto;
  }

  .account-dashboard {
    grid-template-columns: 1fr;
    height: auto;
  }

  .account-sidebar-scroll {
    height: auto;
    overflow: visible;
  }

  .account-main-tools {
    grid-template-columns: 1fr;
  }

  .works-tabs {
    flex-wrap: wrap;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .account-modal-layer {
    padding: 16px;
  }

  .account-modal {
    max-height: calc(100vh - 32px);
  }

  .account-modal--usage {
    width: 100%;
  }

  .usage-stats,
  .usage-toolbar,
  .account-modal-head,
  .support-card,
  .support-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .usage-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .usage-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .usage-toolbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .usage-select,
  .usage-export-btn {
    width: 100%;
  }

  .usage-table-head {
    min-width: 900px;
  }

  .usage-table-body {
    max-height: calc(100vh - 420px);
  }

  .support-actions {
    grid-template-columns: 1fr;
  }
}

/* bb2-style account refinement */
.account-dashboard {
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 30px;
  padding: 28px 34px 28px 42px;
  background:
    radial-gradient(circle at 58% 12%, rgba(255, 255, 255, 0.035), transparent 11%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012), transparent 18%),
    #0f0f12;
}

.account-main {
  grid-template-columns: 74px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 24px;
}

.account-main-head {
  display: contents;
}

.account-main-title {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: start;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  padding-top: 44px;
}

.account-main-title h1 {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.12em;
  font-size: 30px;
  line-height: 1.15;
}

.account-back-button {
  width: 24px;
  height: 40px;
  border-radius: 8px;
  color: #00cae0;
  background: rgba(0, 202, 224, 0.1);
  border-color: rgba(0, 202, 224, 0.3);
}

.account-main-tools {
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: auto minmax(280px, 1fr) 84px;
  gap: 20px;
  align-items: center;
  padding: 34px 0 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.works-tabs {
  min-height: 40px;
  padding: 4px;
  gap: 2px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.works-tabs button {
  min-height: 32px;
  min-width: 58px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.52);
  background: transparent;
}

.works-tabs button.active {
  color: #00d6eb;
  background: rgba(0, 202, 224, 0.12);
  box-shadow: 0 0 0 1px rgba(0, 202, 224, 0.2);
}

.works-notice {
  min-height: 38px;
  padding: 0 16px;
  border-color: rgba(251, 191, 36, 0.42);
  border-radius: 8px;
  color: #ffd27a;
  background: rgba(251, 191, 36, 0.09);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.06);
}

.works-notice::before {
  content: "*";
  margin-right: 8px;
  color: #fbbf24;
}

.works-batch-btn {
  min-height: 78px;
  padding: 0 16px;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
}

.works-board {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  min-height: 0;
  border-radius: 0;
}

.works-board::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.026), transparent 22%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018), transparent 20%, transparent 80%, rgba(255, 255, 255, 0.012));
}

.works-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  width: 100%;
  padding: 4px 0 20px;
  align-content: start;
}

.works-card {
  display: grid;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(18, 20, 27, 0.96), rgba(15, 17, 24, 0.92));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.works-card-media {
  min-height: 196px;
  max-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(0, 214, 255, 0.14), transparent 42%),
    rgba(8, 10, 16, 0.96);
}

.works-card-media img,
.works-card-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #07090f;
}

.works-card-media audio {
  width: calc(100% - 24px);
}

.works-card-media.is-audio {
  padding: 24px 12px;
}

.works-card-media.is-pending {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.works-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.works-card-meta,
.works-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.works-card-meta {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
}

.works-card-type,
.works-card-status {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.works-card-title {
  color: #f5f7fb;
  font-size: 15px;
  line-height: 1.4;
}

.works-card-prompt {
  min-height: 40px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.works-card-foot {
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
}

.works-card-link {
  color: #4fe3ff;
  text-decoration: none;
}

.works-card-link:hover {
  text-decoration: underline;
}

.works-card-task {
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
  word-break: break-all;
}

.works-empty {
  position: relative;
  gap: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.works-empty-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  font-size: 42px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  opacity: 0.8;
}

.account-sidebar {
  position: relative;
  padding-right: 0;
}

.account-sidebar-scroll {
  height: calc(100vh - 56px);
  padding-right: 0;
}

.profile-card,
.feature-card {
  border-color: rgba(255, 255, 255, 0.085);
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 28%),
    rgba(27, 28, 33, 0.72);
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 70px rgba(0, 0, 0, 0.22);
}

.profile-card {
  padding: 22px 26px 26px;
}

.profile-card-head,
.feature-card-head {
  min-height: 38px;
  font-size: 17px;
}

.profile-summary {
  padding: 22px 0 28px;
  gap: 18px;
}

.profile-avatar {
  width: 82px;
  height: 82px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.9), transparent 18%),
    linear-gradient(145deg, #f7fbff, #9fb9d6 48%, #5a6e91);
}

.profile-name-group h2 {
  font-size: 21px;
  margin-bottom: 8px;
}

.profile-name-group span {
  min-height: 28px;
  padding: 0 12px;
  font-size: 13px;
}

.profile-fields {
  gap: 0;
  padding: 18px 0;
}

.profile-row {
  min-height: 84px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-row span,
.metric-row span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 14px;
}

.profile-row strong,
.metric-row strong {
  margin-top: 9px;
  font-size: 15px;
}

.profile-row button,
.id-pill {
  border-color: rgba(0, 202, 224, 0.28);
  color: #00d6eb;
  background: rgba(0, 202, 224, 0.08);
}

.profile-metrics {
  padding-top: 12px;
}

.metric-row {
  min-height: 54px;
}

.metric-highlight {
  color: #18dcff !important;
}

.feature-card {
  margin-top: 24px;
  padding: 0 16px 18px;
}

.feature-grid {
  gap: 10px;
  padding-top: 16px;
}

.feature-item {
  position: relative;
  min-height: 65px;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(27, 28, 33, 0.6);
}

.feature-item::before {
  content: "✦";
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--feature-color, #00cae0);
  background: color-mix(in srgb, var(--feature-color, #00cae0) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--feature-color, #00cae0) 20%, transparent);
}

.feature-item strong {
  align-self: end;
  font-size: 14px;
}

.feature-item span {
  align-self: start;
  font-size: 12px;
  line-height: 1.2;
}

.tone-gold { --feature-color: #d99118; box-shadow: inset 3px 0 0 var(--feature-color); }
.tone-purple { --feature-color: #8a45e4; box-shadow: inset 3px 0 0 var(--feature-color); }
.tone-red { --feature-color: #df4d58; box-shadow: inset 3px 0 0 var(--feature-color); }
.tone-green { --feature-color: #22c993; box-shadow: inset 3px 0 0 var(--feature-color); }
.tone-blue { --feature-color: #4b85ff; box-shadow: inset 3px 0 0 var(--feature-color); }
.tone-cyan { --feature-color: #18d8d0; box-shadow: inset 3px 0 0 var(--feature-color); }
.tone-teal { --feature-color: #13c7e7; box-shadow: inset 3px 0 0 var(--feature-color); }
.tone-indigo { --feature-color: #6764ff; box-shadow: inset 3px 0 0 var(--feature-color); }
.tone-pink { --feature-color: #df4ba0; box-shadow: inset 3px 0 0 var(--feature-color); }
.tone-yellow { --feature-color: #d4a818; box-shadow: inset 3px 0 0 var(--feature-color); }

@media (max-width: 1280px) {
  .account-dashboard {
    grid-template-columns: minmax(0, 1fr) 400px;
    padding-left: 28px;
  }

  .account-main-tools {
    grid-template-columns: 1fr;
  }

  .works-batch-btn {
    min-height: 40px;
    width: max-content;
  }
}

@media (max-width: 960px) {
  .account-main {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-main-head {
    display: grid;
  }

  .account-main-title,
  .account-main-tools,
  .works-board {
    grid-column: auto;
    grid-row: auto;
  }

  .account-main-title {
    flex-direction: row;
    padding-top: 0;
  }

  .account-main-title h1 {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    letter-spacing: 0;
  }
}

/* Motion polish for account center. */
:root {
  --account-motion-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes accountLiftIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes accountModalIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .auth-card,
  .account-main,
  .account-sidebar {
    animation: accountLiftIn 520ms var(--account-motion-soft) both;
  }

  .account-sidebar {
    animation-delay: 80ms;
  }

  .account-modal:not([hidden]) {
    animation: accountModalIn 320ms var(--account-motion-soft) both;
  }
}

.auth-tab,
.auth-submit,
.captcha-box,
.account-back-link,
.account-back-button,
.works-tabs button,
.works-batch-btn,
.profile-row,
.feature-item,
.id-pill,
.modal-close,
.usage-export-btn {
  transition:
    transform 240ms var(--account-motion-soft),
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 240ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.auth-tab:hover,
.auth-submit:hover,
.captcha-box:hover,
.account-back-link:hover,
.account-back-button:hover,
.works-tabs button:hover,
.works-batch-btn:hover,
.feature-item:hover,
.id-pill:hover,
.usage-export-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.profile-row:hover {
  transform: translateX(-3px);
  border-color: rgba(250, 122, 26, 0.2);
}

.auth-submit:active,
.captcha-box:active,
.works-tabs button:active,
.feature-item:active,
.id-pill:active,
.usage-export-btn:active {
  transform: translateY(0) scale(0.975);
}

.auth-field input {
  transition:
    transform 220ms var(--account-motion-soft),
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.auth-field input:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(250, 122, 26, 0.12);
}

@media (max-width: 860px) {
  .api-key-create-card,
  .api-key-secret-card {
    grid-template-columns: 1fr;
  }

  .api-key-table-head {
    display: none;
  }

  .api-key-table-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 22px;
  }

  .api-key-table-row > span,
  .api-key-table-row code {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
