/* Performance Clinic OS: platform demo UI (pixel-spec, inherits .pcos-site tokens) */

.pf-schedule {
  --pf-accent: var(--pcos-accent, #c8943a);
  --pf-accent-glow: var(--pcos-accent-glow, rgba(200, 148, 58, 0.18));
  --pf-border-grid: rgba(255, 255, 255, 0.06);
  --pf-teal: var(--pcos-teal-live, #5abf94);

  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  position: relative;
  background: var(--pcos-surface-primary, #0c0f0b);
  border: 1px solid var(--pcos-border, rgba(255, 248, 230, 0.07));
  border-radius: 18px;
  overflow: hidden;
  min-height: 440px;
  font-family: var(--pcos-font-sans, 'DM Sans', system-ui, sans-serif);
  font-size: 15px;
  color: var(--pcos-text, rgba(255, 255, 255, 0.94));
}

.pf-schedule--compact {
  min-height: 380px;
  border-radius: 14px;
}

.pf-schedule--compact .pf-schedule-scroll {
  max-height: 340px;
}

.pf-schedule-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pf-schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--pcos-border, rgba(255, 255, 255, 0.08));
  background: var(--pcos-surface-secondary, #0e141b);
  position: sticky;
  top: 0;
  z-index: 4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pf-schedule-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-schedule-week-label {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.025em;
  color: var(--pcos-text, rgba(255, 255, 255, 0.94));
}

.pf-schedule-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--pcos-text-dim, rgba(255, 255, 255, 0.42));
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.pf-schedule-nav {
  display: flex;
  gap: 8px;
}

.pf-icon-btn {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--pcos-text-muted, rgba(255, 255, 255, 0.68));
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--pcos-border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pf-icon-btn:hover {
  color: var(--pcos-text, rgba(255, 255, 255, 0.94));
  border-color: rgba(200, 148, 58, 0.35);
  background: rgba(200, 148, 58, 0.06);
}

.pf-schedule-scroll {
  overflow: auto;
  flex: 1;
  max-height: 600px;
}

.pf-schedule-grid {
  display: grid;
  grid-template-columns: 72px repeat(var(--pf-cols, 5), minmax(160px, 1fr));
  gap: 1px;
  background: var(--pf-border-grid);
  min-width: 640px;
}

.pf-sg-corner,
.pf-sg-day,
.pf-sg-time,
.pf-slot {
  background: var(--pcos-surface-primary, #0a0f14);
}

.pf-sg-corner {
  min-height: 56px;
  position: sticky;
  left: 0;
  z-index: 3;
  box-shadow: 1px 0 0 var(--pf-border-grid);
}

.pf-sg-day {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  color: var(--pcos-text-muted, rgba(255, 255, 255, 0.68));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--pf-border-grid);
}

.pf-sg-day--today {
  background: var(--pf-day-today-bg, rgba(200, 148, 58, 0.06));
  color: var(--pf-accent);
  box-shadow: inset 0 -2px 0 var(--pf-day-today-line, rgba(200, 148, 58, 0.45));
}

.pf-sg-time {
  min-height: 60px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--pcos-text-dim, rgba(255, 255, 255, 0.42));
  text-align: right;
  font-variant-numeric: tabular-nums;
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 1px 0 0 var(--pf-border-grid);
}

.pf-slot {
  min-height: 60px;
  min-width: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: background 0.14s ease-out, box-shadow 0.14s ease-out, transform 0.14s ease-out;
}

/* Empty slot */
.pf-slot--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--pcos-text-disabled, rgba(255, 255, 255, 0.26));
}

.pf-slot-plus {
  font-size: 14px;
  font-weight: 300;
  opacity: 0.35;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.pf-slot-hint {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pcos-text-dim);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.pf-slot--empty:hover {
  background: var(--pf-slot-hover-tint, rgba(200, 148, 58, 0.05));
}

.pf-slot--empty:hover .pf-slot-plus {
  opacity: 1;
  color: var(--pf-accent);
  transform: scale(1.08);
}

.pf-slot--empty:hover .pf-slot-hint {
  opacity: 1;
  transform: translateY(0);
  color: var(--pcos-text-muted);
}

.pf-slot--empty.is-selected {
  background: color-mix(in srgb, var(--pf-accent, #c8943a) 12%, var(--pcos-surface-primary, #0a0f14));
  box-shadow:
    inset 0 0 0 1px var(--pf-slot-selected-ring, rgba(200, 148, 58, 0.35)),
    0 0 20px var(--pf-slot-selected-glow, rgba(200, 148, 58, 0.1));
  animation: pf-slot-select 0.14s ease-out;
}

.pf-slot--empty.is-selected .pf-slot-plus {
  opacity: 1;
  color: var(--pf-accent);
}

@keyframes pf-slot-select {
  from {
    transform: scale(0.985);
  }
  to {
    transform: scale(1);
  }
}

/* Booked */
.pf-slot--booked {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  min-height: 72px;
  padding: 8px 10px;
  margin: 4px;
  border-radius: var(--demo-radius, 10px);
  border-left: 2px solid var(--pf-tone, var(--pf-accent, #c8943a));
  text-align: left;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.pf-slot--booked:hover {
  transform: translateY(-1px);
  box-shadow: var(--pf-slot-booked-hover-shadow, 0 8px 24px rgba(0, 0, 0, 0.35)),
    0 0 0 1px color-mix(in srgb, var(--pcos-text, #fff) 10%, transparent);
}

.pf-slot--tone-cyan {
  --pf-tone: var(--pf-tone-slot-cyan, #38bdf8);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--pf-tone-slot-cyan, #38bdf8) 26%, var(--pcos-surface-primary, #0a0f14)),
    transparent
  );
}
.pf-slot--tone-violet {
  --pf-tone: var(--pf-tone-slot-violet, #a78bfa);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--pf-tone-slot-violet, #a78bfa) 26%, var(--pcos-surface-primary, #0a0f14)),
    transparent
  );
}
.pf-slot--tone-amber {
  --pf-tone: var(--pf-tone-slot-amber, #e8b949);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--pf-tone-slot-amber, #e8b949) 24%, var(--pcos-surface-primary, #0a0f14)),
    transparent
  );
}
.pf-slot--tone-emerald {
  --pf-tone: var(--pf-tone-slot-emerald, #5abf94);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--pf-tone-slot-emerald, #5abf94) 24%, var(--pcos-surface-primary, #0a0f14)),
    transparent
  );
}
.pf-slot--tone-rose {
  --pf-tone: var(--pf-tone-slot-rose, #f472b6);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--pf-tone-slot-rose, #f472b6) 26%, var(--pcos-surface-primary, #0a0f14)),
    transparent
  );
}
.pf-slot--tone-teal {
  --pf-tone: var(--pf-tone-slot-teal, #5abf94);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--pf-tone-slot-teal, #5abf94) 26%, var(--pcos-surface-primary, #0a0f14)),
    transparent
  );
}

.pf-slot--booked.is-selected {
  box-shadow: 0 0 0 1px var(--pf-slot-selected-ring, rgba(200, 148, 58, 0.45)),
    0 0 20px var(--pf-slot-selected-glow, rgba(200, 148, 58, 0.12));
}

.pf-slot--booked.is-landing {
  animation: pf-booking-land 0.42s ease-out;
}

@keyframes pf-booking-land {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.pf-slot-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--pcos-text, rgba(255, 255, 255, 0.94));
  line-height: 1.2;
}

.pf-slot-meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--pcos-text-muted, rgba(255, 255, 255, 0.68));
}

.pf-slot-vibes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.pf-slot-vibe {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 4px;
  color: rgba(245, 240, 228, 0.88);
  background: color-mix(in srgb, var(--pf-tone, var(--pf-accent, #c8943a)) 22%, rgba(0, 0, 0, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.2;
}

/* Appointment modal: PCOS / staff shell (dark panel, gold accent); same flow as staff schedule */
.pf-appt-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.72);
  -webkit-overflow-scrolling: touch;
}

.pf-appt-dialog {
  width: 100%;
  max-width: 480px;
  max-height: min(90vh, 100dvh - 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--pcos-surface-secondary, #111410);
  border: 1px solid var(--pcos-border-strong, rgba(255, 248, 230, 0.11));
  border-radius: 12px;
  color: var(--pcos-text, rgba(245, 240, 228, 0.95));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(200, 148, 58, 0.12);
  display: flex;
  flex-direction: column;
  font-family: var(--pcos-font-sans, 'DM Sans', system-ui, sans-serif);
}

.pf-appt-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--pcos-border, rgba(255, 248, 230, 0.07));
  flex-shrink: 0;
}

.pf-appt-dialog__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--pcos-text, rgba(245, 240, 228, 0.95));
}

.pf-appt-dialog__close {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--pcos-text-muted, rgba(245, 240, 228, 0.62));
  border-radius: 8px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}

.pf-appt-dialog__close:hover {
  background: rgba(255, 248, 230, 0.06);
  color: var(--pcos-text, rgba(245, 240, 228, 0.95));
}

.pf-appt-dialog__body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-appt-dialog__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--pcos-border, rgba(255, 248, 230, 0.07));
  flex-shrink: 0;
  background: var(--pcos-surface-primary, #0c0f0b);
  border-radius: 0 0 12px 12px;
}

.pf-appt-hint {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pcos-text-dim, rgba(245, 240, 228, 0.38));
}

.pf-appt-slot-highlight {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(245, 220, 170, 0.92);
  background: rgba(200, 148, 58, 0.14);
  border: 1px solid rgba(200, 148, 58, 0.22);
  border-radius: 8px;
}

.pf-appt-slot-highlight strong {
  color: var(--pcos-text, rgba(245, 240, 228, 0.95));
  font-weight: 600;
}

.pf-appt-slot-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--pcos-border, rgba(255, 248, 230, 0.07));
  background: rgba(0, 0, 0, 0.28);
}

.pf-appt-readout {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pf-appt-readout-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pcos-text-dim, rgba(245, 240, 228, 0.38));
}

.pf-appt-readout-value {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--pcos-accent, #c8943a);
}

.pf-appt-warn {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  background: rgba(232, 185, 73, 0.1);
  border: 1px solid rgba(200, 148, 58, 0.35);
  border-radius: 8px;
  color: rgba(245, 210, 140, 0.95);
}

.pf-appt-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pcos-text-dim, rgba(245, 240, 228, 0.38));
}

.pf-appt-input,
.pf-appt-select,
.pf-appt-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--pcos-text, rgba(245, 240, 228, 0.95));
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--pcos-border-strong, rgba(255, 248, 230, 0.11));
  border-radius: 8px;
  box-sizing: border-box;
}

.pf-appt-input:focus,
.pf-appt-select:focus,
.pf-appt-textarea:focus {
  outline: none;
  border-color: rgba(200, 148, 58, 0.55);
  box-shadow: 0 0 0 1px rgba(200, 148, 58, 0.2);
}

.pf-appt-input::placeholder,
.pf-appt-textarea::placeholder {
  color: var(--pcos-text-dim, rgba(245, 240, 228, 0.38));
}

.pf-appt-client-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.pf-appt-client-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  text-align: left;
  background: rgba(255, 248, 230, 0.03);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.pf-appt-client-row:hover {
  background: rgba(255, 248, 230, 0.06);
}

.pf-appt-client-row.is-active {
  border-color: rgba(200, 148, 58, 0.45);
  background: rgba(200, 148, 58, 0.1);
  box-shadow: 0 0 0 1px rgba(200, 148, 58, 0.12);
}

.pf-appt-client-name {
  font-size: 13px;
  font-weight: 600;
}

.pf-appt-client-sessions {
  font-size: 11px;
  font-weight: 500;
  color: var(--pcos-text-dim, rgba(245, 240, 228, 0.38));
  font-variant-numeric: tabular-nums;
}

.pf-client-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pf-badge--ok {
  background: rgba(61, 220, 151, 0.15);
  color: var(--pcos-success, #3ddc97);
}
.pf-badge--new {
  background: rgba(200, 148, 58, 0.12);
  color: var(--pf-accent);
}
.pf-badge--follow {
  background: rgba(232, 185, 73, 0.12);
  color: var(--pcos-warning, #e8b949);
}
.pf-badge--inactive {
  background: rgba(255, 107, 107, 0.1);
  color: var(--pcos-error, #ff6b6b);
}

.pf-appt-seg-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-appt-seg {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 248, 230, 0.04);
  border: 1px solid var(--pcos-border, rgba(255, 248, 230, 0.07));
  border-radius: 8px;
  color: var(--pcos-text-muted, rgba(245, 240, 228, 0.62));
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.pf-appt-seg:hover {
  border-color: color-mix(in srgb, var(--pcos-accent, #c8943a) 42%, transparent);
  color: var(--pcos-text, rgba(245, 240, 228, 0.95));
}

.pf-appt-seg.is-active {
  border-color: color-mix(in srgb, var(--pcos-accent, #c8943a) 58%, transparent);
  background: color-mix(in srgb, var(--pcos-accent, #c8943a) 14%, transparent);
  color: var(--pcos-text, rgba(245, 240, 228, 0.95));
}

.pf-appt-btn {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--demo-radius, 8px);
  cursor: pointer;
  border: 1px solid var(--pcos-border-strong, rgba(255, 248, 230, 0.11));
  font-family: inherit;
  background: transparent;
  color: var(--pcos-text-muted, rgba(245, 240, 228, 0.62));
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease, color 0.12s ease;
}

.pf-appt-btn--primary {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--pcos-accent, #c8943a) 92%, #ffffff),
    color-mix(in srgb, var(--pcos-accent, #c8943a) 72%, #0a0a0a)
  );
  border-color: color-mix(in srgb, var(--pcos-accent, #c8943a) 52%, transparent);
  color: var(--pf-primary-btn-fg, #0a0a0a);
}

.pf-appt-btn--primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.pf-appt-btn--primary:active {
  transform: scale(0.99);
}

.pf-appt-btn--ghost {
  background: rgba(255, 248, 230, 0.04);
  border-color: var(--pcos-border-strong, rgba(255, 248, 230, 0.11));
  color: var(--pcos-text-muted, rgba(245, 240, 228, 0.68));
}

.pf-appt-btn--ghost:hover {
  border-color: color-mix(in srgb, var(--pcos-accent, #c8943a) 38%, transparent);
  color: var(--pcos-text, rgba(245, 240, 228, 0.95));
  background: color-mix(in srgb, var(--pcos-accent, #c8943a) 8%, transparent);
}

.pf-appt-btn--danger {
  margin-right: auto;
  background: rgba(255, 107, 107, 0.08);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ff9a9a;
}

.pf-appt-btn--danger:hover {
  background: rgba(255, 107, 107, 0.12);
}

/* Tables */
.pf-table-wrap {
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--pcos-border);
}

.pf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pf-table th,
.pf-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--pf-border-grid);
}

.pf-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pcos-text-dim);
  background: var(--pcos-surface-secondary);
}

.pf-muted {
  color: var(--pcos-text-muted);
  font-size: 12px;
}

.pf-revenue-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 700px) {
  .pf-revenue-grid {
    grid-template-columns: 1fr;
  }
}

.pf-stat-card {
  padding: 18px;
  background: var(--pcos-surface-card, #0f1722);
  border: 1px solid var(--pcos-border);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pf-stat-card--glass {
  background: color-mix(in srgb, var(--pcos-surface-card, #0f1210) 58%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pf-stat-value-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.pf-stat-value.pf-tabular {
  font-family: var(--pcos-font-mono, 'JetBrains Mono', ui-monospace, monospace);
}

.pf-stat-sparkline {
  width: 56px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.55;
  color: var(--pcos-accent, #c8943a);
}

.pf-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pcos-text-dim);
}

.pf-stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.pf-revenue-note {
  margin: 12px 0 0;
  font-size: 12px;
}

/* Hero stack */
.pf-hero-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 100%;
  transition: transform 0.2s ease-out;
  will-change: transform;
}

/* Hero honeycomb (production stats, marketing homepage) */
.pf-hero-hive {
  width: 100%;
  max-width: 100%;
  font-family: var(--pcos-font-sans, 'DM Sans', system-ui, sans-serif);
  transition: transform 0.2s ease-out;
  will-change: transform;
}

.pf-hive-comb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
}

/* Radial hive: gold core + six satellites + connectors (marketing homepage) */
.pf-hive-comb--radial {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  overflow: visible;
  padding: 8px 0 0;
  min-height: 0;
}

.pf-hive-radial-stage {
  position: relative;
  width: 740px;
  height: 740px;
  margin: 0 auto;
  flex-shrink: 0;
  overflow: visible;
}

.pf-hive-radial-glow {
  position: absolute;
  inset: 8% 12% 10% 12%;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(200, 148, 58, 0.16), rgba(200, 148, 58, 0.04) 46%, transparent 70%);
  filter: blur(22px);
  pointer-events: none;
  z-index: 0;
}

.pf-hive-radial-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.pf-hive-comb--radial .pf-hive-cell {
  position: absolute;
  width: 170px;
  height: 170px;
  margin: 0;
  perspective: 900px;
  opacity: 0;
  transform: scale(0.9);
  transform-origin: center center;
}

.pf-hive-comb--radial .pf-hive-cell.pf-hive-cell--visible {
  opacity: 1;
  transform: scale(1);
}

.pf-hive-radial--clients {
  left: 300px;
  top: 24px;
}

.pf-hive-radial--revenue {
  left: 94px;
  top: 144px;
}

.pf-hive-radial--schedule {
  left: 508px;
  top: 144px;
}

.pf-hive-radial--staff {
  left: 94px;
  top: 438px;
}

.pf-hive-radial--retention {
  left: 508px;
  top: 438px;
}

.pf-hive-radial--alerts {
  left: 300px;
  top: 560px;
}

.pf-hive-radial--core {
  left: 230px;
  top: 230px;
  width: 280px !important;
  height: 280px !important;
  z-index: 5;
}

.pf-hive-cell--core .pf-hive-face {
  padding: 22px 18px;
}

.pf-hive-cell--core .pf-hive-stat-label {
  font-size: 9px;
  margin-bottom: 8px;
  max-width: 220px;
  letter-spacing: 0.14em;
}

.pf-hive-cell--core .pf-hive-stat-num {
  font-size: clamp(36px, 8vw, 52px);
}

.pf-hive-cell--core .pf-hive-stat-num--sm {
  font-size: clamp(28px, 5vw, 38px);
}

.pf-hive-cell--core .pf-hive-stat-num--word {
  font-size: clamp(22px, 4vw, 30px);
}

.pf-hive-cell--core .pf-hive-stat-desc {
  font-size: 10px;
  max-width: 220px;
  margin-top: 10px;
  line-height: 1.35;
}

.pf-hive-cell--core .pf-hive-face--back {
  background: linear-gradient(180deg, #d4a24a 0%, #9a6e22 78%, #7a5418 100%);
}

.pf-hive-cell--core .pf-hive-face--back .pf-hive-stat-label {
  color: rgba(22, 18, 10, 0.55);
}

.pf-hive-cell--core .pf-hive-face--back .pf-hive-stat-num,
.pf-hive-cell--core .pf-hive-face--back .pf-hive-stat-num--sm,
.pf-hive-cell--core .pf-hive-face--back .pf-hive-stat-num--word {
  color: rgba(18, 14, 8, 0.95);
}

.pf-hive-cell--core .pf-hive-face--back .pf-hive-stat-desc {
  color: rgba(22, 18, 10, 0.78);
}

.pf-hive-cell--core.pf-hive-cell--live .pf-hive-face--front::before {
  top: 20px;
  right: 24px;
}

.pf-hive-comb--radial .pf-hive-cell:hover .pf-hive-hex {
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.4));
}

/* Radial satellites: brighter faces + stronger type for quick scan */
.pf-hive-comb--radial .pf-hive-cell:not(.pf-hive-cell--core) .pf-hive-face--back {
  background: linear-gradient(145deg, rgba(36, 40, 30, 1) 0%, rgba(48, 52, 38, 1) 55%, rgba(34, 38, 28, 1) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.07);
}

.pf-hive-comb--radial .pf-hive-cell:not(.pf-hive-cell--core) .pf-hive-stat-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(245, 240, 228, 0.52);
}

.pf-hive-comb--radial .pf-hive-cell:not(.pf-hive-cell--core) .pf-hive-stat-num {
  font-size: 32px;
  color: rgba(245, 240, 228, 0.98);
}

.pf-hive-comb--radial .pf-hive-cell:not(.pf-hive-cell--core) .pf-hive-stat-num--sm {
  font-size: 26px;
}

.pf-hive-comb--radial .pf-hive-cell:not(.pf-hive-cell--core) .pf-hive-stat-num--word {
  font-size: 19px;
}

.pf-hive-comb--radial .pf-hive-cell:not(.pf-hive-cell--core) .pf-hive-stat-desc {
  font-size: 9px;
  max-width: 92px;
  color: rgba(245, 240, 228, 0.78);
  margin-top: 6px;
}

.pf-hive-stat-num--money {
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.pf-hive-stat-delta {
  display: block;
  margin-top: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.25;
}

.pf-hive-cell--core .pf-hive-stat-num--money {
  font-size: clamp(32px, 7vw, 46px);
}

.pf-hive-cell--core .pf-hive-face--back .pf-hive-stat-delta {
  color: rgba(16, 12, 6, 0.78);
}

.pf-hive-core-metric-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.pf-hive-sparkline {
  width: 52px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.65;
  color: rgba(18, 14, 8, 0.85);
}

.pf-hive-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 22px;
  margin: 0;
}

.pf-hive-row + .pf-hive-row {
  margin-top: 18px;
}

.pf-hive-row:nth-child(even) {
  margin-left: 63px;
}

.pf-hive-cell {
  width: 104px;
  height: 120px;
  position: relative;
  perspective: 760px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(36px) rotateX(-12deg);
  text-decoration: none;
  color: inherit;
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.pf-hive-cell--visible {
  opacity: 1;
  transform: translateY(0) rotateX(0);
  transition:
    opacity 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

a.pf-hive-cell:focus-visible {
  outline: 2px solid var(--pcos-accent, #c8943a);
  outline-offset: 4px;
  border-radius: 4px;
}

.pf-hive-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 148, 58, 0.2) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

.pf-hive-cell--rippling .pf-hive-ripple {
  animation: pf-hive-ripple 1.15s ease-out forwards;
}

@keyframes pf-hive-ripple {
  0% {
    width: 0;
    height: 0;
    opacity: 0.75;
  }
  100% {
    width: 180px;
    height: 180px;
    opacity: 0;
  }
}

.pf-hive-hex {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.pf-hive-hex--flipped {
  transform: rotateY(180deg);
}

.pf-hive-hex--auto {
  animation: pf-hive-wave-flip 1.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pf-hive-wave-flip {
  0% {
    transform: rotateY(0deg);
  }
  45% {
    transform: rotateY(90deg);
  }
  55% {
    transform: rotateY(90deg);
  }
  100% {
    transform: rotateY(180deg);
  }
}

/* Marketing homepage: tear away to wax face, swap copy, flip back to stats */
.pf-hive-hex--data-rip {
  transition: none !important;
  animation: pf-hive-data-rip 0.92s cubic-bezier(0.45, 0, 0.22, 1) forwards;
}

@keyframes pf-hive-data-rip {
  0% {
    transform: rotateY(180deg);
  }
  40% {
    transform: rotateY(0deg);
  }
  60% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(180deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-hive-hex--data-rip {
    animation: none;
  }
}

.pf-hive-face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  padding: 16px 12px;
  text-align: center;
  box-sizing: border-box;
}

.pf-hive-face--front {
  background: linear-gradient(
    135deg,
    rgba(22, 26, 20, 1) 0%,
    rgba(30, 28, 22, 1) 50%,
    rgba(22, 26, 20, 1) 100%
  );
  border: none;
  box-shadow: none;
}

.pf-hive-face--front::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(200, 148, 58, 0.06) 50%, transparent 60%);
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  pointer-events: none;
}

.pf-hive-face--back {
  background: linear-gradient(135deg, rgba(28, 32, 24, 1) 0%, rgba(38, 42, 30, 1) 100%);
  transform: rotateY(180deg);
  border: none;
  box-shadow: none;
}

.pf-hive-cell--live .pf-hive-face--front {
  box-shadow: inset 0 0 0 1px rgba(90, 191, 148, 0.14);
}

.pf-hive-cell--live .pf-hive-face--front::before {
  content: '';
  position: absolute;
  top: 14px;
  right: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pcos-teal-live, #5abf94);
  box-shadow: 0 0 10px var(--pcos-teal-live, #5abf94);
  animation: pf-pulse 2.2s ease-in-out infinite;
  z-index: 1;
}

.pf-hive-cell:hover .pf-hive-face--front {
  box-shadow: inset 0 0 28px rgba(200, 148, 58, 0.07);
}

.pf-hive-cell--live:hover .pf-hive-face--front {
  box-shadow: inset 0 0 0 1px rgba(90, 191, 148, 0.22), inset 0 0 28px rgba(90, 191, 148, 0.06);
}

.pf-hive-wax {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, rgba(40, 38, 32, 1), rgba(55, 50, 40, 1));
  border-radius: 50%;
  opacity: 0.35;
}

.pf-hive-stat-label {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pcos-text-dim, rgba(245, 240, 228, 0.38));
  margin-bottom: 4px;
  line-height: 1.2;
  max-width: 88px;
}

.pf-hive-stat-num {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--pcos-text, rgba(245, 240, 228, 0.95));
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pf-hive-stat-num--sm {
  font-size: 22px;
}

.pf-hive-stat-num--word {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pf-hive-stat-num--ghost {
  font-size: 20px;
  opacity: 0.35;
}

.pf-hive-stat-desc {
  font-size: 8px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--pcos-text-muted, rgba(245, 240, 228, 0.62));
  margin-top: 4px;
  max-width: 86px;
}

@media (prefers-reduced-motion: reduce) {
  .pf-hive-cell,
  .pf-hive-hex,
  .pf-hive-face,
  .pf-hive-ripple {
    transition: none !important;
    animation: none !important;
  }

  .pf-hive-cell {
    opacity: 1;
    transform: none;
  }

  .pf-hive-comb--radial .pf-hive-cell {
    transform: none;
  }

  .pf-hive-hex {
    transform: rotateY(180deg);
  }
}

@media (max-width: 520px) {
  .pf-hive-row:nth-child(even) {
    margin-left: 0;
  }

  .pf-hive-row {
    gap: 14px;
  }

  .pf-hive-row + .pf-hive-row {
    margin-top: 12px;
  }

  .pf-hive-cell {
    width: 88px;
    height: 102px;
  }

  .pf-hive-stat-num {
    font-size: 22px;
  }

  .pf-hive-stat-num--sm {
    font-size: 17px;
  }

  .pf-hive-stat-num--word {
    font-size: 14px;
  }
}

.pf-stack-card {
  padding: 20px 22px;
  background: var(--pcos-surface-card, #0f1722);
  border: 1px solid var(--pcos-border);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

a.pf-stack-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.pf-stack-card:focus-visible {
  outline: 2px solid var(--pcos-accent, #c8943a);
  outline-offset: 2px;
}

.pf-schedule--demo-gateway {
  cursor: pointer;
}

.pf-schedule--demo-gateway:focus-visible {
  outline: 2px solid var(--pcos-accent, #c8943a);
  outline-offset: 2px;
}

.pf-demo-gateway-wrap {
  display: block;
  cursor: pointer;
}

.pf-demo-gateway-wrap:focus-visible {
  outline: 2px solid var(--pcos-accent, #c8943a);
  outline-offset: 2px;
}

.pf-stack-card:hover {
  border-color: rgba(200, 148, 58, 0.28);
  box-shadow: 0 0 0 1px rgba(200, 148, 58, 0.12), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.pf-stack-card--live {
  border-color: rgba(67, 215, 197, 0.35);
  box-shadow: 0 0 0 1px rgba(67, 215, 197, 0.12), 0 8px 32px rgba(0, 0, 0, 0.32);
  position: relative;
}

.pf-stack-card--live::before {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pf-teal);
  box-shadow: 0 0 12px var(--pf-teal);
  animation: pf-pulse 2.2s ease-in-out infinite;
}

@keyframes pf-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.pf-stack-card--wide {
  grid-column: 1 / -1;
}

.pf-stack-live-summary {
  margin: 4px 0 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--pcos-text-muted, rgba(245, 240, 228, 0.62));
}

.pf-stack-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--pcos-text-dim);
}

.pf-stack-metric {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.pf-stack-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--pcos-text-muted);
}

.pf-mini-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 68px;
  margin-top: 8px;
}

.pf-mini-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  background: rgba(200, 148, 58, 0.14);
  border-radius: 6px;
  min-height: 22px;
  transition: height 0.3s ease, background 0.2s ease;
}

.pf-mini-bar-col:hover {
  background: rgba(200, 148, 58, 0.22);
}

.pf-mini-bar-col i {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--pcos-text);
}

@media (max-width: 900px) {
  .pf-appt-dialog {
    max-width: 100%;
    max-height: min(92dvh, 100dvh - 32px);
    border-radius: 14px;
  }
  .pf-hero-stack,
  .pf-hero-hive {
    max-width: none;
  }
}
