/* enterprise-components.css — Enterprise UI component styles */

/* ── Loading / skeleton state (LP-02) ────────────────────────────────────── */
@keyframes ent-shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}
.ent-loading {
  padding: 32px 16px;
  text-align: center;
  color: var(--ent-text3);
  font-size: 13px;
}
.ent-skeleton {
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.05) 25%, rgba(0, 0, 0, 0.02) 50%, rgba(0, 0, 0, 0.05) 75%);
  background-size: 800px 100%;
  /* Emil Kowalski: slower shimmer (1.8s) with eased pacing — easier on eyes */
  animation: ent-shimmer 1.8s infinite ease-in-out;
}
[data-theme='dark'] .ent-skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 800px 100%;
}
@media (prefers-reduced-motion: reduce) {
  .ent-skeleton {
    animation: none;
    background: var(--ent-bg2);
  }
}

/* ── Seat usage bar ───────────────────────────────────────────────────────── */
.ent-seat-bar-wrap {
  margin-bottom: 4px;
}
.ent-seat-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ent-text3);
  margin-bottom: 6px;
}
.ent-seat-bar-label strong {
  color: var(--ent-text2);
}
.ent-seat-bar-track {
  height: 6px;
  background: var(--ent-surface2);
  border-radius: 3px;
  overflow: hidden;
}
.ent-seat-bar-fill {
  height: 100%;
  background: #d97757;
  border-radius: 3px;
  transition: width 0.4s;
}
.ent-seat-bar-fill.warn {
  background: var(--ent-warning);
}
.ent-seat-bar-fill.full {
  background: var(--ent-danger);
}

/* ── Approval request card ────────────────────────────────────────────────── */
.ent-approval-card {
  background: var(--ent-surface);
  border: 1px solid var(--ent-border);
  border-radius: var(--ent-radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}
.ent-approval-card:hover {
  border-color: var(--ent-border2);
}

.ent-approval-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ent-approval-member {
  font-size: 14px;
  font-weight: 700;
  color: var(--ent-text);
}

.ent-approval-meta strong {
  color: var(--ent-text2);
}

.ent-approval-note {
  font-size: 12px;
  color: var(--ent-text2);
  background: var(--ent-surface2);
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 8px;
  font-style: italic;
}

/* ── Session request card (member view) ───────────────────────────────────── */
/* ── Session slot cards — premium feel ────────────────────────────────────── */
.ent-slot-card {
  background: var(--ent-surface);
  border: none;
  border-radius: var(--ent-radius);
  padding: 18px 20px;
  margin-bottom: 10px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  transition:
    box-shadow 0.2s ease,
    transform 0.15s ease;
}
.ent-slot-card:hover {
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.07),
    0 0 0 1px rgba(0, 0, 0, 0.06);
}
[data-theme='dark'] .ent-slot-card {
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}
[data-theme='dark'] .ent-slot-card:hover {
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ent-slot-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ent-slot-company {
  font-size: 15px;
  font-weight: 700;
  color: var(--ent-text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.ent-slot-role {
  font-size: 13px;
  color: var(--ent-text3);
  margin-top: 3px;
  line-height: 1.3;
}
.ent-slot-time {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--ent-text2);
  padding: 8px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  line-height: 1.3;
}
[data-theme='dark'] .ent-slot-time {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.ent-slot-window {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
}
[data-theme='dark'] .ent-slot-window {
  border-top-color: rgba(255, 255, 255, 0.06);
}

/* ── Member row (analytics) ───────────────────────────────────────────────── */
.ent-member-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 80px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ent-border);
  cursor: pointer;
  transition: background 0.1s;
  font-size: 13px;
}
.ent-member-row:hover {
  background: var(--ent-surface2);
}

.ent-member-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ent-member-name {
  font-weight: 600;
  color: var(--ent-text);
}
.ent-member-email {
  font-size: 11px;
  color: var(--ent-text3);
}

.ent-member-stat {
  color: var(--ent-text2);
  font-variant-numeric: tabular-nums;
}

/* Chevron column on each expandable member row — rotates 180° when
 * the row's drilldown panel is open, so the affordance reads as a
 * disclosure widget. .expanded class is toggled by the row's click
 * handler in renderMembersTable(). */
.ent-member-chev-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ent-text3);
}
.ent-member-chev {
  transition: transform 0.18s ease, color 0.15s ease;
}
.ent-member-row.expandable:hover .ent-member-chev {
  color: var(--ent-text);
}
.ent-member-row.expandable.expanded .ent-member-chev {
  transform: rotate(180deg);
  color: var(--ent-accent, #d97757);
}

/* Drill-down panel */
.ent-drill-panel {
  background: var(--ent-surface2);
  border-bottom: 1px solid var(--ent-border);
  padding: 16px 20px;
}

.ent-drill-tabs {
  display: flex;
  gap: 0;
  /* No full-width divider under the tabs — the active tab's own
   * underline indicator is enough to show selection. Removing the
   * thin horizontal line under Personal/Legal per design feedback. */
  border-bottom: none;
  margin-bottom: 14px;
}
.ent-drill-tab {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ent-text3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: 0;
  transition:
    color 0.12s,
    border-color 0.12s;
}
.ent-drill-tab.active {
  color: #d97757;
  border-bottom-color: #d97757;
}
.ent-drill-tab:hover:not(.active) {
  color: var(--ent-text2);
}

/* ── Performance metrics mini-grid ───────────────────────────────────────── */
.ent-perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.ent-perf-item {
  background: var(--ent-surface);
  border: 1px solid var(--ent-border);
  border-radius: 8px;
  padding: 12px 14px;
}
.ent-perf-label {
  font-size: 11px;
  color: var(--ent-text3);
}

/* ── Session list item ────────────────────────────────────────────────────── */
.ent-session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--ent-border);
  font-size: 13px;
}
.ent-session-item:last-child {
  border-bottom: none;
}
.ent-session-title {
  font-weight: 600;
  color: var(--ent-text);
}
.ent-session-meta {
  font-size: 11px;
  color: var(--ent-text3);
  margin-top: 2px;
}
.ent-session-duration {
  color: var(--ent-text3);
  font-size: 12px;
  white-space: nowrap;
}

/* ── Resume list item ─────────────────────────────────────────────────────── */
.ent-resume-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ent-border);
  font-size: 13px;
}
.ent-resume-item:last-child {
  border-bottom: none;
}
.ent-resume-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ent-surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ent-text3);
}
.ent-resume-name {
  font-weight: 600;
  color: var(--ent-text);
}
.ent-resume-meta {
  font-size: 11px;
  color: var(--ent-text3);
}

/* ── Team management row ──────────────────────────────────────────────────── */
.ent-team-member-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ent-border);
}
.ent-team-member-row:last-child {
  border-bottom: none;
}
.ent-team-member-info {
  flex: 1;
  min-width: 0;
}
.ent-team-member-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.ent-team-member-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ent-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ent-team-member-email {
  font-size: 11.5px;
  color: var(--ent-text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ent-team-member-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ── Data table (sessions + resumes — matches individual studio) ──────────── */
.ent-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  table-layout: fixed;
  font-size: 13px;
  color: var(--ent-text);
}
.ent-data-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ent-text3);
  padding: 6px 12px;
}
.ent-data-table tbody tr {
  background: var(--ent-surface2);
  transition:
    background 0.15s,
    box-shadow 0.2s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}
/* Emil Kowalski: row hover with subtle lift */
.ent-data-table tbody tr:hover {
  background: var(--ent-surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}
.ent-data-table tbody td {
  padding: 11px 12px;
  vertical-align: middle;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ent-data-table tbody tr td:first-child {
  border-radius: var(--ent-radius-sm) 0 0 var(--ent-radius-sm);
}
.ent-data-table tbody tr td:last-child {
  border-radius: 0 var(--ent-radius-sm) var(--ent-radius-sm) 0;
}
.ent-data-table tbody tr.ent-row-muted {
  opacity: 0.5;
}

/* Icon buttons (matching individual studio .table-icon-btn) */
.ent-table-actions {
  display: flex;
  /* v1.0.432 — anchor at top so labeled wrappers (.action-with-label)
   * align their inner button at the same vertical position as bare
   * icon-only siblings, and labels render fully inside the row. */
  align-items: flex-start;
  gap: 6px;
}
.ent-icon-btn {
  /* Locked 28×28 square. Same enforcement pattern as
   * .session-row-share-btn — min/max + aspect-ratio + !important crush
   * every browser default + flex stretch path that could turn an icon
   * button into a vertical rectangle next to its siblings. */
  box-sizing: border-box !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  flex: 0 0 28px !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  margin: 0;
  line-height: 1 !important;
  border: none;
  border-radius: var(--ent-radius-sm);
  background: transparent;
  color: var(--ent-text3);
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
  font-size: 0;
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.15s cubic-bezier(0.23, 1, 0.32, 1);
}
.ent-icon-btn:hover {
  background: var(--ent-surface2);
  color: var(--ent-text);
  transform: scale(1.08);
}
.ent-icon-btn:active {
  transform: scale(0.9);
  transition-duration: 80ms;
}
/* Start (approved session) — solid black with bright white play icon.
 * Hardcoded hex instead of var(--ent-text)/var(--ent-bg) because those
 * tokens invert across themes, producing a grayed-out look that the user
 * reported as indistinguishable from disabled. Matches the billing page's
 * primary CTA and reads as visually loud as the red End button.
 *
 * box-sizing:border-box + explicit flex-basis prevent the 1px border from
 * inflating the 28×28 base to 30×30 (content-box default). Previously this
 * inflation made the button look vertically rectangular next to sibling
 * non-border buttons — user reported it in the My Sessions table. */
.ent-icon-btn-primary {
  box-sizing: border-box !important;
  width: 28px !important;
  height: 28px !important;
  flex: 0 0 28px !important;
  background: #0a0a0a !important;
  color: #ffffff !important;
  border: 1px solid #0a0a0a !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
}
.ent-icon-btn-primary:hover {
  background: #1c1c1c !important;
  color: #ffffff !important;
  border-color: #1c1c1c !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}
/* Enterprise Delete / Cancel — ALWAYS red, on every theme and every
 * platform (mobile, desktop web, Electron). Previous CSS only declared
 * the hover state, leaving the rest icon to inherit from .ent-icon-btn
 * base (a muted grey/text colour) which was effectively invisible on
 * the dark Electron surface. Pinned with !important so the danger
 * intent is unambiguous in every render context. */
.ent-icon-btn-danger {
  color: #dc2626 !important;
}
.ent-icon-btn-danger:hover {
  background: rgba(220, 38, 38, 0.08) !important;
  color: #b91c1c !important;
}
[data-theme='dark'] .ent-icon-btn-danger {
  color: #f87171 !important;
}
[data-theme='dark'] .ent-icon-btn-danger:hover {
  background: rgba(248, 113, 113, 0.12) !important;
  color: #fca5a5 !important;
}

/* Prompt-ready spinner: shown inside the black Start button while the backend
   prompt-agent is still generating session_prompt + quick_ref for an approved
   slot (~4-5s window). Button keeps its size, shape, and background — only
   the inner icon swaps from the play triangle to this ring spinner. When
   prompt_ready flips to true, _slotRow re-renders with the play button. */
.ent-icon-btn-primary.is-preparing {
  opacity: 1 !important;
  pointer-events: none;
  cursor: wait !important;
}
.ent-icon-btn-primary.is-preparing .ent-play-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: 0.85;
  animation: entPlaySpin 0.75s linear infinite;
}
@keyframes entPlaySpin {
  to { transform: rotate(360deg); }
}

/* Intermediate tablet breakpoint — reduce padding, hide less-important columns */
@media (max-width: 768px) {
  .ent-data-table thead th {
    padding: 5px 8px;
    font-size: 10px;
  }
  .ent-data-table tbody td {
    padding: 9px 8px;
    font-size: 12px;
  }
  /* Hide Format + Size columns on tablet */
  .ent-data-table thead th:nth-child(3),
  .ent-data-table tbody td:nth-child(3),
  .ent-data-table thead th:nth-child(4),
  .ent-data-table tbody td:nth-child(4) {
    display: none;
  }
}

/* Mobile-only inline slot layout elements — hidden on desktop, shown in mobile card */
.ent-status-mobile-inline { display: none; }
.ent-slot-date-mobile { display: none; }
.ent-slot-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ent-slot-sub-row { display: flex; align-items: center; gap: 4px; margin-top: 2px; }

/* Mobile card layout — matches individual studio .data-table transform */
@media (max-width: 600px) {
  .ent-data-table {
    display: block;
  }
  .ent-data-table thead {
    display: none;
  }
  .ent-data-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .ent-data-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 14px 16px;
    background: var(--ent-surface);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }
  .ent-data-table tbody tr.ent-row-muted {
    opacity: 0.45;
  }
  .ent-data-table tbody td {
    padding: 0;
    font-size: 13px;
    border: none;
    border-radius: 0 !important;
    display: block;
    width: auto;
  }
  .ent-data-table tbody td:first-child {
    width: 100%;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
  }
  /* Status, resume attachment, and date cols are inlined into td:1 on mobile */
  .ent-data-table tbody td.ent-td-status,
  .ent-data-table tbody td.ent-td-resume,
  .ent-data-table tbody td:nth-child(4) {
    display: none !important;
  }
  /* Actions row — full width, large buttons spread across */
  .ent-data-table tbody td:last-child {
    width: 100%;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--ent-border);
  }
  .ent-data-table tbody td:last-child .ent-table-actions {
    display: flex;
    width: 100%;
    gap: 8px;
    padding: 0 6px;
    justify-content: flex-start;
  }
  .ent-data-table tbody td:last-child .ent-icon-btn {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ent-surface2);
    color: var(--ent-text);
    border: 1px solid var(--ent-border);
    padding: 0 !important;
    transition:
      background 0.15s ease,
      transform 0.12s ease,
      box-shadow 0.15s ease;
  }
  .ent-data-table tbody td:last-child .ent-icon-btn:active {
    transform: scale(0.93);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  .ent-data-table tbody td:last-child .ent-icon-btn-primary {
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    background: var(--ent-text) !important;
    color: var(--ent-surface) !important;
    border-color: var(--ent-text) !important;
    border-radius: 12px !important;
  }
  .ent-data-table tbody td:last-child .ent-icon-btn-primary:hover {
    background: var(--ent-text2);
  }
  /* Live / Resume — solid terra orange + white play. Mirrors the consumer
   * mobile treatment so admin/member sessions tables read identically. */
  .ent-data-table tbody td:last-child .ent-icon-btn-live {
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    background: #e8834a !important;
    color: #fff !important;
    border-color: #e8834a !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(232, 131, 74, 0.28);
  }
  /* Delete / Cancel — outline-only red. No solid fill. Matches consumer
   * mobile design. The "End session" button has its own inline solid-red
   * style at render-site so it stays as an emergency stop. */
  .ent-data-table tbody td:last-child .ent-icon-btn-danger {
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    background: transparent !important;
    color: #dc2626 !important;
    border-color: rgba(220, 38, 38, 0.28) !important;
  }
  .ent-data-table tbody td:last-child .ent-icon-btn-danger:hover {
    background: rgba(220, 38, 38, 0.08) !important;
    border-color: #dc2626 !important;
  }
  /* Dark theme — same color scheme but with a slightly elevated red tint
   * so the outlined danger button reads against the dark surface. */
  [data-theme='dark'] .ent-data-table tbody td:last-child .ent-icon-btn-danger {
    color: #f87171 !important;
    border-color: rgba(248, 113, 113, 0.32) !important;
  }
  [data-theme='dark'] .ent-data-table tbody td:last-child .ent-icon-btn-danger:hover {
    background: rgba(248, 113, 113, 0.12) !important;
    border-color: #f87171 !important;
  }
  [data-theme='dark'] .ent-data-table tbody td:last-child .ent-icon-btn-live {
    background: #e8834a !important;
    color: #fff !important;
    border-color: #e8834a !important;
  }
  .ent-data-table tbody td:last-child .ent-icon-btn svg {
    width: 16px;
    height: 16px;
  }
  .ent-data-table tbody td:last-child .ent-icon-btn + .ent-icon-btn {
    margin-left: 0;
  }
  /* Show inline status badge and date on mobile — plain text, NO background */
  .ent-status-mobile-inline,
  .ent-status {
    display: inline-flex !important;
    flex-shrink: 0;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    text-transform: capitalize;
  }
  .ent-status-mobile-inline::before,
  .ent-status::before {
    display: none !important;
  }
  .ent-slot-date-mobile {
    display: inline;
  }
}

/* ── Policy section ───────────────────────────────────────────────────────── */
.ent-policy-section {
  margin-bottom: 24px;
}
.ent-policy-section h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ent-text2);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ent-number-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ent-number-input-row label {
  font-size: 13px;
  color: var(--ent-text2);
  flex: 1;
}
.ent-number-input {
  width: 80px;
  background: var(--ent-surface2);
  border: 1px solid var(--ent-border2);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ent-text);
  text-align: center;
  outline: none;
}
.ent-number-input:focus {
  border-color: #d97757;
}

/* ── Custom plan pricing card ─────────────────────────────────────────────── */
.ent-pricing-card {
  background: var(--ent-surface);
  border: 1px solid var(--ent-border);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  position: relative;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.ent-pricing-card:hover {
  border-color: #d97757;
  transform: translateY(-2px);
}
.ent-pricing-card.featured {
  border-color: #d97757;
}

.ent-pricing-plan {
  font-size: 14px;
  font-weight: 700;
  color: var(--ent-text);
  margin-bottom: 4px;
}
.ent-pricing-seats {
  font-size: 12px;
  color: var(--ent-text3);
  margin-bottom: 16px;
}
.ent-pricing-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--ent-text);
  line-height: 1;
}
.ent-pricing-period {
  font-size: 13px;
  color: var(--ent-text3);
  margin-bottom: 20px;
}
.ent-pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 20px;
}
.ent-pricing-features li {
  font-size: 13px;
  color: var(--ent-text2);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ent-pricing-features li::before {
  content: '✓';
  color: var(--ent-success);
  font-weight: 700;
}

/* ── Inquiry form ─────────────────────────────────────────────────────────── */
.ent-inquiry-form-wrap {
  max-width: 520px;
  margin: 0 auto;
}

/* ── Color swatch picker ──────────────────────────────────────────────────── */
.ent-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ent-color-preview {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--ent-border);
  flex-shrink: 0;
}

/* ── Cancellation — Danger Zone ───────────────────────────────────────────── */
.ent-danger-zone {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--ent-border);
}
.ent-danger-zone-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ent-text3);
  margin: 0 0 8px;
}
.ent-danger-zone p {
  font-size: 12px;
  color: var(--ent-text3);
  margin: 0 0 12px;
}
.ent-btn--ghost-danger {
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.ent-btn--ghost-danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

/* ── Cancellation — Post-cancel banner ────────────────────────────────────── */
.ent-cancel-banner strong {
  color: #f59e0b;
}
.ent-cancel-pill {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
}

/* ── Cancellation — Retention offer card ──────────────────────────────────── */
.ent-retention-card {
  background: rgba(217, 119, 87, 0.07);
  border: 1px solid rgba(217, 119, 87, 0.2);
  border-left: 3px solid #d97757;
  border-radius: 10px;
  padding: 20px;
  margin: 16px 0;
}
.ent-retention-card .ent-retention-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d97757;
  margin: 0 0 6px;
}
.ent-retention-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ent-text);
  margin: 0 0 6px;
}
.ent-retention-card p {
  font-size: 12px;
  color: var(--ent-text3);
  margin: 0 0 14px;
}
.ent-btn--filled-primary {
  display: block;
  width: 100%;
  background: #d97757;
  color: #fff;
  border: none;
  padding: 11px 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.ent-btn--filled-primary:hover {
  opacity: 0.88;
}

/* ── Cancellation — Cancel modal multi-step ───────────────────────────────── */
.ent-cancel-step {
  display: none;
}
.ent-cancel-step.active {
  display: block;
}

.ent-plan-summary-card {
  background: var(--ent-surface2);
  border: 1px solid var(--ent-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.ent-plan-summary-card .ent-plan-name {
  font-size: 13px;
  font-weight: 700;
  color: #d97757;
  margin: 0 0 4px;
}
.ent-plan-summary-card .ent-plan-meta {
  font-size: 12px;
  color: var(--ent-text3);
}

.ent-period-end-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ent-text2);
  margin-bottom: 16px;
}

.ent-btn--confirm-cancel {
  display: block;
  width: 100%;
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 13px 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 12px;
}
.ent-btn--confirm-cancel:hover {
  background: #dc2626;
}
.ent-btn--confirm-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .ent-member-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
  }
  .ent-member-row.ent-member-header {
    display: none;
  }
  .ent-member-identity {
    flex: 1;
    min-width: 0;
  }
  .ent-member-name {
    font-size: 14px;
  }
  .ent-member-stat {
    font-size: 14px;
    font-weight: 700;
  }
  .ent-member-stat::after {
    content: ' sessions';
    font-size: 10px;
    font-weight: 400;
    color: var(--ent-text3);
  }
}

/* ── Heatmap styles (copied from shared components.css, adapted for enterprise theme) ── */
.heatmap-section {
  background: var(--ent-surface);
  border: 1px solid var(--ent-border);
  border-radius: 12px;
  padding: 16px 20px;
}
.heatmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.heatmap-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ent-text);
  margin: 0;
}
.heatmap-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.heatmap-grid-wrap {
  display: flex;
  gap: 4px;
  min-width: fit-content;
}
.heatmap-day-labels {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 16px;
  margin-right: 4px;
  min-width: 26px;
}
.heatmap-day-labels span {
  font-size: 10px;
  color: var(--ent-text3);
  height: 11px;
  line-height: 11px;
}
.heatmap-grid {
  display: flex;
  gap: 3px;
}
.heatmap-week {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.heatmap-month-label {
  font-size: 10px;
  color: var(--ent-text3);
  height: 16px;
  line-height: 16px;
  text-align: left;
  white-space: nowrap;
  min-width: 11px;
}
.heatmap-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.1s;
}
.heatmap-cell.level-0 {
  background: var(--ent-surface2, #f5f4f1);
}
.heatmap-cell.level-1 {
  background: rgba(217, 119, 87, 0.2);
}
.heatmap-cell.level-2 {
  background: rgba(217, 119, 87, 0.4);
}
.heatmap-cell.level-3 {
  background: rgba(217, 119, 87, 0.6);
}
.heatmap-cell.level-4 {
  background: rgba(217, 119, 87, 0.85);
}
.heatmap-cell[data-count]:hover {
  outline: 1.5px solid var(--ent-text3);
  outline-offset: -0.5px;
}
[data-theme='dark'] .heatmap-cell.level-0 {
  background: rgba(255, 255, 255, 0.06);
}
[data-theme='dark'] .heatmap-cell[data-count]:hover {
  outline-color: rgba(255, 255, 255, 0.3);
}
.heatmap-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 3px;
}
.heatmap-legend-label {
  font-size: 10px;
  color: var(--ent-text3);
  margin: 0 2px;
}
.heatmap-legend .heatmap-cell {
  width: 10px;
  height: 10px;
  cursor: default;
}
.heatmap-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ent-border);
}
.heatmap-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.heatmap-stat-val {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--ent-text);
  letter-spacing: -0.02em;
}
.heatmap-stat-lbl {
  font-size: 11px;
  color: var(--ent-text3);
  font-weight: 500;
}
.heatmap-tooltip {
  position: fixed;
  background: var(--ent-text);
  color: var(--ent-bg);
  font-size: 12.5px;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.heatmap-tooltip.visible {
  opacity: 1;
}

/* ── ApexCharts tooltip overflow fix ─────────────────────────────────────── */
.apexcharts-canvas {
  overflow: visible !important;
}
.apexcharts-canvas svg {
  overflow: visible !important;
}
.apexcharts-inner {
  overflow: visible !important;
}
.apexcharts-xaxistooltip {
  z-index: 10;
}
#spd-apex-chart {
  overflow: visible;
  padding-bottom: 8px;
}

/* ── Month-based heatmap grid ────────────────────────────────────────────── */
.heatmap-grid-months {
  display: flex;
  gap: 0;
}
.heatmap-month-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 4px;
}
.heatmap-month-block .heatmap-month-label {
  text-align: center;
  width: 100%;
  margin-bottom: 4px;
}
.heatmap-month-weeks {
  display: flex;
  gap: 2px;
}
