:root {
  --bg: #0a0a0b;
  --surface: #121214;
  --surface-hover: #1a1a1d;
  --border: #2a2a2e;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #00e6a8;
  --accent-dim: rgba(0, 230, 168, 0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: #050506;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo--wordmark .logo-wordmark {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.35rem, 2.7vw, 1.665rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.logo-wordmark__gkz {
  color: #00ff9d;
}

.logo-wordmark__id {
  color: #fff;
  font-weight: 700;
}

.logo--wordmark:hover .logo-wordmark__gkz,
.logo--wordmark:hover .logo-wordmark__id {
  filter: brightness(1.06);
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  padding-right: 12px;
  margin-right: 4px;
  border-right: 1px solid var(--border);
  letter-spacing: 0.02em;
}

.action-btn {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.action-btn:active {
  transform: scale(0.98);
}

.action-btn.build {
  background: var(--accent);
  color: #04120d;
}

.action-btn.build:hover {
  filter: brightness(1.06);
}

.action-btn.share {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.action-btn.share:hover {
  background: var(--surface-hover);
  border-color: #3f3f46;
}

.action-btn.logout {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.action-btn.logout:hover {
  color: var(--text);
  border-color: #52525b;
}

.account-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

/* —— Identity hero (cards centerpiece) —— */

.identity-hero {
  background: linear-gradient(165deg, #141416 0%, var(--surface) 45%, #0e0e10 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 32px;
  margin-bottom: 20px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset, 0 24px 48px rgba(0, 0, 0, 0.35);
}

.identity-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.identity-kicker {
  margin: 0 0 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.identity-greeting h1 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 4.5vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.identity-greeting h1 span {
  color: var(--accent);
}

.identity-tagline {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: 28rem;
}

.identity-stat-single {
  flex-shrink: 0;
  text-align: right;
  padding: 14px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 132px;
}

.identity-stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.identity-stat-label {
  display: block;
  margin-top: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.identity-hero-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  background: var(--accent);
  color: #04120d;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.btn-hero-primary:hover {
  filter: brightness(1.07);
}

.btn-hero-primary:active {
  transform: scale(0.98);
}

.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-hero-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.empty-hint--hero {
  margin-bottom: 20px;
  padding: 16px 18px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}

.card-grid--hero {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

@media (min-width: 700px) {
  .card-grid--hero {
    gap: 22px;
  }
}

.card-tile {
  width: min(100%, 200px);
  flex: 0 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--accent-dim);
  transform: translateY(-2px);
}

.card-tile img {
  width: 100%;
  height: min(52vw, 220px);
  max-height: 240px;
  object-fit: cover;
  display: block;
  background: #000;
}

.card-tile-body {
  padding: 12px 12px 14px;
}

.card-tile-name {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
}

.card-tile-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 6px 0 0;
}

.card-tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.card-tile-actions button {
  flex: 1 1 calc(50% - 4px);
  min-width: 72px;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.card-tile-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.card-tile--profile {
  border-color: rgba(0, 230, 168, 0.55);
  box-shadow: 0 0 0 1px var(--accent-dim);
}

.card-tile-btn-profile.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.card-tile-btn-delete {
  border-color: rgba(248, 113, 113, 0.4) !important;
  color: #f87171 !important;
  background: rgba(248, 113, 113, 0.06) !important;
}

.card-tile-btn-delete:hover:not(:disabled) {
  border-color: rgba(252, 165, 165, 0.65) !important;
  color: #fca5a5 !important;
}

.card-tile-btn-delete:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* —— Secondary panels —— */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  margin-bottom: 18px;
}

.panel--secondary {
  background: #101012;
  box-shadow: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.panel-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.panel-badge-soon {
  color: var(--accent);
  border-color: rgba(0, 230, 168, 0.35);
  background: var(--accent-dim);
}

.section-lead {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 42rem;
}

.badges-tier-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .badges-tier-grid {
    grid-template-columns: 1fr;
  }
}

.badge-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  gap: 10px;
  transition: border-color 0.15s ease;
}

.badge-tier--placeholder:hover {
  border-color: #3f3f46;
}

.badge-tier-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1c1c1f 0%, #0e0e10 100%);
  border: 2px dashed var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.badge-tier-label {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-tier-hint {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

/* —— Minimal footer links —— */

.identity-footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding: 8px 4px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.footer-nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.footer-nav-link:hover {
  color: var(--accent);
}

.empty-hint {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 14px;
}

.empty-hint.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 520px) {
  .identity-stat-single {
    text-align: left;
    width: 100%;
  }

  .identity-hero {
    padding: 22px 18px 26px;
  }

  .account-title {
    border-right: none;
    padding-right: 0;
    width: 100%;
    margin-bottom: 4px;
  }

  .account-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
