body[data-page="account"] {
  --account-ink: #172a50;
  --account-muted: #53627a;
  --account-line: #dce4f2;
  --account-blue: #215be8;
  --account-soft: #f0f5ff;
  background: #f7f9ff;
}

body[data-page="account"] .workspace-title,
body[data-page="account"] #main {
  width: min(100%, 1400px);
  margin-inline: auto;
}

body[data-page="account"] .workspace-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 42px 0;
}

body[data-page="account"] .workspace-title h1 {
  margin: 7px 0 8px;
  color: var(--account-ink);
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.14;
}

body[data-page="account"] .workspace-title p {
  margin: 0;
  color: var(--account-muted);
  font-size: 16px;
  line-height: 1.6;
}

.account-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #687791;
  font-size: 14px;
  font-weight: 550;
}
.account-breadcrumb a { color: #325184; }
.account-breadcrumb a:hover { color: var(--account-blue); text-decoration: underline; text-underline-offset: 3px; }
.account-breadcrumb [aria-current] { color: var(--account-ink); font-weight: 650; }

.account-eyebrow {
  display: block;
  color: #31558d;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: .08em;
}

.workspace-title-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 3px;
}

#account-admin-link:empty { display: none; }

body[data-page="account"] .owner-analytics-link,
.account-new-plan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--account-line);
  border-radius: 9px;
  background: #fff;
  color: var(--account-ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

body[data-page="account"] .owner-analytics-link:hover,
.account-new-plan:hover {
  background: #edf3ff;
  border-color: #aec6fa;
  transform: translateY(-1px);
}

.account-new-plan {
  background: var(--account-blue);
  border-color: var(--account-blue);
  color: #fff;
  gap: 8px;
}

.account-new-plan:hover {
  background: #154ed2;
  border-color: #154ed2;
  color: #fff;
}

body[data-page="account"] .account-content {
  padding: 28px 42px 82px;
}

.account-overview {
  overflow: hidden;
  border: 1px solid var(--account-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px #10254b08;
}

.account-overview-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  gap: 32px;
  align-items: center;
  padding: 32px;
}

.account-identity h2 {
  max-width: 670px;
  margin: 10px 0 12px;
  color: var(--account-ink);
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.account-identity p {
  margin: 0;
  color: var(--account-muted);
  font-size: 16px;
  line-height: 1.65;
}

.account-balance {
  padding: 23px 25px;
  border: 1px solid #d8e5ff;
  border-radius: 15px;
  background: linear-gradient(145deg, #f0f5ff, #f8fbff);
}

.account-balance > strong {
  display: block;
  margin: 4px 0 15px;
  color: #0f327d;
  font: 750 50px/1.05 'Space Grotesk', Inter, sans-serif;
  letter-spacing: -.05em;
}

.account-balance-breakdown {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 13px;
  border-top: 1px solid #d4e1f8;
}

.account-balance-breakdown span {
  display: inline-flex;
  gap: 8px;
  color: var(--account-muted);
  font-size: 14px;
}

.account-balance-breakdown b { color: var(--account-ink); }
.account-signin-action .button { min-width: 130px; }

.account-credit-lots {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  padding: 20px 32px;
  border-top: 1px solid #e7ecf5;
  color: var(--account-ink);
}

.account-lots-label {
  padding-top: 4px;
  font-size: 14px;
  font-weight: 700;
}

.account-credit-lots > div { display: flex; flex-wrap: wrap; gap: 10px; }
.account-credit-lot {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 13px;
  padding: 10px 14px;
  border: 1px solid #dfe8f8;
  border-radius: 9px;
  background: #f7faff;
  color: var(--account-muted);
  font-size: 14px;
  line-height: 1.5;
}
.account-credit-lot b { color: var(--account-ink); }

.account-overview-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 32px;
  border-top: 1px solid #e7ecf5;
}

.account-overview-actions .button { min-height: 46px; font-size: 14px; }
.account-overview-actions .account-checkin:disabled { opacity: 1; color: #536b62; background: #eef8f1; border-color: #d5eadd; }
.account-signout,
.account-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--account-muted);
  font-size: 14px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease;
}
.account-signout { margin-left: auto; }
.account-signout:hover,
.account-delete:hover { background: #f0f4fc; color: var(--account-ink); }

.account-footnote {
  margin: 14px 2px 0;
  color: var(--account-muted);
  font-size: 14px;
  line-height: 1.55;
}

.account-section { margin-top: 50px; }
.account-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.account-section-heading h2 {
  margin: 6px 0 6px;
  color: var(--account-ink);
  font-size: clamp(24px, 2.3vw, 29px);
  line-height: 1.2;
}
.account-section-heading p {
  margin: 0;
  color: var(--account-muted);
  font-size: 15px;
}
.account-section-count {
  flex: none;
  padding: 6px 11px;
  border: 1px solid #dce5f6;
  border-radius: 999px;
  background: #fff;
  color: #405773;
  font-size: 13px;
  font-weight: 650;
}

.account-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.account-history-card {
  display: flex;
  min-width: 0;
  min-height: 212px;
  overflow: hidden;
  border: 1px solid var(--account-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px #10254b06;
}
.account-history-preview {
  display: grid;
  place-items: center;
  width: 36%;
  min-width: 155px;
  padding: 12px;
  background: #eef3fc;
  background-image: linear-gradient(#dce6f5 1px, transparent 1px), linear-gradient(90deg, #dce6f5 1px, transparent 1px);
  background-size: 24px 24px;
  color: #7893bd;
}
.account-history-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 5px;
  background: white;
  box-shadow: 0 4px 14px #1837671c;
}
.account-history-detail {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
}
.account-history-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-history-meta time { color: var(--account-muted); font-size: 13px; white-space: nowrap; }
.account-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff4e0;
  color: #8a5a08;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.account-status-succeeded { background: #e9f8f0; color: #136a41; }
.account-status-failed { background: #fff0ef; color: #a0312b; }
.account-history-detail h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin: 15px 0 12px;
  color: var(--account-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.account-history-error { margin: 0 0 10px; color: #9b3530; font-size: 14px; }
.account-history-actions { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.account-open-result {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  color: #1653cd;
  font-size: 14px;
  font-weight: 700;
}
.account-open-result:hover { text-decoration: underline; text-underline-offset: 3px; }
.account-history-actions .account-delete { margin-left: auto; }

.account-design-list { display: grid; gap: 10px; }
.account-design-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 94px;
  padding: 16px 20px;
  border: 1px solid var(--account-line);
  border-radius: 12px;
  background: #fff;
}
.account-design-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 11px;
  background: var(--account-soft);
  color: var(--account-blue);
}
.account-design-detail { flex: 1; min-width: 0; }
.account-design-detail h3 {
  margin: 0 0 5px;
  color: var(--account-ink);
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.account-design-detail p { margin: 0; color: var(--account-muted); font-size: 14px; }
.account-design-actions { display: flex; align-items: center; gap: 6px; }
.account-design-actions .button { min-height: 40px; padding: 8px 14px; font-size: 14px; }

.account-empty-copy,
.account-empty-state {
  grid-column: 1 / -1;
  border: 1px dashed #cbdaf1;
  border-radius: 14px;
  background: #fff;
  color: var(--account-muted);
  font-size: 15px;
}
.account-empty-copy { margin: 0; padding: 28px; }
.account-empty-state { display: flex; align-items: center; flex-direction: column; padding: 46px 20px; text-align: center; }
.account-empty-state > svg { color: #6e8dd0; margin-bottom: 16px; }
.account-empty-state h3 { margin: 0 0 8px; color: var(--account-ink); font-size: 21px; }
.account-empty-state p { margin: 0 0 20px; font-size: 15px; }

@media (max-width: 1080px) {
  .account-history-grid { grid-template-columns: 1fr; }
  .account-history-card { max-width: 850px; }
}

@media (max-width: 767px) {
  body[data-page="account"] .workspace-title { align-items: start; flex-direction: column; gap: 18px; padding: 28px 20px 0; }
  body[data-page="account"] .workspace-title h1 { font-size: 32px; }
  body[data-page="account"] .workspace-title p { font-size: 15px; }
  .workspace-title-actions { width: 100%; }
  body[data-page="account"] .account-content { padding: 24px 20px 100px; }
  .account-overview-main { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .account-credit-lots { grid-template-columns: 1fr; gap: 10px; padding: 18px 24px; }
  .account-overview-actions { padding: 18px 24px; }
  .account-signout { margin-left: 0; }
  .account-section { margin-top: 42px; }
}

@media (max-width: 540px) {
  body[data-page="account"] .account-content { padding-inline: 16px; }
  body[data-page="account"] .workspace-title { padding-inline: 16px; }
  .workspace-title-actions > *, .workspace-title-actions #account-admin-link { flex: 1; }
  body[data-page="account"] .owner-analytics-link, .account-new-plan { width: 100%; }
  .account-overview-main { padding: 22px 18px; }
  .account-balance > strong { font-size: 46px; }
  .account-credit-lots, .account-overview-actions { padding-inline: 18px; }
  .account-overview-actions .button { width: 100%; }
  .account-signout { width: 100%; }
  .account-section-heading { align-items: start; }
  .account-section-heading p { font-size: 14px; }
  .account-history-card { flex-direction: column; }
  .account-history-preview { width: 100%; height: 170px; }
  .account-history-preview img { max-height: 150px; }
  .account-history-detail { min-height: 190px; }
  .account-design-row { align-items: start; flex-wrap: wrap; gap: 12px; padding: 16px; }
  .account-design-detail { flex-basis: calc(100% - 66px); }
  .account-design-actions { width: 100%; justify-content: flex-end; }
}
