* {
  box-sizing: border-box;
}

body {
  font-family: "SuisseIntl-Light";
  margin: 0;
  color: #222222;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
  padding: 24px;
}

.auth-card {
  width: min(420px, 100%);
  background: #ffffff;
  border: 1px solid #e1dfd9;
  border-radius: 16px;
  padding: 28px;
  display: grid;
  gap: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e1dfd9;
  padding-bottom: 12px;
}

.auth-brand img {
  height: 28px;
  width: auto;
  display: block;
}

.auth-brand-name {
  font-family: "Suisse Int'l Mono";
  font-weight: 700;
}

.auth-subtitle {
  color: #7b7b76;
  font-size: 13px;
  margin-top: -8px;
}

.auth-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

.auth-footer a {
  font-family: "Suisse Int'l Mono";
}

.auth-oauth {
  display: grid;
  gap: 10px;
}

.oauth-button {
  width: 100%;
  justify-content: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #7b7b76;
  font-size: 12px;
  font-family: "Suisse Int'l Mono";
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e1dfd9;
}

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

button {
  background: #000000;
  border: none;
  color: #ffffff;
  padding: 10px 15px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  font-family: "Suisse Int'l Mono";
  font-size: 12px;
}

button.secondary {
  background: #f7f7f7;
  color: #3b3b3b;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  background: #f7f7f7;
  border-right: 1px solid #e1dfd9;
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  overflow-y: auto;
}

.nav-container {
  padding: 16px 24px;
}

.sidebar .brand {
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e1dfd9;
  padding: 16px 24px;
  height: 68.5px;
}

.sidebar .brand img {
  height: 28px;
  width: auto;
  display: block;
}

.sidebar nav {
  display: grid;
  gap: 12px;
}

.sidebar a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #3d3d3d;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Suisse Int'l Mono";
  font-size: 12px;
}

.sidebar a.active,
.sidebar a:hover {
  background: #e2e2e2;
  color: #222222;
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e7e5df;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.profile-name {
  font-weight: 600;
  font-size: 14px;
}

.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 260px;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid #e1dfd9;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Suisse Int'l Mono";
  height: 68.5px;
  position: sticky;
  top: 0px;
}

.topbar .actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

main {
  padding: 24px;
  display: grid;
  gap: 20px;
}

.card {
  border: 1px solid #f0f1f4;
  padding: 16px;
  border-radius: 10px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-label {
  color: #7b7b76;
  font-size: 12px;
  margin-bottom: 6px;
  font-family: "SuisseIntl-Light";
}

.stat-value {
  font-family: "Suisse Int'l Mono";
  font-size: 22px;
  font-weight: 700;
}

.usage-chart {
  margin-top: 12px;
  background: #f7f7f7;
  border-radius: 10px;
  padding: 8px;
}

.usage-chart canvas {
  display: block;
  width: 100%;
  height: 140px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  font-family: "Suisse Int'l Mono";
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  font-size: 12px;
}

.api-key-pill {
  justify-content: space-between;
  width: 100%;
  background: #f7f7f7;
  color: black;
  border-radius: 10px;
}

.api-key-pill span {
  font-family: "Suisse Int'l Mono";
  overflow-wrap: anywhere;
}

.pill-actions {
  display: flex;
  gap: 8px;
}

.created-key-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.key-warning {
  background: #fff5d6;
  color: #6a4a00;
  border: 1px solid #f0d28a;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.key-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.key-modal-note {
  margin-top: 8px;
}

.list-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e1dfd9;
}

.divider {
  height: 1px;
  background: #e1dfd9;
  margin: 8px 0;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: #f7f6f2;
  border: 1px solid #e1dfd9;
}

.input {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e1dfd9;
  border-radius: 10px;
  padding: 10px 12px;
}

.select {
  background: #ffffff;
  border: 1px solid #e1dfd9;
  border-radius: 10px;
  padding: 8px 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  text-align: left;
  color: #8a877f;
  font-weight: 600;
  padding: 12px 10px;
}

.table td {
  padding: 14px 10px;
  border-top: 1px solid #ebe9e3;
}

.status {
  font-weight: 600;
  color: #27a86a;
}

.action-button {
  border: 1px solid #e1dfd9;
  border-radius: 10px;
  padding: 6px 10px;
  background: #ffffff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: #ffffff;
  border-radius: 16px;
  width: min(720px, 90vw);
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #ebe9e3;
}

.modal-body {
  padding: 16px 20px 20px;
  display: grid;
  gap: 12px;
  max-height: 70vh;
  overflow-y: auto;
}

.detail-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1efe9;
}

details {
  border-bottom: 1px solid #f1efe9;
  padding: 10px 0;
}

details summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #4a4a45;
}

details summary::-webkit-details-marker {
  display: none;
}

details + details {
  margin-top: 0;
}

.code-block {
  margin-top: 10px;
  background: #111111;
  color: #f3f3f3;
  border-radius: 10px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  max-height: 240px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.muted {
  color: #7b7b76;
  font-size: 13px;
}

.plans-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 16px;
}

.plan-card {
  border: 1px solid #e1dfd9;
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 12px;
  background: #ffffff;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.plan-name {
  font-size: 18px;
  font-weight: 700;
  font-family: "Suisse Int'l Mono";
}

.plan-metrics {
  display: grid;
  gap: 10px;
}

.plan-feature {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.plan-actions {
  display: flex;
  justify-content: flex-end;
}
