/* kingdom-account — Área do Cliente: cantos bem redondos, primary cyan, sem neon excessivo */

.kb-account {
  --kb-acc-radius: 1.5rem;
  --kb-acc-radius-sm: 1.1rem;
  --kb-acc-radius-pill: 9999px;
  --kb-acc-border: hsl(var(--primary) / 0.42);
  --kb-acc-border-soft: hsl(var(--primary) / 0.22);
  --kb-acc-panel: rgb(6 12 22 / 0.92);
  --kb-acc-panel-inner: rgb(8 14 26 / 0.88);
  --kb-acc-ink: #041018;
  padding-block: 2rem 3rem;
  min-height: 70vh;
}

.kb-account__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .kb-account__grid {
    grid-template-columns: minmax(15.5rem, 17.5rem) minmax(0, 1fr);
    gap: 1.5rem;
  }
}

/* —— Sidebar —— */
.kb-account-side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.35rem 1.15rem 1.15rem;
  border-radius: var(--kb-acc-radius);
  border: 1px solid var(--kb-acc-border);
  background:
    linear-gradient(165deg, hsl(var(--primary) / 0.06) 0%, transparent 42%),
    var(--kb-acc-panel);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.28);
}

@media (min-width: 1024px) {
  .kb-account-side {
    position: sticky;
    top: 6.5rem;
  }
}

.kb-account-side__tab {
  position: absolute;
  top: 0;
  left: 1.1rem;
  transform: translateY(-55%);
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  border-radius: 0.55rem 0.55rem 0.35rem 0.35rem;
  border: 1px solid var(--kb-acc-border);
  border-bottom-color: rgb(6 12 22);
  background: rgb(4 10 18);
  color: hsl(var(--primary));
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  z-index: 1;
}

.kb-account-side__profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  padding-top: 0.35rem;
}

.kb-account-side__avatar {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid hsl(var(--primary) / 0.55);
  background: rgb(10 18 32);
}

.kb-account-side__avatar--fallback {
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.12);
}

.kb-account-side__name {
  margin: 0;
  max-width: 100%;
  padding-inline: 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kb-account-side__rank {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--kb-acc-radius-pill);
  border: 1px solid rgb(205 127 50 / 0.55);
  background: linear-gradient(145deg, rgb(120 72 28 / 0.55), rgb(60 36 14 / 0.75));
  color: #f0c090;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kb-account-side__rank-icon {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
}

.kb-account-side__nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.kb-account-side__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.85rem;
  padding: 0.65rem 0.95rem;
  border-radius: var(--kb-acc-radius-sm);
  border: 1px solid var(--kb-acc-border);
  background: rgb(4 10 18 / 0.55);
  color: rgb(var(--foreground) / 0.92);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.kb-account-side__link:hover,
.kb-account-side__link:focus-visible {
  background: hsl(var(--primary) / 0.1);
  border-color: hsl(var(--primary) / 0.65);
  color: #fff;
  outline: none;
}

.kb-account-side__link.is-active {
  background: hsl(var(--primary) / 0.14);
  border-color: hsl(var(--primary) / 0.75);
  color: #fff;
  box-shadow: inset 0 0 0 1px hsl(var(--primary) / 0.12);
}

.kb-account-side__link-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  color: hsl(var(--primary));
}

.kb-account-side__soon {
  margin-left: auto;
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--primary) / 0.4);
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.kb-account-side__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.85rem;
  margin-top: 0.15rem;
  padding: 0.7rem 1rem;
  border-radius: var(--kb-acc-radius-pill);
  border: 1px solid hsl(var(--primary) / 0.7);
  background: hsl(var(--primary));
  color: var(--kb-acc-ink);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.12s ease;
}

.kb-account-side__back:hover,
.kb-account-side__back:focus-visible {
  background: hsl(var(--primary) / 0.9);
  transform: translateY(-1px);
  outline: none;
}

.kb-account-side__back-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

/* —— Main panel —— */
.kb-account-main {
  min-width: 0;
  padding: 1.35rem 1.25rem 1.5rem;
  border-radius: var(--kb-acc-radius);
  border: 1px solid var(--kb-acc-border-soft);
  background:
    linear-gradient(180deg, hsl(var(--primary) / 0.04) 0%, transparent 28%),
    var(--kb-acc-panel-inner);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.22);
}

@media (min-width: 768px) {
  .kb-account-main {
    padding: 1.6rem 1.6rem 1.75rem;
  }
}

.kb-account-main__title {
  margin: 0 0 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.7rem;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
}

.kb-account-main__soon {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--primary) / 0.45);
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.kb-profile-soon {
  margin-left: auto;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--primary) / 0.35);
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.kb-account-main__crumb {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  color: rgb(var(--muted-foreground));
}

.kb-account-main__crumb a {
  color: rgb(var(--muted-foreground));
  text-decoration: none;
}

.kb-account-main__crumb a:hover {
  color: hsl(var(--primary));
}

/* Empty state */
.kb-account-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 1rem 3.25rem;
  min-height: 22rem;
}

.kb-account-empty__icon-wrap {
  display: grid;
  place-items: center;
  width: 5.25rem;
  height: 5.25rem;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  border: 1px solid hsl(var(--primary) / 0.35);
  background: hsl(var(--primary) / 0.08);
  color: hsl(var(--primary));
}

.kb-account-empty__icon {
  width: 2.35rem;
  height: 2.35rem;
}

.kb-account-empty__title {
  margin: 0 0 0.55rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.kb-account-empty__text {
  margin: 0 0 1.35rem;
  max-width: 26rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgb(var(--muted-foreground));
}

.kb-account-empty__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--kb-acc-radius-sm);
  border: 1px solid hsl(var(--primary) / 0.7);
  background: hsl(var(--primary));
  color: var(--kb-acc-ink);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.12s ease;
}

.kb-account-empty__cta:hover,
.kb-account-empty__cta:focus-visible {
  background: hsl(var(--primary) / 0.9);
  transform: translateY(-1px);
  outline: none;
}

.kb-account-empty__cta-icon {
  width: 1.05rem;
  height: 1.05rem;
}

/* Order cards inside account */
.kb-account-order {
  padding: 1.15rem 1.2rem;
  border-radius: var(--kb-acc-radius-sm);
  border: 1px solid var(--kb-acc-border-soft);
  background: rgb(4 10 18 / 0.45);
  transition: border-color 0.15s ease;
}

.kb-account-order:hover {
  border-color: hsl(var(--primary) / 0.4);
}

.kb-account-order + .kb-account-order {
  margin-top: 0.85rem;
}

.kb-account-panel {
  padding: 1.15rem 1.2rem;
  border-radius: var(--kb-acc-radius-sm);
  border: 1px solid var(--kb-acc-border-soft);
  background: rgb(4 10 18 / 0.45);
}

.kb-account-panel + .kb-account-panel {
  margin-top: 1rem;
}

.kb-account-stat {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid hsl(var(--primary) / 0.18);
  background: rgb(6 12 22 / 0.65);
}

/* Mobile: horizontal nav scroll when stacked */
@media (max-width: 1023px) {
  .kb-account-side {
    padding-top: 1.5rem;
  }

  .kb-account-side__nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .kb-account-side__link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .kb-account-side__back {
    margin-top: 0.35rem;
  }
}
