:root {
  --ink: #1c2739;
  --muted: #66758a;
  --blue: #1769d2;
  --line: #e5eaf1;
  --bg: #f6f8fb;
  --red: #b42332;
  --green: #16734b;
  font-family:
    "DejaVu Sans",
    Arial,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: var(--blue);
  text-decoration: none;
}
button {
  border: 0;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #94bfff;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin-bottom: 10px;
  font-weight: 650;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  font-weight: 650;
}
h3 {
  font-size: 15px;
  margin-bottom: 8px;
}
.muted {
  color: var(--muted);
  line-height: 1.6;
}
.eyebrow,
.nav-caption {
  font-size: 10px;
  letter-spacing: 0.13em;
  font-weight: 700;
  color: #8190a4;
}
.eyebrow {
  display: block;
  margin-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.brandmark {
  background: var(--blue);
  width: 30px;
  height: 32px;
  border-radius: 9px;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.brandmark:before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  width: 9px;
  height: 9px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}
.primary,
.secondary,
.danger,
.quiet {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  min-height: 38px;
  padding: 9px 15px;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
.primary {
  background: var(--blue);
  color: #fff;
}
.primary:hover {
  background: #125aba;
}
.secondary {
  background: #fff;
  color: #344158;
  border: 1px solid #d7dfe9;
}
.secondary:hover {
  background: #f1f5fa;
}
.quiet {
  background: transparent;
  color: var(--muted);
  padding: 8px;
}
.quiet:hover {
  background: #eef3f8;
}
.danger {
  background: #bd2639;
  color: #fff;
}
.success-tag {
  font-size: 11px;
  color: #156c48;
  background: #eaf8f0;
  padding: 5px 9px;
  border-radius: 6px;
  display: inline-block;
}
.sandbox-pill {
  font-size: 10px;
  font-weight: 700;
  color: #80550f;
  background: #fff4d9;
  border: 1px solid #f4e4b9;
  padding: 5px 9px;
  border-radius: 6px;
}
.signin {
  max-width: 440px;
  margin: 60px auto 30px;
  padding: 0 22px;
}
.signin > .brand {
  justify-content: center;
  margin-bottom: 36px;
}
.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 32px #182b4507;
}
.login-card h1 {
  font-size: 29px;
  margin-bottom: 16px;
}
.login-card form {
  margin-top: 26px;
}
.login-card .primary {
  width: 100%;
  margin-top: 10px;
}
.login-note {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  margin: 24px 0 0;
}
.back-link {
  display: block;
  text-align: center;
  margin: 24px 0;
  font-size: 12px;
}
label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  margin: 16px 0 7px;
}
input:not([type="checkbox"]),
textarea {
  width: 100%;
  border: 1px solid #cfd8e4;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  min-width: 0;
  outline: none;
}
input:focus,
textarea:focus {
  border-color: #4e91e8;
  box-shadow: 0 0 0 3px #e6f0ff;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}
.error {
  font-size: 12px;
  color: var(--red);
  line-height: 1.5;
  margin-top: 12px;
  min-height: 0;
}
.error:empty {
  display: none;
}
.app {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 224px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 27px 19px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.sidebar .brand {
  padding-left: 6px;
}
.nav-caption {
  display: block;
  margin: 42px 12px 12px;
  font-size: 9px;
  letter-spacing: 0.1em;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  color: #5b6b80;
  font-weight: 550;
  font-size: 12px;
  border-radius: 8px;
}
.sidebar nav a > span {
  font-size: 19px;
  width: 20px;
  text-align: center;
  font-weight: 400;
}
.sidebar nav a:hover {
  background: #f5f7fa;
}
.sidebar nav a.active {
  color: #1763c2;
  background: #eaf2fe;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 22px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
}
.sidebar-bottom span {
  font-size: 10px;
  color: #8a97a8;
}
.main {
  margin-left: 224px;
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 74px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 36px;
}
.top-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
}
.org-menu {
  position: relative;
  min-width: 0;
}
.org-menu summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  list-style: none;
}
.org-menu summary:after {
  content: "⌄";
  margin-left: 12px;
  color: var(--muted);
}
.menu-options {
  position: absolute;
  top: 34px;
  left: 0;
  z-index: 20;
  background: #fff;
  min-width: 240px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 30px #1e345419;
}
.menu-options button {
  width: 100%;
  padding: 12px;
  text-align: left;
  background: #fff;
  border-radius: 6px;
  color: var(--ink);
  font-size: 12px;
}
.menu-options button:hover {
  background: #eef4fc;
}
.mode-banner {
  padding: 11px 36px;
  background: #fafcfe;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: #718096;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  background: #d79e2c;
  border-radius: 50%;
}
.content {
  padding: 34px 36px 48px;
  max-width: 1320px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 27px;
}
.page-heading .eyebrow {
  margin-bottom: 9px;
}
.page-heading .muted {
  margin-bottom: 0;
  font-size: 12px;
}
.page-heading h1 {
  font-size: 26px;
}
.notice {
  background: #eaf2fc;
  color: #275b9a;
  border: 1px solid #d9e7fb;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.notice.bad {
  color: #923044;
  background: #fff0f1;
  border-color: #f5d4d8;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.metric span {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 15px;
}
.metric strong {
  display: block;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.metric small {
  display: block;
  color: #8a96a6;
  font-size: 10px;
  margin-top: 8px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
}
.panel-head {
  padding: 23px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.panel-head h2 {
  margin: 0;
  font-size: 16px;
}
.panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.panel-body {
  padding: 0 24px 24px;
}
.panel-body > p:last-child {
  margin-bottom: 0;
}
.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  margin-bottom: 12px;
}
.progress-track {
  height: 7px;
  border-radius: 10px;
  background: #edf1f6;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-fill {
  height: 100%;
  border-radius: 10px;
  background: #3e84dc;
  max-width: 100%;
}
.subtle {
  font-size: 11px;
  color: #8995a6;
  line-height: 1.6;
}
.budget-status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}
th {
  font-size: 10px;
  color: #7b899b;
  letter-spacing: 0.045em;
  font-weight: 600;
  background: #fcfdff;
  padding: 13px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 24px;
  border-bottom: 1px solid #eff2f6;
  color: #4c5b70;
  font-variant-numeric: tabular-nums;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-weight: 600;
  color: #334257;
}
th.num,
td.num {
  text-align: right;
}
.empty {
  padding: 38px 24px;
  text-align: center;
}
.empty h3 {
  margin-bottom: 8px;
  font-size: 14px;
}
.empty p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 auto;
  max-width: 480px;
}
.empty a {
  display: inline-block;
  margin-top: 17px;
  font-size: 12px;
  font-weight: 600;
}
.project-head {
  border-bottom: 1px solid var(--line);
}
.project-head h2 {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.env-label {
  font-size: 9px;
  letter-spacing: 0.035em;
  background: #eef3f8;
  color: #698097;
  padding: 4px 7px;
  border-radius: 5px;
  font-weight: 550;
}
.key-row {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid #eff2f6;
}
.key-row:last-child {
  border-bottom: 0;
}
.key-label {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: center;
}
.key-meta {
  margin-top: 7px;
  font-size: 10px;
  color: #8693a4;
  line-height: 1.6;
  word-break: break-word;
}
.key-meta code {
  color: #63778f;
}
.revoked {
  font-size: 10px;
  font-weight: 400;
  color: #8795a7;
}
.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.section-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid .panel-body {
  padding-top: 0;
}
.form-grid form .primary {
  margin-top: 16px;
}
.form-grid label {
  margin-top: 3px;
}
.currency-input {
  display: flex;
  align-items: center;
  border: 1px solid #cfd8e4;
  border-radius: 8px;
  overflow: hidden;
}
.currency-input span {
  padding: 0 12px;
  font-size: 11px;
  color: var(--muted);
}
.currency-input input {
  border: 0 !important;
  box-shadow: none !important;
  padding-left: 0;
}
.currency-input:focus-within {
  outline: 3px solid #e6f0ff;
  border-color: #4e91e8;
}
.doc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.doc-grid pre,
.code-block {
  font:
    11px/1.8 ui-monospace,
    SFMono-Regular,
    "DejaVu Sans Mono",
    monospace;
  background: #f5f8fc;
  border: 1px solid #e5ecf4;
  padding: 15px;
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #324966;
  max-width: 100%;
}
.doc-grid p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.code-inline {
  font:
    11px ui-monospace,
    monospace;
  color: #4d637f;
}
.outcome {
  font-size: 10px;
  padding: 4px 7px;
  border-radius: 5px;
  display: inline-block;
  background: #edf8f1;
  color: #1d7950;
}
.outcome.failure,
.outcome.cancelled,
.outcome.abandoned {
  background: #fff1e9;
  color: #a6622a;
}
.request-id {
  font:
    10px ui-monospace,
    monospace;
  color: #75869d;
}
.loading {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 100px #13233b38;
  padding: 28px;
  max-width: 480px;
  width: calc(100% - 32px);
  color: var(--ink);
  max-height: calc(100dvh - 40px);
  overflow: auto;
}
dialog::backdrop {
  background: #17283a66;
  backdrop-filter: blur(2px);
}
dialog .muted {
  font-size: 12px;
}
dialog form > .primary {
  width: 100%;
  margin-top: 12px;
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.dialog-heading .eyebrow {
  margin-bottom: 8px;
}
.dialog-heading .close-dialog {
  background: #f1f4f8;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  color: #68798d;
  font-size: 19px;
  flex-shrink: 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 23px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 22px 0 0;
  padding: 8px 12px 14px;
}
legend {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 6px;
}
.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 10px;
}
.scope-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 400;
  margin: 5px 0;
}
#key-created h2 {
  font-size: 23px;
  margin-top: 17px;
}
#key-secret {
  font:
    12px/1.6 ui-monospace,
    monospace;
  resize: none;
  background: #f5f8fc;
  word-break: break-all;
}
.mobile-only {
  display: none;
}
@media (min-width: 1550px) {
  .content {
    padding-top: 42px;
  }
  .metrics {
    gap: 20px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 196px;
    padding: 25px 12px;
  }
  .main {
    margin-left: 196px;
  }
  .topbar {
    padding: 0 24px;
  }
  .content {
    padding: 26px 24px;
  }
  .mode-banner {
    padding: 11px 24px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 17px 15px;
  }
  .metric strong {
    font-size: 22px;
  }
  .split,
  .doc-grid {
    grid-template-columns: 1fr;
  }
  .top-actions {
    gap: 8px;
  }
}
@media (max-width: 700px) {
  .app {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 17px 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    font-size: 16px;
    padding-left: 0;
  }
  .brandmark {
    width: 26px;
    height: 28px;
  }
  .brandmark:before {
    top: 5px;
    left: 6px;
  }
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    flex-direction: row;
    gap: 3px;
    overflow: auto;
    margin: 14px -4px 0;
    scrollbar-width: none;
  }
  .sidebar nav a {
    padding: 12px 10px 13px;
    white-space: nowrap;
    font-size: 11px;
    border-radius: 6px 6px 0 0;
    border-bottom: 2px solid transparent;
  }
  .sidebar nav a.active {
    border-bottom-color: var(--blue);
  }
  .sidebar nav a > span {
    display: none;
  }
  .main {
    margin: 0;
  }
  .topbar {
    height: 59px;
    padding: 0 16px;
    gap: 10px;
  }
  .org-menu summary {
    max-width: 190px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 11px;
  }
  .top-actions {
    gap: 6px;
  }
  .top-actions #user-name {
    display: none;
  }
  .top-actions .quiet {
    font-size: 10px;
    min-height: 32px;
  }
  .sandbox-pill {
    font-size: 9px;
    padding: 4px 6px;
  }
  .mode-banner {
    padding: 10px 16px;
    font-size: 10px;
    line-height: 1.5;
  }
  .content {
    padding: 23px 16px 40px;
  }
  .page-heading {
    margin-bottom: 21px;
    gap: 14px;
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .page-heading .muted {
    font-size: 11px;
  }
  .page-heading .secondary {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 10px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 19px;
  }
  .metric {
    padding: 16px;
  }
  .metric strong {
    font-size: 23px;
  }
  .metric span {
    font-size: 10px;
    margin-bottom: 12px;
  }
  .metric small {
    font-size: 9px;
  }
  .panel-head {
    padding: 19px 17px 16px;
  }
  .panel-head h2 {
    font-size: 14px;
  }
  .panel-body {
    padding: 0 17px 20px;
  }
  .panel-head .secondary {
    font-size: 10px;
    padding: 7px 10px;
    min-height: 34px;
  }
  .split,
  .form-grid,
  .doc-grid {
    display: block;
  }
  .key-row {
    padding: 17px;
    align-items: flex-start;
  }
  .key-label {
    font-size: 12px;
    line-height: 1.5;
  }
  .key-meta {
    font-size: 9px;
    max-width: 240px;
  }
  .key-row .quiet {
    font-size: 10px;
    min-height: 30px;
  }
  .empty {
    padding: 30px 19px;
  }
  .empty p {
    font-size: 11px;
  }
  .empty h3 {
    font-size: 13px;
  }
  th,
  td {
    padding: 12px 17px;
  }
  th {
    font-size: 9px;
  }
  td {
    font-size: 11px;
  }
  .table-wrap {
    max-width: 100%;
  }
  .form-grid .panel {
    margin-bottom: 18px;
  }
  .signin {
    margin-top: 30px;
    padding: 0 18px;
  }
  .signin > .brand {
    margin-bottom: 26px;
  }
  .login-card {
    padding: 27px 24px;
  }
  .login-card h1 {
    font-size: 27px;
  }
  dialog {
    padding: 22px;
  }
  .scope-grid {
    gap: 4px;
  }
  .scope-grid label {
    font-size: 10px;
  }
  .notice {
    font-size: 11px;
  }
  .doc-grid pre,
  .code-block {
    font-size: 10px;
  }
  .progress-label {
    font-size: 11px;
  }
  .sidebar .brand:after {
    content: "Developer console";
    font-size: 10px;
    color: #7c8c9f;
    font-weight: 400;
    margin-left: auto;
    letter-spacing: 0;
  }
}

/* Keep labels and touch targets readable on small screens. */
body {
  line-height: 1.5;
}
.sidebar nav a {
  font-size: 13px;
}
.page-heading .muted {
  font-size: 13px;
}
.metric span,
.panel-head p,
.subtle {
  font-size: 12px;
}
.metric small {
  font-size: 11px;
}
.panel-head h2 {
  font-size: 17px;
}
.key-label {
  font-size: 13px;
}
.key-meta {
  font-size: 12px;
}
.primary,
.secondary,
.danger,
.quiet {
  font-size: 13px;
  min-height: 40px;
}
.top-actions,
.org-menu summary {
  font-size: 13px;
}
.mode-banner {
  font-size: 12px;
}
.empty p,
.doc-grid p {
  font-size: 13px;
}
.table-wrap td {
  font-size: 13px;
}
.table-wrap th {
  font-size: 11px;
}
.signin input,
dialog input {
  font-size: 16px;
}
.login-note {
  font-size: 12px;
}
@media (max-width: 700px) {
  .sidebar nav a {
    font-size: 12px;
    min-height: 44px;
  }
  .topbar {
    min-height: 64px;
    height: auto;
  }
  .org-menu summary {
    font-size: 12px;
    max-width: 170px;
  }
  .page-heading .muted,
  .metric span,
  .panel-head p,
  .subtle {
    font-size: 12px;
  }
  .metric small {
    font-size: 10px;
  }
  .page-heading .secondary {
    font-size: 12px;
    min-height: 40px;
  }
  .panel-head .secondary,
  .key-row .quiet {
    font-size: 12px;
    min-height: 40px;
  }
  .key-meta {
    font-size: 11px;
  }
  .table-wrap td {
    font-size: 12px;
  }
  .table-wrap th {
    font-size: 10px;
  }
  .mode-banner {
    font-size: 11px;
  }
  .menu-options button {
    min-height: 44px;
  }
  .scope-grid label {
    font-size: 12px;
    min-height: 36px;
  }
  .login-note {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
