.dashboard-page {
  min-height: 100vh;
}

.dashboard-brand {
  color: var(--ink);
  text-decoration: none;
}

.dashboard-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 88px;
}

.dashboard-intro {
  max-width: 720px;
  margin-bottom: 28px;
}

.dashboard-intro .eyebrow {
  color: var(--gold);
  letter-spacing: .18em;
  font-size: .75rem;
  font-weight: 700;
}

.dashboard-intro h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
}

.dashboard-intro p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
}

.key-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: end;
  gap: 14px;
}

.key-input-wrap {
  position: relative;
}

.key-input-wrap input {
  width: 100%;
  padding-right: 72px;
}

.key-visibility {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 7px 8px;
  cursor: pointer;
}

.remember-key {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .82rem;
  white-space: nowrap;
}

.remember-key input {
  accent-color: var(--gold);
}

.dashboard-load {
  min-height: 48px;
}

.key-security,
.dashboard-error {
  grid-column: 1 / -1;
  margin: 0;
  font-size: .78rem;
}

.key-security {
  color: var(--muted);
}

.dashboard-error {
  color: #ef8c84;
}

.dashboard-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .82rem;
  margin: 24px 2px 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-card {
  display: grid;
  gap: 10px;
}

.summary-card span {
  color: var(--muted);
  font-size: .8rem;
}

.summary-card strong {
  color: #f1e7c7;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.quota-card {
  margin-top: 14px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.section-heading span {
  color: var(--gold);
  font-weight: 700;
}

.quota-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.quota-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #77c9aa, var(--gold));
  transition: width .3s ease;
}

.dashboard-charts {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 14px;
  margin-top: 14px;
}

.usage-bars {
  display: grid;
  gap: 13px;
}

.usage-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(100px, 2fr) auto;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
}

.usage-label {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-track {
  height: 7px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.usage-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

.usage-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.daily-chart {
  min-height: 230px;
  display: flex;
  align-items: end;
  gap: 5px;
  overflow-x: auto;
  padding: 20px 2px 0;
}

.daily-column {
  min-width: 18px;
  flex: 1 0 18px;
  display: grid;
  grid-template-rows: 180px auto;
  align-items: end;
  gap: 7px;
  text-align: center;
}

.daily-bar-wrap {
  height: 180px;
  display: flex;
  align-items: end;
}

.daily-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--gold), #8a743d);
}

.daily-label {
  color: var(--muted);
  font-size: .62rem;
}

.usage-empty {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 760px) {
  .dashboard-main {
    width: min(100% - 20px, 1120px);
    padding-top: 36px;
  }

  .key-panel,
  .dashboard-charts {
    grid-template-columns: 1fr;
  }

  .remember-key {
    min-height: auto;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page .site-header {
    align-items: flex-start;
  }

  .dashboard-page .site-tools,
  .dashboard-page .site-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
