header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-brand h1 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-0);
  letter-spacing: -0.3px;
}
.header-brand .sep {
  color: var(--text-2);
  font-weight: 300;
}
.header-brand .label {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 400;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.ok { background: var(--green); }
.status-dot.err { background: var(--red); }
.status-dot.unknown { background: var(--text-2); }
.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}
.user-email {
  font-size: 12px;
  color: var(--text-2);
  padding-left: 6px;
  border-left: 1px solid var(--border);
}
.form-hint {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
  line-height: 1.5;
}
details.form-hint summary {
  cursor: pointer;
  list-style: none;
  display: inline;
  color: var(--blue);
  transition: color .15s;
}
details.form-hint summary:hover { color: var(--text-0); }
details.form-hint summary::after { content: " ›"; }
details.form-hint[open] summary::after { content: " ↑"; }
details.form-hint .hint-body { margin-top: 6px; display: flex; flex-direction: column; gap: 10px; }
details.form-hint code { font-family: var(--mono); font-size: 11px; }
.hint-group { display: flex; flex-direction: column; gap: 3px; }
.hint-group-title { font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
.hint-cmd { display: flex; align-items: center; gap: 6px; padding-left: 8px; }
.hint-key-type { width: 4.5em; flex-shrink: 0; color: var(--text-2); }
.btn-copy-hint {
  font-family: var(--font); font-size: 11px; color: var(--text-2);
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1px 6px; cursor: pointer;
  transition: color .15s, border-color .15s; flex-shrink: 0;
}
.btn-copy-hint:hover { color: var(--text-0); border-color: var(--text-2); }
.btn-copy-hint.copied { color: var(--green); border-color: var(--green); }
.ssh-key-summary {
  font-size: 13px; color: var(--text-2);
  padding: 8px 12px;
  background: var(--bg-0); border: 1px solid var(--border); border-radius: var(--radius);
}
.btn-link-hint {
  font-size: 13px; color: var(--blue);
  background: none; border: none; padding: 0; cursor: pointer;
  transition: color .15s;
}
.btn-link-hint:hover { color: var(--text-0); }

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

.billing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 24px;
  background: var(--red-dim);
  border: 1px solid var(--red);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 0 0 1px rgba(248, 81, 73, .25), 0 6px 24px -8px rgba(248, 81, 73, .55);
  animation: billing-banner-pulse 2.4s ease-in-out infinite;
}
.billing-banner[hidden] { display: none; }
.billing-banner-msg { line-height: 1.45; }
.billing-banner #billing-banner-btn {
  background: #fff;
  color: var(--red-dim);
  border-color: #fff;
  font-weight: 600;
  flex-shrink: 0;
}
.billing-banner #billing-banner-btn:hover:not(:disabled) {
  background: #fff;
  color: var(--red);
  filter: brightness(.95);
}
@keyframes billing-banner-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(248, 81, 73, .25), 0 6px 24px -8px rgba(248, 81, 73, .55); }
  50%      { box-shadow: 0 0 0 1px rgba(248, 81, 73, .55), 0 8px 28px -6px rgba(248, 81, 73, .9); }
}
@media (prefers-reduced-motion: reduce) {
  .billing-banner { animation: none; }
}

#billing-dialog {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-lg); color: var(--text-1);
  padding: 0; max-width: 460px; width: calc(100% - 32px); outline: none;
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0;
}
#billing-dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.billing-dialog-inner { padding: 20px 24px 24px; }
.billing-dialog-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.billing-dialog-header h2 { font-size: 15px; font-weight: 600; color: var(--text-0); }
.billing-dialog-subtitle {
  font-size: 13px; color: var(--text-2); margin-bottom: 16px; line-height: 1.5;
}
.billing-card-element {
  padding: 10px 12px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 40px;
}
.billing-submit-btn { margin-top: 12px; width: 100%; }

.section { margin-bottom: 32px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-0);
}

.create-form { display: flex; flex-direction: column; gap: 14px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

@media (max-width: 600px) {
  main { padding: 16px; }
  .header-inner { padding: 10px 16px; }
  .header-brand .sep, .header-brand .label { display: none; }
}
