/*
Path: C:/Users/Owner/Desktop/vscode/BodyPlus_XPro/admin_web/static/css/p2_surfaces.css
Description: Shared P2 admin surface layout helpers; input: template class names; output: consistent hero, section, and internal/debug separation styles.
Last-Updated: 2026-04-13
*/

.p2-shell {
  display: grid;
  gap: 1.5rem;
}

.p2-hero {
  border: 1px solid #dbe4ee;
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}

.p2-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.95fr);
  gap: 1rem;
  padding: 1.35rem;
}

.p2-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0369a1;
}

.p2-title {
  margin-top: 0.35rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.05;
  font-weight: 700;
  color: #0f172a;
}

.p2-subtitle {
  margin-top: 0.55rem;
  max-width: 48rem;
  font-size: 0.95rem;
  color: #475569;
}

.p2-chip-row,
.p2-action-row,
.p2-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.p2-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
  font-size: 0.78rem;
  line-height: 1.2;
}

.p2-card,
.p2-panel,
.p2-section {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

.p2-card,
.p2-panel {
  padding: 1rem;
}

.p2-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.p2-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.p2-section-copy {
  font-size: 0.84rem;
  color: #64748b;
  max-width: 42rem;
}

.p2-layout-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.p2-layout-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.p2-layout-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.p2-list {
  margin: 0;
  padding-inline-start: 1rem;
  color: #334155;
  font-size: 0.84rem;
}

.p2-list li + li {
  margin-top: 0.35rem;
}

.p2-meta {
  font-size: 0.78rem;
  color: #64748b;
}

.p2-note {
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  background: #f8fafc;
  padding: 0.85rem 0.95rem;
  font-size: 0.82rem;
  color: #475569;
}

.p2-note strong {
  color: #0f172a;
}

.p2-secondary {
  background: #f8fafc;
}

.p2-details {
  border: 1px solid #dbe4ee;
  border-radius: 1rem;
  background: #ffffff;
  overflow: hidden;
}

.p2-details > summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1rem 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.p2-details > summary::-webkit-details-marker {
  display: none;
}

.p2-details > summary::after {
  content: "Show";
  float: right;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.p2-details[open] > summary::after {
  content: "Hide";
}

.p2-details-body {
  padding: 0 1rem 1rem;
}

.p2-stat {
  border: 1px solid #dbe4ee;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.85rem 0.95rem;
}

.p2-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.p2-stat-value {
  margin-top: 0.35rem;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 700;
  color: #0f172a;
}

.p2-stat-copy {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #64748b;
}

.p2-split-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.p2-divider {
  border-top: 1px solid #e2e8f0;
  margin: 1rem 0;
}

@media (max-width: 1100px) {
  .p2-hero-grid,
  .p2-layout-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .p2-layout-2,
  .p2-layout-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .p2-hero-grid,
  .p2-layout-4 {
    grid-template-columns: 1fr;
  }

  .p2-hero-grid {
    padding: 1rem;
  }
}
