@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/inter-latin.woff2') format('woff2');
}

:root {
  font-family: Inter, system-ui, sans-serif;
  color: #181c20;
  background: #fff;
  font-synthesis: none;
  font-weight: 400;
  letter-spacing: -.01em;
  --muted: #666a70;
  --line: #e3e3e3;
  --surface: #f7f7f7;
  --ink: #212529;
  --metal-gradient: linear-gradient(105deg, #666, #212529);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button { border: 0; transition: background .15s, border-color .15s; }
button:disabled, select:disabled { cursor: wait; opacity: .5; }
button:focus-visible, a:focus-visible { outline: 2px solid #73777c; outline-offset: 4px; }
input:focus, select:focus { outline: 2px solid #92969b; outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
p { margin: 0; }
input { min-width: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.025em; }
svg { stroke: currentColor; stroke-width: 1.5; }

.site-header {
  height: 80px;
  padding: 0 max(40px, calc((100% - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand { display: flex; align-items: center; flex-shrink: 0; gap: 18px; }
.brand-wordmark { font-size: 24px; font-weight: 700; letter-spacing: -.6px; }
.brand-divider { height: 19px; border-left: 1px solid #d9d9d9; }
.console-label { font-size: 12px; font-weight: 400; color: var(--muted); }
.header-label { font-size: 12px; color: var(--muted); }
.identity { min-width: 0; display: flex; align-items: center; gap: 9px; font-size: 12px; }
#account-name { max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-dot { flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: #575d63; }
.text-button {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
  background: #fff;
  color: var(--ink);
  border: 1px solid #c8c9cb;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 500;
  margin-left: 15px;
  padding: 9px 13px;
}
.text-button:hover { background: #f3f3f3; border-color: #888; }

main { position: relative; isolation: isolate; }
main::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 760px;
  pointer-events: none;
  background-image:
    linear-gradient(to right, #181c2005 1px, transparent 1px),
    linear-gradient(to bottom, #181c2005 1px, transparent 1px),
    radial-gradient(ellipse at 50% 25%, #e7e9eb80, #fff0 75%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
  mask-image: linear-gradient(#000 0%, #000b 55%, transparent 100%);
}
.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #777b80;
  letter-spacing: .02em;
}
.site-footer span span { padding: 0 9px; color: #b3b5b8; }
.eyebrow { display: block; font-size: 10px; letter-spacing: .12em; font-weight: 500; color: #6b6f74; }

.login-view {
  min-height: calc(100svh - 151px);
  padding: 65px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 500px;
  max-width: 100%;
  padding: 40px 44px;
  border: 1px solid #dedfe1;
  border-radius: 4px;
  background: #fffffff5;
  box-shadow: 0 10px 40px #181c2004;
}
.login-card h1 { margin: 24px 0 18px; font-size: 44px; line-height: 1.1; letter-spacing: -.04em; }
.login-card h1 span {
  display: block;
  margin-top: 3px;
  color: #6b6b6b;
  text-shadow: 0 2px 4px #0000000a;
}
.login-intro { font-size: 13px; font-weight: 300; line-height: 1.85; color: #62666b; }
#login-form { margin-top: 30px; }
#login-form > label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 9px; }
.key-input { height: 48px; display: flex; align-items: center; border: 1px solid #d0d2d4; border-radius: 2px; background: #fff; overflow: hidden; }
.key-input:focus-within { outline: 2px solid #92969b; outline-offset: 2px; }
.key-input input { height: 100%; width: 100%; padding: 0 13px; border: 0; outline: none; background: none; color: var(--ink); font-size: 13px; }
.key-input input:focus { outline: none; }
.key-input input::placeholder { color: #8b8e93; }
.key-input button { height: 100%; padding: 0 14px; font-size: 11px; color: var(--muted); background: none; }
.key-input button:hover { color: #181c20; background: #fafafa; }
.primary-button { padding: 13px 20px; border-radius: 2px; background: var(--metal-gradient); color: #fff; font-size: 13px; font-weight: 500; }
.primary-button:hover { background: linear-gradient(105deg, #4c4c4c, #181c20); }
.login-button { margin-top: 16px; width: 100%; height: 46px; display: flex; align-items: center; justify-content: space-between; }
.login-button > span:last-child { font-size: 18px; font-weight: 400; }
.key-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 22px; color: #74787d; font-size: 11px; }
.key-note svg { width: 13px; height: 13px; }
.login-caption { margin-top: 23px; font-size: 11px; color: #767a80; }
.error { background: #fff7f6; color: #a3362c; font-size: 12px; line-height: 1.6; padding: 11px 13px; border-radius: 2px; margin-top: 12px; border: 1px solid #ecd8d5; }

.dashboard { max-width: 1120px; margin: 0 auto; padding-top: 46px; padding-bottom: 32px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { font-size: 42px; line-height: 1.15; margin: 12px 0 9px; }
.page-heading h1:focus { outline: none; }
.page-heading p { font-size: 13px; font-weight: 300; color: #62666b; }
.service-control { display: flex; align-items: center; gap: 11px; padding-bottom: 1px; }
.service-control label { font-size: 11px; color: var(--muted); }
.service-control select { width: 220px; max-width: 100%; padding: 10px 32px 10px 13px; border: 1px solid #cdd0d2; border-radius: 2px; background: #fff; color: #33383e; font-size: 12px; }
.page-heading > div:first-child { min-width: 0; }
.dashboard-error { margin: 0 0 20px; }

.usage-card { border: 1px solid #dfe0e2; border-radius: 4px; background: #fffffff5; padding: 29px 32px 0; box-shadow: 0 4px 16px #181c2003; }
.usage-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.period-label { font-size: 19px; font-weight: 400; letter-spacing: -.025em; color: #61666c; }
.period-badge { display: flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid #e6e7e8; border-radius: 2px; background: #fafafa; color: #676d73; font-size: 10px; }
.period-badge > span { width: 5px; height: 5px; border-radius: 50%; background: #737a81; }
.usage-amount { display: flex; align-items: baseline; gap: 15px; margin-top: 20px; }
#used { font-size: 58px; font-weight: 700; line-height: 1.15; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.usage-unit { font-size: 11px; color: #777c82; }
.quota-line { font-size: 17px; font-weight: 300; color: #6b7076; margin-top: 7px; }
progress { display: block; appearance: none; width: 100%; height: 8px; margin-top: 24px; border: 0; border-radius: 2px; overflow: hidden; background: #efeff0; }
progress::-webkit-progress-bar { background: #efeff0; border-radius: 2px; }
progress::-webkit-progress-value { background: var(--metal-gradient); border-radius: 2px; }
progress::-moz-progress-bar { background: var(--metal-gradient); border-radius: 2px; }
.usage-card-bottom { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; margin-bottom: 25px; font-size: 11px; color: #767b81; }
.usage-card-bottom p:first-child { display: flex; gap: 5px; align-items: center; }
.usage-card-bottom strong { color: #343a40; font-weight: 500; }
.remaining-dot { width: 5px; height: 5px; border-radius: 50%; background: #656b72; margin-right: 3px; }
#consumed { color: #40464d; }
.usage-card.over-quota { border-color: #e6b7b1; }
.over-quota #used, .over-quota #consumed, .over-quota #overage-summary, .over-quota #overage-summary strong { color: #b42318; }
.over-quota progress::-webkit-progress-value { background: #b42318; }
.over-quota progress::-moz-progress-bar { background: #b42318; }
.overage-note { margin: -9px 0 22px; color: #b42318; font-size: 11px; line-height: 1.6; }
.usage-note { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-top: 1px solid #ededee; font-size: 10px; color: #74797f; }
.utc-tag { font-size: 9px; font-weight: 400; margin-left: 3px; letter-spacing: .03em; color: #7d8287; }

.history-section { margin-top: 35px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.history-heading h2 { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 600; }
.count-badge { padding: 2px 5px; border: 1px solid #e3e4e5; border-radius: 2px; background: #f4f4f5; color: #6b7178; font-size: 10px; font-weight: 400; letter-spacing: 0; }
.history-heading p { font-size: 11px; color: #74797f; margin-top: 8px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 8px 13px; border: 1px solid #c9cccf; border-radius: 2px; background: #fff; color: #343a40; font-size: 11px; font-weight: 500; }
.secondary-button:hover { background: #f4f4f4; border-color: #8b9096; }
.refresh-icon { font-size: 17px; line-height: 1; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.search-field { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 340px; }
.search-field svg { flex-shrink: 0; width: 16px; height: 16px; color: #81868c; }
.search-field input { width: 100%; padding: 8px 2px; border: 0; background: transparent; color: #42494f; font-size: 11px; }
.search-field input::placeholder { color: #777e85; }
.date-filters { display: flex; align-items: center; gap: 10px; }
.date-filters label { display: flex; align-items: center; gap: 7px; color: #767c82; font-size: 10px; }
.date-filters input { min-height: 32px; padding: 6px 8px; border: 1px solid #d5d7da; border-radius: 2px; background: #fff; color: #59616a; font-size: 10px; }
.date-divider { color: #a1a5ab; font-size: 11px; }
.apply-button { height: 32px; }
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; }
th { padding: 14px 18px; border-bottom: 1px solid #e4e5e7; background: #f8f9fa; color: #68717b; font-size: 10px; font-weight: 500; }
td { padding: 15px 18px; border-bottom: 1px solid #ededee; color: #626a73; font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfc; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.endpoint, .muted-cell { overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.endpoint { max-width: 240px; color: #343d47; }
.muted-cell { max-width: 140px; color: #787f87; }
.status-badge { display: inline-block; padding: 3px 6px; border: 1px solid transparent; border-radius: 2px; font-size: 9px; font-weight: 500; }
.status-badge.success { background: #f1f3f4; color: #505a64; border-color: #e3e6e8; }
.status-badge.error-status { background: #fff2f0; color: #a0483a; border-color: #efdcd7; }
.status-badge.other { background: #f5f3ec; color: #7a6c43; border-color: #ebe6d8; }
.billing-cell { font-size: 10px; }
.billing-cell.billable { color: #4f5964; }
.billing-cell.nonbillable { color: #818790; }
.table-footer { display: flex; justify-content: space-between; gap: 16px; padding: 13px 18px; border-top: 1px solid #ededee; background: #fdfdfd; color: #7b838c; font-size: 10px; }
.empty-state { padding: 49px 20px 54px; text-align: center; }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-bottom: 15px; border: 1px solid #e5e6e7; border-radius: 2px; background: #f7f7f7; color: #7c848c; font-size: 23px; }
.empty-state h3 { font-size: 15px; font-weight: 500; color: #515a65; }
.empty-state p { margin-top: 8px; font-size: 11px; color: #777f89; }
.dashboard[aria-busy=true] .usage-card, .dashboard[aria-busy=true] .table-card { opacity: .55; }

@media (max-width: 1200px) {
  .dashboard, .site-footer { margin-left: 40px; margin-right: 40px; }
  th, td { padding-left: 14px; padding-right: 14px; }
  .filter-bar { gap: 12px; }
  .date-filters { gap: 7px; }
}

@media (max-width: 760px) {
  .site-header { height: 68px; padding: 0 22px; gap: 12px; }
  .brand { gap: 13px; }
  .brand-wordmark { font-size: 22px; }
  .console-label { font-size: 11px; }
  .header-label { display: none; }
  .identity { font-size: 11px; gap: 6px; }
  .text-button { margin-left: 6px; padding: 7px 9px; gap: 8px; font-size: 10px; }
  .dashboard { margin: 0 22px; padding-top: 32px; padding-bottom: 26px; }
  .page-heading { gap: 12px; margin-bottom: 24px; }
  .page-heading h1 { font-size: 34px; margin-top: 10px; }
  .page-heading p { font-size: 12px; line-height: 1.5; max-width: 220px; }
  .eyebrow { font-size: 9px; letter-spacing: .08em; }
  .service-control { display: block; }
  .service-control label { display: block; font-size: 10px; margin-bottom: 6px; }
  .service-control select { width: 170px; padding: 9px; font-size: 11px; }
  .usage-card { padding: 23px 22px 0; }
  .period-label { font-size: 17px; }
  .period-badge { padding: 5px 7px; font-size: 8px; gap: 4px; }
  #used { font-size: 48px; }
  .usage-amount { gap: 10px; }
  .usage-unit { font-size: 10px; }
  .quota-line { font-size: 16px; }
  .usage-card-bottom { font-size: 10px; gap: 8px; }
  .usage-note { flex-direction: column; gap: 8px; font-size: 10px; }
  .history-section { margin-top: 30px; }
  .history-heading { gap: 12px; }
  .history-heading h2 { font-size: 17px; }
  .history-heading p { max-width: 225px; font-size: 11px; line-height: 1.6; }
  .filter-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .search-field { max-width: none; }
  .date-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; }
  .date-filters label { flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
  .date-filters input { width: 100%; min-width: 0; padding: 7px; }
  .date-divider { display: none; }
  .table-footer { padding: 12px; gap: 10px; font-size: 9px; }
  .table-footer > span:last-child { text-align: right; }
  .site-footer { margin: 0 22px; padding: 24px 0; font-size: 8px; }
  .site-footer span span { padding: 0 5px; }
  .login-view { min-height: calc(100svh - 136px); padding: 48px 22px; }
  .login-card { padding: 32px 30px; }
  .login-card h1 { font-size: 39px; }
  .login-intro { font-size: 12px; }
}

@media (max-width: 480px) {
  .brand-divider, .console-label { display: none; }
  .identity { max-width: 70%; }
  #account-name { max-width: 130px; }
  .login-card { padding: 30px 26px; }
  .login-card h1 { font-size: 35px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
