.dashboard-body {
  min-height: 100vh;
  background: #edf2ed;
  color: #424340;
  font-family: Manrope, sans-serif;
  line-height: 1.6;
}

.dashboard-body * { box-sizing: border-box; }

.dash-header {
  height: 76px;
  padding: 0 max(5%, calc((100% - 1160px)/2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(248,250,247,.94);
  border-bottom: 1px solid #dfe6de;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
}

.dash-brand {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1.6px;
  color: #424340;
  text-decoration: none;
}
.dash-brand span { color: #606c5a; }
.dash-brand i { color: #a4b99d; font-style: normal; }

.dash-header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.dash-header-right select {
  border: 1px solid #dce4dc;
  background: #fff;
  border-radius: 9px;
  padding: 9px 11px;
  color: #424340;
  font: 700 11px Manrope,sans-serif;
}

.dash-doc-link,.dash-logout {
  color: #62685e;
  text-decoration: none;
  font: 700 11px Manrope,sans-serif;
}
.dash-doc-link:hover,.dash-logout:hover { color: #606c5a; }
.dash-logout {
  border: 1px solid #dce4dc;
  background: transparent;
  padding: 9px 13px;
  border-radius: 9px;
}

.dash-main {
  max-width: 1160px;
  width: 90%;
  margin: 54px auto 35px;
}

.dash-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  animation: dashEnter .55s ease both;
}

.eyebrow {
  font: 600 10px "DM Mono",monospace;
  letter-spacing: 1.6px;
  color: #82907e;
  margin: 0 0 10px;
}

.dash-welcome h1 {
  font-size: clamp(31px,4vw,43px);
  letter-spacing: -2px;
  line-height: 1.15;
  margin: 0;
  font-weight: 800;
}

.dash-welcome > div:first-child > p:last-child {
  color: #858b82;
  font-size: 13px;
  margin: 11px 0 0;
}

.dash-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #697866;
  font-size: 11px;
  font-weight: 700;
  padding-bottom: 6px;
}

.dash-status span:first-child {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7da77a;
  box-shadow: 0 0 0 4px #dcebd9;
  animation: statusPulse 2.5s infinite;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.dash-stat,.dash-panel {
  background: #f9fbf8;
  border: 1px solid #e1e8df;
  border-radius: 17px;
  box-shadow: 0 5px 20px rgba(51,66,51,.035);
}

.dash-stat {
  padding: 22px 24px;
  min-height: 155px;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease,box-shadow .25s ease,border-color .25s ease;
  animation: dashEnter .55s ease both;
}
.dash-stat:nth-child(2) { animation-delay: .07s; }
.dash-stat:nth-child(3) { animation-delay: .14s; }
.dash-stat:hover {
  transform: translateY(-3px);
  border-color: #cbd8c7;
  box-shadow: 0 12px 28px rgba(51,66,51,.075);
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e8efe5;
  display: grid;
  place-items: center;
  color: #63775e;
  font-size: 17px;
}

.dash-stat p {
  color: #81877f;
  font-size: 11px;
  font-weight: 600;
  margin: 14px 0 3px;
}

.dash-stat strong {
  font: 700 28px "DM Mono",monospace;
  letter-spacing: -1.2px;
  line-height: 1.3;
}

.dash-stat small {
  display: block;
  color: #9aa197;
  font-size: 10px;
  margin-top: 5px;
}

.dash-stat .stat-plan {
  font: 800 19px Manrope,sans-serif;
  letter-spacing: -.5px;
  overflow-wrap: anywhere;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(280px,1fr);
  gap: 17px;
  margin-bottom: 17px;
  align-items: start;
}

.dash-panel {
  padding: 25px;
  min-width: 0;
  transition: box-shadow .25s ease,border-color .25s ease;
  animation: dashEnter .6s ease both;
}
.dash-panel:hover {
  border-color: #d5dfd2;
  box-shadow: 0 9px 27px rgba(51,66,51,.055);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.panel-heading h2,.dash-docs h2 {
  font-size: 19px;
  letter-spacing: -.7px;
  line-height: 1.3;
  margin: 0;
  font-weight: 800;
}

.panel-heading .eyebrow { margin-bottom: 7px; }

.panel-description {
  color: #858d82;
  font-size: 11px;
  line-height: 1.8;
  margin: 13px 0 19px;
  max-width: 540px;
}

.dash-primary,.dash-secondary {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  min-height: 40px;
  font: 700 11px Manrope,sans-serif;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .2s ease,background .2s ease,box-shadow .2s ease;
}

.dash-primary {
  background: #606c5a;
  color: #fff;
  box-shadow: 0 3px 8px #606c5a20;
}
.dash-primary:hover {
  background: #4e5c49;
  transform: translateY(-2px);
  box-shadow: 0 6px 13px #606c5a30;
}
.dash-secondary { background: #e8eee6; color: #53634f; }
.dash-secondary:hover { background: #dce7d9; transform: translateY(-1px); }
.dash-primary:disabled,.dash-secondary:disabled {
  opacity: .55;
  cursor: wait;
  transform: none;
}

.new-key-box {
  background: #edf4e9;
  border: 1px solid #d5e4d0;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 16px;
  animation: dashEnter .3s ease both;
}
.new-key-box strong { font-size: 12px; }
.new-key-box p { font-size: 10px; color: #778472; margin: 4px 0 11px; }
.new-key-value {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.new-key-value code {
  overflow-wrap: anywhere;
  font: 11px "DM Mono",monospace;
  flex: 1;
  min-width: 0;
  color: #42533f;
}
.new-key-value button {
  border: 0;
  border-radius: 8px;
  background: #606c5a;
  color: white;
  padding: 9px 12px;
  font: 700 10px Manrope,sans-serif;
  flex-shrink: 0;
}

.keys-list { display: grid; gap: 9px; }

.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  background: #f0f4ef;
  border: 1px solid transparent;
  border-radius: 11px;
  transition: background .2s ease,border-color .2s ease;
  animation: dashEnter .3s ease both;
}
.key-row:hover { background: #eaf0e8; border-color: #dce6d9; }
.key-main { min-width: 0; }
.key-name { display: block; font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.key-prefix { display: block; font: 10px "DM Mono",monospace; color: #899187; margin-top: 5px; }
.key-meta { display: block; color: #9ba197; font-size: 9px; margin-top: 4px; }
.key-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.key-badge {
  color: #668260;
  background: #e1ecde;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 800;
}
.key-badge.revoked { color: #888e85; background: #e7e8e5; }
.key-revoke {
  border: 1px solid #eadbd7;
  background: #fbf4f2;
  color: #a16f67;
  border-radius: 8px;
  padding: 6px 9px;
  font: 700 10px Manrope,sans-serif;
}
.key-revoke:hover { background: #f5e5e1; }
.key-revoke:disabled { opacity: .5; }

.profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #e1eadf;
  color: #5e7059;
  font-weight: 800;
  font-size: 16px;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 0;
  border-bottom: 1px solid #edf0eb;
}
.profile-info span { font-size: 10px; color: #92988f; }
.profile-info strong { font-size: 12px; overflow-wrap: anywhere; }
.account-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 19px;
  color: #90988d;
  font-size: 9px;
}
.secure-mark { color: #7e9d77; }

.usage-panel { margin-bottom: 17px; }
.activity-count { color: #899487; font-size: 10px; font-weight: 600; }
.usage-table-wrap { overflow-x: auto; margin-top: 20px; }
.usage-table { width: 100%; border-collapse: collapse; text-align: left; }
.usage-table th {
  color: #929b8e;
  font: 600 9px "DM Mono",monospace;
  padding: 0 13px 13px;
  white-space: nowrap;
}
.usage-table td {
  padding: 14px 13px;
  border-top: 1px solid #edf0eb;
  font-size: 10px;
  color: #62685e;
}
.usage-table td:first-child {
  font: 10px "DM Mono",monospace;
  color: #5f705a;
}
.usage-ok {
  color: #698465;
  background: #e7efe4;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
}
.usage-note { color: #9aa197; font-size: 9px; margin: 14px 0 0; }

.dash-docs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 29px;
  background: #e3ebe1;
  border: 1px solid #d7e2d4;
  border-radius: 17px;
  margin-bottom: 27px;
  animation: dashEnter .6s ease both;
}
.dash-docs h2 { font-size: 20px; }
.dash-docs p:last-child { color: #7e897b; font-size: 11px; margin: 8px 0 0; }
.docs-actions { display: flex; gap: 9px; flex-shrink: 0; }

.dash-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #9ba197;
  font-size: 10px;
  padding: 15px 2px;
}
.dash-footer a { color: #687864; text-decoration: none; }

.loading-text,.empty-state {
  color: #92998f;
  font-size: 11px;
  padding: 15px 0;
}

.dash-toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%,15px);
  opacity: 0;
  pointer-events: none;
  background: #424d40;
  color: white;
  padding: 13px 19px;
  border-radius: 11px;
  font-size: 11px;
  box-shadow: 0 8px 25px #202a2030;
  transition: opacity .25s ease,transform .25s ease;
  z-index: 100000;
  max-width: 90%;
  text-align: center;
}
.dash-toast.visible { opacity: 1; transform: translate(-50%,0); }

.key-modal[hidden] { display: none !important; }
.key-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}
.key-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32,39,31,.48);
  backdrop-filter: blur(5px);
  animation: modalFade .2s ease both;
}
.key-modal-card {
  position: relative;
  width: min(100%,430px);
  padding: 27px;
  border-radius: 18px;
  background: #f9fbf8;
  border: 1px solid #e0e8de;
  box-shadow: 0 24px 80px #1d281d35;
  animation: modalEnter .25s ease both;
}
.key-modal-card h2 { margin: 0; font-size: 21px; letter-spacing: -.7px; }
.key-modal-card > p { color: #858d82; font-size: 11px; line-height: 1.7; margin: 9px 0 20px; }
.key-modal-card label { display: block; font-size: 10px; font-weight: 800; margin-bottom: 7px; }
.key-modal-card input {
  width: 100%;
  border: 1px solid #dce5d9;
  border-radius: 10px;
  padding: 12px 13px;
  outline: none;
  background: white;
  color: #424340;
  font: 12px Manrope,sans-serif;
}
.key-modal-card input:focus {
  border-color: #82977c;
  box-shadow: 0 0 0 3px #82977c20;
}
.key-modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.key-modal-close {
  position: absolute;
  top: 15px;
  right: 16px;
  border: 0;
  background: transparent;
  color: #899187;
  font-size: 20px;
  padding: 4px 8px;
}

@keyframes dashEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalEnter {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes statusPulse {
  0%,100% { box-shadow: 0 0 0 4px #dcebd9; }
  50% { box-shadow: 0 0 0 6px #dcebd955; }
}

@media(max-width:850px) {
  .dash-main { margin-top: 38px; }
  .dash-grid { grid-template-columns: 1fr; }
}

@media(max-width:680px) {
  .dash-header { height: 66px; padding: 0 5%; }
  .dash-header-right { gap: 10px; }
  .dash-doc-link { display: none; }
  .dash-main { width: 92%; margin-top: 32px; }
  .dash-welcome { align-items: flex-start; }
  .dash-status { font-size: 0; padding-top: 9px; }
  .dash-stats { grid-template-columns: 1fr; gap: 10px; }
  .dash-stat {
    min-height: 0;
    padding: 15px 17px;
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    column-gap: 11px;
  }
  .stat-icon { grid-row: span 2; }
  .dash-stat p { margin: 0; }
  .dash-stat strong { grid-column: 3; grid-row: 1 / span 2; }
  .dash-stat small { margin-top: 3px; }
  .dash-panel { padding: 19px; }
  .dash-docs { align-items: flex-start; flex-direction: column; padding: 22px; }
  .docs-actions { width: 100%; }
  .docs-actions a { flex: 1; }
  .dash-footer { flex-wrap: wrap; }
}

@media(max-width:430px) {
  .dash-brand { font-size: 22px; }
  .dash-logout { font-size: 10px; padding: 8px 9px; }
  .dash-header-right select { padding: 8px 6px; }
  .dash-welcome h1 { font-size: 30px; }
  .panel-heading { align-items: flex-start; }
  .panel-heading h2 { font-size: 17px; }
  #create-key { padding: 9px 10px; font-size: 10px; }
  .key-row { align-items: flex-start; }
  .key-actions { flex-direction: column; align-items: flex-end; }
  .usage-table th,.usage-table td { padding-left: 8px; padding-right: 8px; }
  .key-modal-card { padding: 23px 19px; }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}


/* ==========================================
   COSTME DASHBOARD — GEIST DESIGN SYSTEM
   ========================================== */

.dashboard-body {
  --dash-bg: #FAFAFA;
  --dash-card: #FFFFFF;
  --dash-soft: #F5F5F5;
  --dash-border: #EBEBEB;
  --dash-border-strong: #DCDCDC;
  --dash-text: #171717;
  --dash-muted: #666666;
  --dash-blue: #0070F3;
  --dash-blue-hover: #005FCC;
  --dash-green: #45A557;
  --dash-red: #E5484D;
  background: var(--dash-bg);
  color: var(--dash-text);
  font-family: Geist, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dashboard-body * { box-sizing: border-box; }

.dash-header {
  height: 68px;
  padding: 0 max(5%, calc((100% - 1160px)/2));
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--dash-border);
  backdrop-filter: blur(16px);
}

.dash-brand {
  color: #000;
  font-size: 24px;
  letter-spacing: -1.4px;
}
.dash-brand span { color: #171717; }
.dash-brand i { color: var(--dash-blue); }

.dash-header-right { gap: 14px; }

.dash-header-right select,
.dash-logout {
  border: 1px solid var(--dash-border);
  border-radius: 7px;
  background: #fff;
  color: var(--dash-text);
  font: 600 12px inherit;
  transition: border-color .18s ease, background .18s ease;
}

.dash-header-right select {
  padding: 8px 10px;
  font-family: inherit;
}

.dash-doc-link,
.dash-logout {
  color: var(--dash-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
}
.dash-doc-link:hover { color: var(--dash-blue); }
.dash-logout { padding: 8px 12px; }
.dash-logout:hover,
.dash-header-right select:hover {
  border-color: var(--dash-border-strong);
  background: var(--dash-soft);
  color: var(--dash-text);
}

.dash-main {
  max-width: 1160px;
  width: 90%;
  margin: 48px auto 35px;
}

.dash-welcome { margin-bottom: 27px; }

.dashboard-body .eyebrow {
  color: #737373;
  font-size: 10px;
  letter-spacing: 1.25px;
  font-weight: 600;
}

.dash-welcome h1 {
  color: var(--dash-text);
  font-size: clamp(30px, 4vw, 39px);
  font-weight: 700;
  letter-spacing: -1.8px;
}

.dash-welcome > div:first-child > p:last-child {
  color: var(--dash-muted);
  font-size: 13px;
}

.dash-status {
  color: #4B8F5A;
  font-size: 12px;
}
.dash-status span:first-child {
  background: var(--dash-green);
  box-shadow: 0 0 0 4px #45A55718;
}

.dash-stats {
  gap: 14px;
  margin-bottom: 16px;
}

.dash-stat,
.dash-panel {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.025);
}

.dash-stat {
  min-height: 148px;
  padding: 20px 22px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.dash-stat:hover {
  transform: translateY(-2px);
  border-color: var(--dash-border-strong);
  box-shadow: 0 5px 16px rgba(0,0,0,.045);
}

.stat-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: var(--dash-soft);
  color: #404040;
  font-size: 15px;
}

.dash-stat p {
  color: var(--dash-muted);
  font-size: 12px;
  margin: 12px 0 3px;
}
.dash-stat strong {
  color: var(--dash-text);
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -1px;
}
.dash-stat small {
  color: #888;
  font-size: 11px;
}
.dash-stat .stat-plan {
  font-size: 18px;
}

.dash-grid {
  gap: 15px;
  margin-bottom: 15px;
}

.dash-panel {
  padding: 23px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.dash-panel:hover {
  border-color: var(--dash-border-strong);
  box-shadow: 0 3px 12px rgba(0,0,0,.025);
}

.panel-heading h2,
.dash-docs h2 {
  color: var(--dash-text);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.55px;
}

.panel-heading .eyebrow { color: #737373; }

.panel-description,
.dash-docs p {
  color: var(--dash-muted);
  font-size: 12px;
  line-height: 1.7;
}

.dash-primary,
.dash-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.dash-primary {
  background: #171717;
  color: #fff;
  border-color: #171717;
}
.dash-primary:hover {
  background: #333;
  border-color: #333;
  transform: translateY(-1px);
}
.dash-secondary {
  background: #fff;
  color: var(--dash-text);
  border-color: var(--dash-border-strong);
}
.dash-secondary:hover {
  background: var(--dash-soft);
  border-color: #C8C8C8;
}

.new-key-box {
  border: 1px solid #B9D7FF;
  border-radius: 8px;
  background: #F5F9FF;
  padding: 14px;
  margin: 16px 0;
}
.new-key-box strong { color: var(--dash-text); }
.new-key-box p { color: var(--dash-muted); font-size: 11px; }
.new-key-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
}
.new-key-value code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #174B8B;
  font-size: 11px;
}
.new-key-value button {
  flex: 0 0 auto;
  border: 1px solid #C9DFFF;
  border-radius: 6px;
  background: #fff;
  color: #174B8B;
  padding: 7px 10px;
  font: 600 11px inherit;
  cursor: pointer;
}

.keys-list { margin-top: 15px; }
.key-row {
  border-top: 1px solid var(--dash-border);
  padding: 14px 0;
}
.key-name {
  color: var(--dash-text);
  font-size: 12px;
  font-weight: 650;
}
.key-prefix,
.key-meta {
  color: var(--dash-muted);
  font-size: 10px;
}
.key-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #CDE8D2;
  border-radius: 20px;
  background: #F1FAF2;
  color: #287A3A;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
}
.key-badge.revoked {
  border-color: var(--dash-border);
  background: var(--dash-soft);
  color: #777;
}
.key-revoke {
  border: 1px solid #F1CACA;
  border-radius: 6px;
  background: #fff;
  color: #C23B3B;
  padding: 6px 9px;
  font: 600 10px inherit;
  cursor: pointer;
}
.key-revoke:hover { background: #FFF5F5; }

.account-panel .profile-info {
  border-bottom: 1px solid var(--dash-border);
  padding: 13px 0;
}
.profile-info span {
  display: block;
  color: var(--dash-muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.profile-info strong {
  display: block;
  color: var(--dash-text);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--dash-border);
  border-radius: 9px;
  background: #171717;
  color: white;
  font-weight: 700;
}
.account-footer {
  color: var(--dash-muted);
  font-size: 10px;
  margin-top: 15px;
}
.secure-mark { color: var(--dash-green); }

.usage-panel { margin-bottom: 15px; }
.activity-count {
  border: 1px solid var(--dash-border);
  border-radius: 6px;
  background: var(--dash-soft);
  color: var(--dash-muted);
  padding: 6px 9px;
  font-size: 10px;
}
.usage-table-wrap { overflow-x: auto; }
.usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.usage-table th {
  background: #FAFAFA;
  color: #737373;
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.usage-table th,
.usage-table td {
  border-bottom: 1px solid var(--dash-border);
  padding: 12px 13px;
}
.usage-table td { color: #404040; }
.usage-ok {
  display: inline-flex;
  border: 1px solid #CDE8D2;
  border-radius: 20px;
  background: #F1FAF2;
  color: #287A3A;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
}
.usage-note,
.loading-text,
.empty-state {
  color: var(--dash-muted);
  font-size: 11px;
}

.dash-docs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: #fff;
  padding: 23px;
  margin-bottom: 20px;
}
.dash-docs h2 { margin: 0; }
.dash-docs p { margin: 7px 0 0; }
.docs-actions { display: flex; gap: 9px; flex-shrink: 0; }

.dash-footer {
  border-top: 1px solid var(--dash-border);
  color: #888;
  font-size: 11px;
  padding-top: 17px;
}
.dash-footer a {
  color: #404040;
  text-decoration: none;
}
.dash-footer a:hover { color: var(--dash-blue); }

.key-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}
.key-modal[hidden],
.new-key-box[hidden] { display: none !important; }

.key-modal-backdrop {
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(5px);
}
.key-modal-card {
  width: min(100%, 430px);
  padding: 26px;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: #fff;
  color: var(--dash-text);
  box-shadow: 0 20px 70px rgba(0,0,0,.16);
}
.key-modal-card h2 {
  color: var(--dash-text);
  font-size: 21px;
  letter-spacing: -.7px;
}
.key-modal-card > p { color: var(--dash-muted); }
.key-modal-card label {
  color: var(--dash-text);
  font-size: 11px;
}
.key-modal-card input {
  border: 1px solid var(--dash-border-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--dash-text);
  font: 13px inherit;
  padding: 11px 12px;
}
.key-modal-card input:focus {
  border-color: var(--dash-blue);
  box-shadow: 0 0 0 3px #0070F31A;
}
.key-modal-close { color: #777; cursor: pointer; }
.key-modal-close:hover { color: #171717; }

.dash-toast {
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: #171717;
  color: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
}

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

@media(max-width:680px) {
  .dash-header { padding: 0 4%; }
  .dash-main { width: 92%; }
  .dash-docs { padding: 19px; }
}

@media(prefers-reduced-motion:reduce) {
  .dashboard-body *,
  .dashboard-body *::before,
  .dashboard-body *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* ==========================================
   COSTME DASHBOARD — GEIST DESIGN SYSTEM
   ========================================== */

.dashboard-body {
  --dash-bg: #FAFAFA;
  --dash-card: #FFFFFF;
  --dash-soft: #F5F5F5;
  --dash-border: #EBEBEB;
  --dash-border-strong: #DCDCDC;
  --dash-text: #171717;
  --dash-muted: #666666;
  --dash-blue: #0070F3;
  --dash-blue-hover: #005FCC;
  --dash-green: #45A557;
  --dash-red: #E5484D;
  background: var(--dash-bg);
  color: var(--dash-text);
  font-family: Geist, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dashboard-body * { box-sizing: border-box; }

.dash-header {
  height: 68px;
  padding: 0 max(5%, calc((100% - 1160px)/2));
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--dash-border);
  backdrop-filter: blur(16px);
}

.dash-brand {
  color: #000;
  font-size: 24px;
  letter-spacing: -1.4px;
}
.dash-brand span { color: #171717; }
.dash-brand i { color: var(--dash-blue); }

.dash-header-right { gap: 14px; }

.dash-header-right select,
.dash-logout {
  border: 1px solid var(--dash-border);
  border-radius: 7px;
  background: #fff;
  color: var(--dash-text);
  font: 600 12px inherit;
  transition: border-color .18s ease, background .18s ease;
}

.dash-header-right select {
  padding: 8px 10px;
  font-family: inherit;
}

.dash-doc-link,
.dash-logout {
  color: var(--dash-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
}
.dash-doc-link:hover { color: var(--dash-blue); }
.dash-logout { padding: 8px 12px; }
.dash-logout:hover,
.dash-header-right select:hover {
  border-color: var(--dash-border-strong);
  background: var(--dash-soft);
  color: var(--dash-text);
}

.dash-main {
  max-width: 1160px;
  width: 90%;
  margin: 48px auto 35px;
}

.dash-welcome { margin-bottom: 27px; }

.dashboard-body .eyebrow {
  color: #737373;
  font-size: 10px;
  letter-spacing: 1.25px;
  font-weight: 600;
}

.dash-welcome h1 {
  color: var(--dash-text);
  font-size: clamp(30px, 4vw, 39px);
  font-weight: 700;
  letter-spacing: -1.8px;
}

.dash-welcome > div:first-child > p:last-child {
  color: var(--dash-muted);
  font-size: 13px;
}

.dash-status {
  color: #4B8F5A;
  font-size: 12px;
}
.dash-status span:first-child {
  background: var(--dash-green);
  box-shadow: 0 0 0 4px #45A55718;
}

.dash-stats {
  gap: 14px;
  margin-bottom: 16px;
}

.dash-stat,
.dash-panel {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.025);
}

.dash-stat {
  min-height: 148px;
  padding: 20px 22px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.dash-stat:hover {
  transform: translateY(-2px);
  border-color: var(--dash-border-strong);
  box-shadow: 0 5px 16px rgba(0,0,0,.045);
}

.stat-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: var(--dash-soft);
  color: #404040;
  font-size: 15px;
}

.dash-stat p {
  color: var(--dash-muted);
  font-size: 12px;
  margin: 12px 0 3px;
}
.dash-stat strong {
  color: var(--dash-text);
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -1px;
}
.dash-stat small {
  color: #888;
  font-size: 11px;
}
.dash-stat .stat-plan {
  font-size: 18px;
}

.dash-grid {
  gap: 15px;
  margin-bottom: 15px;
}

.dash-panel {
  padding: 23px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.dash-panel:hover {
  border-color: var(--dash-border-strong);
  box-shadow: 0 3px 12px rgba(0,0,0,.025);
}

.panel-heading h2,
.dash-docs h2 {
  color: var(--dash-text);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.55px;
}

.panel-heading .eyebrow { color: #737373; }

.panel-description,
.dash-docs p {
  color: var(--dash-muted);
  font-size: 12px;
  line-height: 1.7;
}

.dash-primary,
.dash-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.dash-primary {
  background: #171717;
  color: #fff;
  border-color: #171717;
}
.dash-primary:hover {
  background: #333;
  border-color: #333;
  transform: translateY(-1px);
}
.dash-secondary {
  background: #fff;
  color: var(--dash-text);
  border-color: var(--dash-border-strong);
}
.dash-secondary:hover {
  background: var(--dash-soft);
  border-color: #C8C8C8;
}

.new-key-box {
  border: 1px solid #B9D7FF;
  border-radius: 8px;
  background: #F5F9FF;
  padding: 14px;
  margin: 16px 0;
}
.new-key-box strong { color: var(--dash-text); }
.new-key-box p { color: var(--dash-muted); font-size: 11px; }
.new-key-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
}
.new-key-value code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #174B8B;
  font-size: 11px;
}
.new-key-value button {
  flex: 0 0 auto;
  border: 1px solid #C9DFFF;
  border-radius: 6px;
  background: #fff;
  color: #174B8B;
  padding: 7px 10px;
  font: 600 11px inherit;
  cursor: pointer;
}

.keys-list { margin-top: 15px; }
.key-row {
  border-top: 1px solid var(--dash-border);
  padding: 14px 0;
}
.key-name {
  color: var(--dash-text);
  font-size: 12px;
  font-weight: 650;
}
.key-prefix,
.key-meta {
  color: var(--dash-muted);
  font-size: 10px;
}
.key-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #CDE8D2;
  border-radius: 20px;
  background: #F1FAF2;
  color: #287A3A;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
}
.key-badge.revoked {
  border-color: var(--dash-border);
  background: var(--dash-soft);
  color: #777;
}
.key-revoke {
  border: 1px solid #F1CACA;
  border-radius: 6px;
  background: #fff;
  color: #C23B3B;
  padding: 6px 9px;
  font: 600 10px inherit;
  cursor: pointer;
}
.key-revoke:hover { background: #FFF5F5; }

.account-panel .profile-info {
  border-bottom: 1px solid var(--dash-border);
  padding: 13px 0;
}
.profile-info span {
  display: block;
  color: var(--dash-muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.profile-info strong {
  display: block;
  color: var(--dash-text);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--dash-border);
  border-radius: 9px;
  background: #171717;
  color: white;
  font-weight: 700;
}
.account-footer {
  color: var(--dash-muted);
  font-size: 10px;
  margin-top: 15px;
}
.secure-mark { color: var(--dash-green); }

.usage-panel { margin-bottom: 15px; }
.activity-count {
  border: 1px solid var(--dash-border);
  border-radius: 6px;
  background: var(--dash-soft);
  color: var(--dash-muted);
  padding: 6px 9px;
  font-size: 10px;
}
.usage-table-wrap { overflow-x: auto; }
.usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.usage-table th {
  background: #FAFAFA;
  color: #737373;
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.usage-table th,
.usage-table td {
  border-bottom: 1px solid var(--dash-border);
  padding: 12px 13px;
}
.usage-table td { color: #404040; }
.usage-ok {
  display: inline-flex;
  border: 1px solid #CDE8D2;
  border-radius: 20px;
  background: #F1FAF2;
  color: #287A3A;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
}
.usage-note,
.loading-text,
.empty-state {
  color: var(--dash-muted);
  font-size: 11px;
}

.dash-docs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: #fff;
  padding: 23px;
  margin-bottom: 20px;
}
.dash-docs h2 { margin: 0; }
.dash-docs p { margin: 7px 0 0; }
.docs-actions { display: flex; gap: 9px; flex-shrink: 0; }

.dash-footer {
  border-top: 1px solid var(--dash-border);
  color: #888;
  font-size: 11px;
  padding-top: 17px;
}
.dash-footer a {
  color: #404040;
  text-decoration: none;
}
.dash-footer a:hover { color: var(--dash-blue); }

.key-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}
.key-modal[hidden],
.new-key-box[hidden] { display: none !important; }

.key-modal-backdrop {
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(5px);
}
.key-modal-card {
  width: min(100%, 430px);
  padding: 26px;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: #fff;
  color: var(--dash-text);
  box-shadow: 0 20px 70px rgba(0,0,0,.16);
}
.key-modal-card h2 {
  color: var(--dash-text);
  font-size: 21px;
  letter-spacing: -.7px;
}
.key-modal-card > p { color: var(--dash-muted); }
.key-modal-card label {
  color: var(--dash-text);
  font-size: 11px;
}
.key-modal-card input {
  border: 1px solid var(--dash-border-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--dash-text);
  font: 13px inherit;
  padding: 11px 12px;
}
.key-modal-card input:focus {
  border-color: var(--dash-blue);
  box-shadow: 0 0 0 3px #0070F31A;
}
.key-modal-close { color: #777; cursor: pointer; }
.key-modal-close:hover { color: #171717; }

.dash-toast {
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: #171717;
  color: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
}

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

@media(max-width:680px) {
  .dash-header { padding: 0 4%; }
  .dash-main { width: 92%; }
  .dash-docs { padding: 19px; }
}

@media(prefers-reduced-motion:reduce) {
  .dashboard-body *,
  .dashboard-body *::before,
  .dashboard-body *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
