:root {
  font-family: Inter,"PingFang SC","Microsoft YaHei",sans-serif;
  color: #e7e9ec;
  background: #101214;
  font-size: 14px;
  --muted: #8c929d;
  --border: #303338;
  --green: #32e5a4;
  --card: #202326;
  --blue: #72a7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,input {
  font: inherit;
}

button,a,input {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .55;
}

button:focus-visible,input:focus-visible,a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

button {
  color: inherit;
}

button,a {
  transition: background .15s,color .15s;
}

a {
  text-decoration: none;
  color: inherit;
}

[hidden] {
  display: none!important;
}

h1,h2,h3,p {
  margin: 0;
}

button {
  border: 0;
}

input {
  min-width: 0;
  background: #141619;
  color: #eee;
  border: 1px solid #36393f;
  border-radius: 8px;
  padding: 12px 14px;
}

input::placeholder {
  color: #626a76;
}

input:focus {
  border-color: var(--blue);
  outline: none;
}

button:hover {
  filter: brightness(1.13);
}

.primary {
  background: #4e85f8;
  border-radius: 8px;
  padding: 13px 18px;
  color: white;
  font-weight: 600;
}

.secondary {
  background: #25282d;
  border: 1px solid #3a3e46;
  border-radius: 7px;
  padding: 9px 13px;
}

.quiet {
  background: transparent;
  color: var(--muted);
  padding: 7px;
}

.error {
  color: #f79595;
  font-size: 13px;
  min-height: 19px;
}

.wide {
  width: 100%;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.mono,.usage-values,.stats-value,.account-title,.metric strong {
  font-family: "SFMono-Regular",Consolas,"Liberation Mono",monospace;
  font-variant-numeric: tabular-nums;
}

.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 0,#192235 0,transparent 58%);
}

.login-box {
  width: min(384px,calc(100% - 44px));
  padding: 28px 0 48px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 600;
  background: #27344e;
  color: #a7c5ff;
  border: 1px solid #415372;
  border-radius: 13px;
  margin: 0 auto 25px;
}

.login-box h1 {
  text-align: center;
  font-size: 26px;
  letter-spacing: -1px;
}

.login-box label {
  display: block;
  margin: 21px 0 9px;
  color: #c9cdd4;
  font-size: 13px;
}

.login-box input,.login-box .primary {
  width: 100%;
}

.password-input {
  position: relative;
}

.password-input input {
  padding-right: 57px;
}

.password-input button {
  position: absolute;
  right: 9px;
  top: 5px;
  bottom: 5px;
  color: #8b9aaf;
  background: transparent;
  font-size: 12px;
}

.login-box .error {
  margin: 15px 0;
}

.login-footer {
  text-align: center;
  color: #68717e;
  font-size: 12px;
  margin-top: 27px;
}

.topbar {
  height: 72px;
  border-bottom: 1px solid #272a2f;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 62px;
  background: #131517;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.5px;
}

.brand-icon {
  background: #2c3340;
  color: #d0e1ff;
  border: 1px solid #444e60;
  width: 29px;
  height: 29px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.user-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
}

.workspace {
  max-width: 1536px;
  margin: auto;
  padding: 38px 40px 20px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

h1 {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.5px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
  margin-bottom: 30px;
}

.metric {
  padding: 20px 22px;
  border: 1px solid #2d3036;
  background: #191b1f;
  border-radius: 11px;
}

.metric>span {
  color: #a0a6b0;
  font-size: 12px;
  display: block;
}

.metric strong {
  display: block;
  margin: 12px 0 9px;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -1px;
}

.metric small {
  color: #767e8a;
  font-size: 11px;
}

.toolbar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 29px;
}

.filters {
  display: flex;
  gap: 4px;
  background: #191c20;
  border: 1px solid #2b2e34;
  padding: 4px;
  border-radius: 8px;
}

.filter {
  padding: 7px 13px;
  background: transparent;
  color: #888f9b;
  border-radius: 5px;
  font-size: 12px;
}

.filter.selected {
  background: #31353d;
  color: #fff;
}

.toolbar-right {
  display: flex;
  gap: 10px;
}

.toolbar-right input {
  padding: 9px 12px;
  width: 210px;
  font-size: 12px;
}

.toolbar-right button {
  font-size: 12px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.account-card {
  position: relative;
  background: var(--card);
  border: 1px solid #383c42;
  border-radius: 14px;
  padding: 20px 20px 15px;
  overflow: hidden;
}

.account-card:before {
  content: "";
  position: absolute;
  top: 26px;
  left: 0;
  width: 3px;
  height: 25px;
  background: #af52ff;
  border-radius: 0 3px 3px 0;
}

.account-card.is-banned {
  opacity: .68;
}

.account-card.is-paused {
  opacity: .72;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-title {
  font-size: 13px;
  font-weight: 500;
  color: #c4cad4;
}

.account-title span {
  font-size: 11px;
  color: #747e8c;
  margin-left: 8px;
}

.tags {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: monospace;
  font-size: 10px;
  font-weight: 600;
}

.status-tag {
  color: #72a7ff;
}

.status-banned {
  color: #f17e8d;
}

.status-limited {
  color: #e2b363;
}

.status-paused {
  color: #8d939e;
}

.plan-tag {
  padding: 4px 7px;
  border-radius: 5px;
  background: #981bfa;
  color: #fff;
  letter-spacing: .3px;
}

.plan-pro {
  background: #3e5c97;
}

.email {
  color: #a0a8b5;
  margin: 14px 0 8px;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.subscription {
  font-size: 11px;
  color: #778391;
}

.subscription span {
  color: #abb1bb;
  margin-left: 8px;
}

.endpoint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #8d96a3;
  margin-top: 19px;
  margin-bottom: 20px;
}

.endpoint-chip {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #82dfa9;
  background: #133c2a;
  border: 1px solid #244733;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 10px;
}

.usage-block {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,1fr);
  gap: 15px;
}

.quota-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.quota-row {
  display: grid;
  grid-template-columns: 34px minmax(24px,1fr) 31px;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #aeb6c2;
}

.usage-track {
  height: 5px;
  border-radius: 4px;
  background: #3a3d43;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  width: var(--progress,0%);
  background: #7e97b9;
  border-radius: 4px;
  transition: width 1s linear;
}

.usage-fill.warm {
  background: #b49765;
}

.usage-fill.hot {
  background: #d48188;
}

.usage-values {
  text-align: right;
  font-size: 10px;
  color: #d6dbe3;
}

.reset-row {
  font-size: 9px;
  color: #7b8594;
  text-align: right;
  margin-top: 4px;
  height: 11px;
  font-family: monospace;
}

.stats-list {
  border-left: 1px solid #3a3e45;
  padding-left: 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 1px;
}

.stats-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  color: #8c98a8;
}

.stats-value {
  font-size: 11px;
  color: #bcc8d9;
  white-space: nowrap;
}

.token-count {
  display: block;
  text-align: right;
  font-size: 9px;
  color: #697789;
  margin-top: 4px;
}

.stats-total .stats-value {
  color: #e5e9f0;
  font-size: 12px;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #3a3d43;
  padding-top: 13px;
  margin-top: 17px;
  font-size: 10px;
  color: #8793a3;
}

.seat-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.seat-bar {
  width: 56px;
  background: #393d43;
  height: 4px;
  border-radius: 5px;
  overflow: hidden;
}

.seat-bar div {
  height: 100%;
  background: #7396c4;
  width: var(--progress,0%);
}

.seat-value {
  color: #c8d2de;
  font-family: monospace;
}

.toggle {
  width: 32px;
  height: 18px;
  border-radius: 20px;
  background: #575d66;
  position: relative;
  border: 0;
  padding: 0;
}

.toggle:after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  background: #171d21;
}

.toggle.on {
  background: #39c98c;
}

.toggle.on:after {
  left: 17px;
}

.readonly-state {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #81a993;
  font-size: 9px;
}

.readonly-state .dot {
  width: 5px;
  height: 5px;
}

.readonly-state.off {
  color: #8b929c;
}

.readonly-state.off .dot {
  background: #6e747e;
}

.empty {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}

.page-footer {
  border-top: 1px solid #25282e;
  color: #606a77;
  font-size: 10px;
  padding-top: 19px;
  display: flex;
  justify-content: space-between;
}

.error-banner {
  padding: 13px;
  background: #3c2d25;
  border: 1px solid #75503a;
  color: #edc3a7;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 12px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #303c36;
  color: #c3f6d8;
  border: 1px solid #4d6b5a;
  padding: 12px 20px;
  border-radius: 8px;
  z-index: 5;
  font-size: 13px;
}

dialog {
  border: 1px solid #414750;
  background: #1b1f24;
  color: #e9edf2;
  border-radius: 14px;
  width: min(430px,calc(100vw - 32px));
  padding: 25px;
}

dialog::backdrop {
  background: #0009;
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.dialog-head h2 {
  font-size: 18px;
}

.dialog-head button {
  font-size: 24px;
  padding: 0 5px;
}

dialog p {
  color: #919aa7;
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 16px;
}

dialog h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

dialog .wide {
  margin-bottom: 12px;
}

.dialog-divider {
  height: 1px;
  background: #353b44;
  margin: 10px 0 22px;
}

.danger {
  background: #552d35;
  color: #ffd0d6;
  border: 1px solid #85505a;
  border-radius: 7px;
  padding: 11px;
}

.progress-rules {
  font-size: 10px;
  color: #778595;
}

@media(min-width:1600px) {
  .cards {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .account-card {
    padding: 23px;
  }
  .quota-row {
    font-size: 12px;
    grid-template-columns: 37px minmax(35px,1fr) 34px;
  }
  .tags {
    font-size: 11px;
  }
  .stats-value {
    font-size: 12px;
  }
  .endpoint {
    font-size: 11px;
  }
}

@media(max-width:1150px) {
  .cards {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .workspace {
    padding: 30px 25px 20px;
  }
  .topbar {
    padding: 0 25px;
    gap: 40px;
  }
}

@media(max-width:700px) {
  .topbar {
    height: 62px;
    padding: 0 18px;
    gap: 24px;
  }
  .brand {
    font-size: 14px;
  }
  .brand-icon {
    width: 25px;
    height: 25px;
    font-size: 16px;
  }

  .user-tools {
    gap: 7px;
  }
  .user-tools>span {
    display: none;
  }
  .workspace {
    padding: 25px 16px 18px;
  }
  .page-heading {
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 21px;
  }

  .summary-grid {
    grid-template-columns: repeat(2,1fr);
    gap: 10px;
    margin-bottom: 22px;
  }
  .metric {
    padding: 16px;
  }
  .metric strong {
    font-size: 24px;
  }
  .metric small {
    font-size: 10px;
  }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
  }
  .filters {
    align-self: flex-start;
  }
  .filter {
    padding: 7px 11px;
    font-size: 11px;
  }
  .toolbar-right input {
    flex: 1;
    width: auto;
  }
  .cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .account-card {
    padding: 21px 23px 17px;
  }
  .account-title {
    font-size: 14px;
  }
  .tags {
    font-size: 11px;
  }
  .email {
    font-size: 13px;
  }
  .subscription {
    font-size: 12px;
  }
  .endpoint {
    font-size: 11px;
    margin-top: 18px;
  }
  .endpoint-chip {
    font-size: 11px;
  }
  .usage-block {
    gap: 20px;
  }
  .quota-row {
    font-size: 12px;
    grid-template-columns: 35px minmax(35px,1fr) 35px;
  }
  .usage-values {
    font-size: 11px;
  }
  .reset-row {
    font-size: 10px;
  }
  .stats-row {
    font-size: 11px;
  }
  .stats-value {
    font-size: 12px;
  }
  .token-count {
    font-size: 10px;
  }
  .stats-total .stats-value {
    font-size: 13px;
  }
  .card-bottom {
    font-size: 11px;
  }
  .readonly-state {
    font-size: 10px;
  }

  .page-footer {
    font-size: 9px;
    gap: 8px;
  }
}

@media(min-width:701px) and (max-width:1599px) {
  .account-card {
    padding: 23px;
  }
  .account-title {
    font-size: 14px;
  }
  .tags {
    font-size: 11px;
  }
  .email {
    font-size: 13px;
  }
  .subscription {
    font-size: 12px;
  }
  .endpoint {
    font-size: 11px;
  }
  .endpoint-chip {
    font-size: 11px;
  }
  .quota-row {
    font-size: 12px;
    grid-template-columns: 38px minmax(35px,1fr) 35px;
  }
  .usage-values {
    font-size: 12px;
  }
  .reset-row {
    font-size: 10px;
  }
  .stats-row {
    font-size: 11px;
  }
  .stats-value {
    font-size: 13px;
  }
  .token-count {
    font-size: 10px;
  }
  .stats-total .stats-value {
    font-size: 14px;
  }
  .card-bottom {
    font-size: 12px;
  }
  .readonly-state {
    font-size: 11px;
  }
}

