/* Plan badge + credits + dashboard (OLKIL) */

.olkil-app__upgrade {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(254, 1, 154, 0.35);
  background: rgba(254, 1, 154, 0.08);
  color: #f4f4f5;
  font-size: 0.9rem;
  line-height: 1.45;
}

.olkil-app__upgrade a {
  color: #fe019a;
  font-weight: 650;
  text-decoration: none;
}

.olkil-app__upgrade a:hover {
  text-decoration: underline;
}

.olkil-plan-badge {
  display: inline-flex;
  align-items: center;
  margin: 0.35rem 0 0;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #fe019a, #ff4d8d);
  vertical-align: middle;
}

/* Never show plan chip in site header — dashboard only */
.olkil-header .olkil-plan-badge--chip {
  display: none !important;
}

.olkil-profile-plan {
  margin: 1.25rem 0 0.5rem;
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.olkil-profile-plan__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.olkil-profile-plan__label {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.olkil-profile-plan__value {
  margin: 0.2rem 0 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: #fff;
}

.olkil-profile-plan__credits-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

.olkil-profile-plan__hint {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.olkil-dash__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.olkil-dash__bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fe019a, #ff7aa8);
  transition: width 0.35s ease;
}

html.olkil-dash-page,
body.olkil-dash-page {
  background: #050506 !important;
  height: 100%;
  overflow: hidden;
}

body.olkil-dash-page .olkil-header,
body.olkil-dash-page header.olkil-header,
body.olkil-dash-page .site-header,
body.olkil-dash-page #masthead,
body.olkil-dash-page .olkil-footer,
body.olkil-dash-page footer,
body.olkil-dash-page #colophon,
body.olkil-dash-page .entry-header,
body.olkil-dash-page .page-header,
body.olkil-dash-page .ast-breadcrumbs-wrapper,
body.olkil-dash-page .ast-related-posts-wrapper {
  display: none !important;
}

body.olkil-dash-page #page,
body.olkil-dash-page .site,
body.olkil-dash-page #content,
body.olkil-dash-page .site-content,
body.olkil-dash-page #primary,
body.olkil-dash-page .ast-container,
body.olkil-dash-page .content-area,
body.olkil-dash-page article,
body.olkil-dash-page .entry-content,
body.olkil-dash-page .olkil-wrap {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
  float: none !important;
}

/* ——— Dashboard app shell ——— */
.olkil-app {
  --app-bg: #0a0a0c;
  --app-card: #121216;
  --app-line: rgba(255, 255, 255, 0.07);
  --app-text: #f4f4f5;
  --app-muted: #9ca3af;
  --app-ink: #ffffff;
  --app-pink: #ff2d8c;
  --app-pink-hot: #ff4da6;
  --app-sidebar: 260px;
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: var(--app-sidebar) minmax(0, 1fr);
  max-width: none;
  margin: 0;
  background: #050506;
  color: var(--app-text);
  font-family: "Geist", ui-sans-serif, system-ui, Segoe UI, Helvetica, Arial, sans-serif;
}

.olkil-app__nav {
  background: var(--app-bg);
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  border-right: 1px solid var(--app-line);
}

.olkil-app__nav-top {
  padding: 20px 16px 0;
}

.olkil-app__back {
  display: block;
  width: 100%;
  margin: 0 0 0 4px;
  color: var(--app-muted) !important;
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.olkil-app__back:hover {
  color: var(--app-pink) !important;
}

.olkil-app__brand-block {
  width: 100%;
  padding: 14px 16px 16px;
  border-bottom: 1px solid var(--app-line);
  margin-bottom: 4px;
}

.olkil-app__brand {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Syne", "Geist", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--app-pink);
}

.olkil-app__brand-text {
  line-height: 1;
}

.olkil-app__brand-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.olkil-app__nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  flex: 1;
}

.olkil-app__nav-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--app-muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.3;
  transition: background 0.2s ease, color 0.2s ease;
}

.olkil-app__nav-icon {
  width: 18px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

.olkil-app__nav-links a:hover,
.olkil-app__nav-links a.is-active {
  background: rgba(255, 45, 140, 0.12);
  color: #fff;
}

.olkil-app__nav-links a.is-active .olkil-app__nav-icon {
  opacity: 1;
  color: var(--app-pink);
}

.olkil-app__nav-external {
  margin-top: 8px;
  border-top: 1px solid var(--app-line);
  padding-top: 16px !important;
}

.olkil-app__user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--app-line);
  background: rgba(0, 0, 0, 0.2);
}

.olkil-app__user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #ff3b6b, #7c4dff);
  box-shadow: 0 0 0 2px rgba(255, 45, 140, 0.25);
}

.olkil-app__user-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.olkil-app__user strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.olkil-app__user span {
  display: inline-block;
  width: fit-content;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #fe019a, #ff4d8d);
  border-radius: 999px;
  padding: 3px 8px;
}

.olkil-app__main {
  overflow: auto;
  background:
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(255, 45, 140, 0.06), transparent 60%),
    #050506;
  min-height: 100vh;
}

.olkil-app__canvas {
  max-width: 960px;
  padding: 40px 48px 80px;
}

.olkil-app__kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-pink);
}

.olkil-app__head h1,
.olkil-app__guest h1 {
  margin: 0 0 32px;
  font-family: "Syne", "Geist", sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  color: var(--app-ink);
  line-height: 1.15;
}

.olkil-app__guest {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 80px);
  padding: 24px 0;
}

.olkil-app__guest-card {
  max-width: 440px;
  width: 100%;
  padding: 2.5rem 2rem;
  border-radius: 20px;
  border: 1px solid var(--app-line);
  background: var(--app-card);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.olkil-app__guest p {
  color: var(--app-muted);
  margin: 0 0 24px;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ——— Hero card (unified overview panel) ——— */
.olkil-app__hero-card {
  padding: 28px 32px;
  margin-bottom: 36px;
  border-radius: 18px;
  border: 1px solid var(--app-line);
  background: var(--app-card);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.olkil-app__hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
}

.olkil-app__hero-top h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--app-ink);
}

.olkil-app__hero-top p {
  margin: 0;
  max-width: 34rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--app-muted);
}

.olkil-app__stat {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--app-pink);
  white-space: nowrap;
}

.olkil-app__hero-card .olkil-dash__bar {
  margin-bottom: 24px;
}

.olkil-app__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--app-line);
}

.olkil-app__usage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.olkil-app__metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.olkil-app__metric-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--app-muted);
}

.olkil-app__metric-value {
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--app-ink);
}

.olkil-app__metric-value--accent {
  color: var(--app-pink);
}

.olkil-app__metric-hint {
  font-size: 0.82rem;
  color: var(--app-muted);
  line-height: 1.4;
}

.olkil-app__hint {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--app-muted);
  line-height: 1.45;
}

/* ——— Sections ——— */
.olkil-app__section {
  margin-bottom: 40px;
}

.olkil-app__section--compact {
  margin-bottom: 0;
}

.olkil-app__section-head {
  margin-bottom: 20px;
}

.olkil-app__section-head h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--app-ink);
}

.olkil-app__section-head p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--app-muted);
}

.olkil-app__section-head--inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 24px;
  border-radius: 14px;
  border: 1px solid var(--app-line);
  background: rgba(255, 255, 255, 0.02);
}

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

/* ——— Dashboard upgrade plans (rebuilt) ——— */
.olkil-dash-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.olkil-dash-plan {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  border: 1px solid var(--app-line);
  border-radius: 16px;
  background: var(--app-card);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.olkil-dash-plan:hover {
  border-color: rgba(255, 45, 140, 0.35);
}

.olkil-dash-plan.is-current {
  border-color: rgba(255, 45, 140, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 45, 140, 0.15), 0 10px 36px rgba(255, 45, 140, 0.1);
  background: linear-gradient(160deg, rgba(255, 45, 140, 0.12), rgba(255, 45, 140, 0.04));
}

.olkil-dash-plan.is-held {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
}

.olkil-dash-plan__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 24px 18px 16px;
}

.olkil-dash-plan__name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--app-ink);
  line-height: 1.2;
}

.olkil-dash-plan__price {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--app-pink);
  line-height: 1.3;
}

.olkil-dash-plan__price span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--app-muted);
}

.olkil-dash-plan__tokens {
  margin: 0;
  max-width: 16rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--app-muted);
}

.olkil-dash-plan__foot {
  padding: 0 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.olkil-dash-plan__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 220px;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fe019a, #ff4d8d);
  color: #fff !important;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.olkil-dash-plan__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 45, 140, 0.28);
}

.olkil-dash-plan__btn[hidden] {
  display: none !important;
}

.olkil-dash-plan__current {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-pink);
}

.olkil-dash-plan__current[hidden] {
  display: none !important;
}

.olkil-app__plans article {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 14px;
  min-height: 200px;
  padding: 24px 20px 22px;
  border: 1px solid var(--app-line);
  border-radius: 16px;
  background: var(--app-card);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.olkil-app__plans article:hover {
  border-color: rgba(255, 45, 140, 0.3);
}

.olkil-app__plans article.is-current {
  background: linear-gradient(145deg, rgba(255, 45, 140, 0.1), rgba(255, 45, 140, 0.04));
  border-color: rgba(255, 45, 140, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 45, 140, 0.15), 0 8px 32px rgba(255, 45, 140, 0.08);
}

.olkil-app__plans article.is-current .olkil-app__btn,
.olkil-app__btn[hidden] {
  display: none !important;
}

.olkil-app__plan-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.olkil-app__plan-top strong {
  font-size: 1.15rem;
  color: var(--app-ink);
  line-height: 1.2;
}

.olkil-app__plan-top span,
.olkil-app__plan-price {
  font-size: 0.92rem;
  color: var(--app-muted);
  white-space: normal;
}

.olkil-app__plan-tokens,
.olkil-app__plans article p {
  margin: 0;
  flex: 1;
  width: 100%;
  font-size: 0.88rem;
  color: var(--app-muted);
  line-height: 1.5;
  padding: 0 4px;
  word-break: break-word;
}

.olkil-app__current {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-pink);
  margin-top: auto;
  padding-top: 4px;
}

.olkil-app__current[hidden] {
  display: none !important;
}

.olkil-app__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fe019a, #ff4d8d);
  color: #fff !important;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.olkil-app__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 45, 140, 0.3);
}

.olkil-app__btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 45, 140, 0.45);
  color: #fff !important;
  box-shadow: none;
}

.olkil-app__btn--ghost:hover {
  background: rgba(255, 45, 140, 0.12);
  transform: none;
  box-shadow: none;
}

.olkil-app__btn--sm {
  margin-top: auto;
  width: 100%;
  max-width: 220px;
  padding: 9px 16px;
  font-size: 0.84rem;
}

.olkil-dash__bar--lg {
  height: 10px;
  margin: 0 0 8px;
  background: rgba(255, 255, 255, 0.08);
}

.olkil-app__panel--table {
  overflow: auto;
  border: 1px solid var(--app-line);
  border-radius: 16px;
  background: var(--app-card);
}

.olkil-app__table {
  width: 100%;
  border-collapse: collapse;
  color: var(--app-text);
}

.olkil-app__table th,
.olkil-app__table td {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--app-line);
}

.olkil-app__table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted);
  background: rgba(255, 255, 255, 0.02);
}

.olkil-app__table tbody tr:last-child td {
  border-bottom: 0;
}

.olkil-app__table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.olkil-app__table a {
  color: var(--app-pink);
  font-weight: 600;
  text-decoration: none;
}

.olkil-app__table a:hover {
  text-decoration: underline;
}

.olkil-app__status {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 45, 140, 0.28);
}

.olkil-app__view[hidden],
#olkil-dash-main[hidden],
#olkil-dash-guest[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .olkil-app__plans,
  .olkil-dash-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  html.olkil-dash-page,
  body.olkil-dash-page {
    overflow: auto;
    height: auto;
  }

  .olkil-app {
    position: relative;
    min-height: 100vh;
    grid-template-columns: 1fr;
  }

  .olkil-app__nav {
    min-height: 0;
  }

  .olkil-app__nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 8px;
  }

  .olkil-app__nav-links a {
    flex: 1 1 auto;
    min-width: calc(50% - 4px);
    justify-content: center;
  }

  .olkil-app__nav-external {
    border-top: none;
    padding-top: 10px !important;
  }

  .olkil-app__user {
    margin-top: 0;
  }

  .olkil-app__canvas {
    padding: 24px 20px 64px;
  }

  .olkil-app__hero-card {
    padding: 20px;
  }

  .olkil-app__hero-top {
    flex-direction: column;
  }

  .olkil-app__metrics,
  .olkil-app__usage-grid,
  .olkil-profile-plan__row {
    grid-template-columns: 1fr;
  }

  .olkil-app__plans,
  .olkil-dash-plans {
    grid-template-columns: 1fr;
  }

  .olkil-app__section-head--inline {
    flex-direction: column;
    align-items: flex-start;
  }
}
