/* Organizer app detail pages — /apps/ */

.app-page {
  padding: 2rem 0 4rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-page > .container,
#app-detail-root,
#store-app-detail-root {
  width: 100%;
  max-width: min(52rem, 100%);
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-detail-shell {
  width: 100%;
}

.app-detail-panel {
  position: relative;
  padding: clamp(0.3rem, 0.8vw, 0.45rem);
  border-radius: calc(var(--radius-xl, 1.25rem) + 4px);
  background: linear-gradient(
    135deg,
    rgba(167, 139, 250, 0.45) 0%,
    rgba(34, 211, 238, 0.28) 38%,
    rgba(124, 58, 237, 0.38) 72%,
    rgba(34, 211, 238, 0.32) 100%
  );
  box-shadow:
    0 0 0 1px rgba(167, 243, 208, 0.08),
    0 20px 64px rgba(124, 58, 237, 0.22),
    0 8px 28px rgba(0, 0, 0, 0.42);
}

.app-detail-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2rem);
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.35rem, 3.5vw, 2rem);
  border-radius: var(--radius-xl, 1.25rem);
  background: linear-gradient(165deg, rgba(12, 16, 28, 0.97) 0%, rgba(8, 12, 22, 0.99) 55%, rgba(10, 18, 32, 0.98) 100%);
  overflow: hidden;
  isolation: isolate;
}

.app-detail-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 55% at 50% -5%, rgba(124, 58, 237, 0.18), transparent 58%);
  pointer-events: none;
  z-index: 0;
}

.app-detail-frame__mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 35%, #000 15%, transparent 72%);
  pointer-events: none;
}

.app-detail-frame > * {
  position: relative;
  z-index: 1;
}

.app-page__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--color-text-muted, #94a3b8);
  margin-bottom: 1.5rem;
}

.app-page__back:hover {
  color: var(--color-accent, #38bdf8);
}

.app-hero {
  margin-bottom: 0;
  text-align: center;
  width: 100%;
}

.app-hero__icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.95), rgba(34, 211, 238, 0.75));
  box-shadow:
    0 12px 32px rgba(124, 58, 237, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.app-hero__icon svg {
  width: 2rem;
  height: 2rem;
  color: #fff;
}

.app-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-end, #22d3ee);
}

.app-hero__source {
  font-size: 0.8rem;
  color: var(--color-text-muted, #64748b);
  font-family: ui-monospace, monospace;
  margin: 0 0 1rem;
}

.app-hero h1 {
  font-family: var(--font-display, "Space Grotesk", sans-serif);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  margin: 0 0 0.85rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.app-hero__lead,
.app-hero p:not(.app-hero__price):not(.app-hero__note) {
  margin-inline: auto;
  max-width: 40rem;
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.82);
}

.app-hero__price {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  margin: 0 auto 1rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(56, 189, 248, 0.08);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-accent, #38bdf8);
}

.app-hero__price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text-muted, #94a3b8);
}

.app-hero__note {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #fbbf24;
}

.app-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  justify-content: center;
}

/* Tabbed detail body (below hero) */
.app-detail-body {
  margin-block-end: var(--space-section-gap, clamp(2rem, 5vh, 4rem));
  text-align: center;
  width: 100%;
}

.app-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  justify-content: center;
}

.app-detail-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.app-detail-tab__icon {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--accent-mint, #5eead4);
}

.app-detail-tab__icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.app-detail-tab:hover,
.app-detail-tab:focus-visible {
  border-color: rgba(94, 234, 212, 0.45);
  outline: none;
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.2);
}

.app-detail-tab.is-active {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.12), rgba(10, 10, 15, 0.2));
  border-color: rgba(94, 234, 212, 0.55);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.app-detail-tabpanels {
  min-height: 8rem;
  width: 100%;
  padding: 1.1rem 0.25rem 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.app-detail-tabpanel[hidden] {
  display: none;
}

.app-detail-section-intro {
  margin-bottom: 1.25rem;
  text-align: center;
}

.app-detail-section-intro__title {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin: 0 0 0.35rem;
  color: var(--color-accent, #38bdf8);
}

.app-detail-section-intro__lead {
  margin: 0 auto;
  max-width: 42rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
}

.app-feature-grid {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.app-feature-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(15, 23, 42, 0.35));
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.app-feature-card__icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(94, 234, 212, 0.12);
  color: #5eead4;
}

.app-feature-card__icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.app-feature-card__text {
  color: var(--color-text, #e2e8f0);
  font-size: 0.92rem;
  line-height: 1.5;
}

.app-detail-list {
  margin: 0 auto;
  padding-left: 0;
  list-style-position: inside;
  display: block;
  width: min(100%, 36rem);
  text-align: center;
}

.app-detail-list li {
  margin-bottom: 0.5rem;
  color: var(--color-text, #e2e8f0);
  font-size: 0.9375rem;
}

.app-detail-accordion-stack {
  display: grid;
  gap: 0.65rem;
  width: 100%;
  text-align: center;
}

.app-detail-accordion {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.5);
  overflow: hidden;
  width: 100%;
  text-align: center;
}

.app-detail-accordion[open] {
  border-color: rgba(94, 234, 212, 0.28);
  background: rgba(0, 0, 0, 0.2);
}

.app-detail-accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-accent, #38bdf8);
}

.app-detail-accordion__summary::-webkit-details-marker {
  display: none;
}

.app-detail-accordion__summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid rgba(255, 255, 255, 0.45);
  border-bottom: 2px solid rgba(255, 255, 255, 0.45);
  transform: rotate(45deg);
  transition: transform 0.15s;
}

.app-detail-accordion[open] > .app-detail-accordion__summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.app-detail-accordion__summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.app-detail-accordion__body {
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.app-table-scroll {
  text-align: center;
}

@media (max-width: 479px) {
  .app-detail-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .app-detail-tab {
    justify-content: center;
    padding: 0.5rem 0.65rem;
    font-size: 0.82rem;
  }

  .app-detail-tab__label {
    text-align: center;
  }

  .app-detail-accordion__summary {
    font-size: 0.88rem;
    padding: 0.75rem 0.85rem;
  }
}

.app-metering-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-inline: auto;
  text-align: left;
}

.app-metering-table th,
.app-metering-table td {
  text-align: left;
  vertical-align: middle;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.app-metering-table th:nth-child(n + 2),
.app-metering-table td:nth-child(n + 2) {
  text-align: center;
}

.app-metering-table th {
  color: var(--color-text-muted, #94a3b8);
  font-weight: 500;
}

.app-metering-table td:last-child {
  white-space: nowrap;
}

.app-metering-table tr.is-relevant td {
  background: rgba(56, 189, 248, 0.06);
}

.app-disclaimer {
  font-size: 0.8rem;
  color: var(--color-text-muted, #64748b);
  margin-top: 1rem;
}

.app-catalog {
  padding: 2rem 0 4rem;
}

.app-catalog__group {
  margin-bottom: 2.5rem;
}

.app-catalog__group h2 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent, #38bdf8);
  margin: 0 0 1rem;
}

.app-catalog__list {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.app-catalog__link {
  display: block;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.5);
  transition: border-color 0.15s, background 0.15s;
}

.app-catalog__link:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(30, 41, 59, 0.6);
}

.app-catalog__link strong {
  display: block;
  margin-bottom: 0.25rem;
}

.app-catalog__link small {
  color: var(--color-text-muted, #94a3b8);
}

.app-not-found {
  text-align: center;
  padding: 4rem 1rem;
}

.cfg-check__detail {
  font-size: 0.7rem;
  margin-left: auto;
  color: var(--color-accent, #38bdf8);
  text-decoration: none;
  flex-shrink: 0;
}

.cfg-check {
  position: relative;
}

.cfg-check .cfg-check__text {
  flex: 1;
  min-width: 0;
}

.cfg-check__row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
}
