/* PROTOTIP · App ↔ B2B integration v1 — only the new pieces, on the app's own
   tokens (Barlow, --exp-ink, --exp-green, --exp-border, --exp-muted, 9–14 px
   radius, white cards). Everything else on the page is the existing Dev CSS. */
:root { --pi-ink: var(--exp-ink, var(--j-rail)); --pi-green: var(--exp-green, var(--j-accent)); --pi-line: var(--exp-border, var(--j-line)); --pi-muted: var(--exp-muted, #63766d);
  --pi-wait-bg: #fff1cf; --pi-wait: #7a4b06; --pi-prop-bg: #e4eefc; --pi-prop: #1d4f94; --pi-ok-bg: #c6f9df; --pi-ok: #006d3e; --pi-bad-bg: #fde4e1; --pi-bad: #9b2c1f; --pi-off-bg: #eef2ef; --pi-off: #4b5a52; }

/* ---------- status pill: text + shape, never colour alone */
.pi-status { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 'Inter',system-ui,sans-serif; padding: 5px 9px; border-radius:3px; white-space: nowrap; }
.pi-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pi-status.wait { background: var(--pi-wait-bg); color: var(--pi-wait); } .pi-status.wait::before { background: transparent; border: 2px solid currentColor; width: 6px; height: 6px; }
.pi-status.prop { background: var(--pi-prop-bg); color: var(--pi-prop); } .pi-status.prop::before { border-radius:3px; transform: rotate(45deg); }
.pi-status.ok { background: var(--pi-ok-bg); color: var(--pi-ok); } .pi-status.ok::before { content: '✓'; background: none; width: auto; height: auto; font-size: 11px; }
.pi-status.bad { background: var(--pi-bad-bg); color: var(--pi-bad); } .pi-status.bad::before { content: '×'; background: none; width: auto; height: auto; font-size: 14px; line-height: 8px; }
.pi-status.off { background: var(--pi-off-bg); color: var(--pi-off); } .pi-status.off::before { border-radius:3px; height: 2px; }
.pi-status.decl { background: var(--j-surface); color: #805009; border: 1px dashed #c99a3c; } .pi-status.decl::before { background: transparent; border: 2px dashed currentColor; width: 5px; height: 5px; }

/* ---------- venue detail: compact booking block (inside the existing venue card) */
.pi-book { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 18px; align-items: center; border: 1px solid var(--pi-line); background: #f6faf7; border-radius:6px; padding: 14px 16px; margin: 14px 0 18px; }
.pi-book p { margin: 0; font-size: 14px; color: var(--pi-muted); }
.pi-book strong { display: block; color: var(--pi-ink); font-size: 16px; margin-bottom: 2px; }
.pi-book .exp-actions { justify-content: flex-end; }
.pi-book .exp-button { min-height: 42px; padding: 9px 16px; font-size: 14px; }
.pi-partner { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #006d3e; margin-bottom: 4px; }
@media (max-width: 700px) { .pi-book { grid-template-columns: 1fr; } .pi-book .exp-actions { justify-content: stretch; } .pi-book .exp-button { flex: 1; } }

/* ---------- compact dialog (native <dialog>, follows design.css / communications-v2.css dialog) */
dialog.pi-dialog { width: min(460px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #d9e8f4; border-radius:6px; color: var(--pi-ink); font-family: 'Inter',system-ui,sans-serif; overflow: hidden; }
dialog.pi-dialog[open] { display: flex; flex-direction: column; }
dialog.pi-dialog::backdrop { background: #14161966; }
.pi-dh { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--pi-line); }
.pi-dh h2 { font-size: 21px; line-height: 1.15; margin: 0; letter-spacing: -.02em; font-style: italic; font-weight: 800; }
.pi-dh p { margin: 3px 0 0; font-size: 13px; color: var(--pi-muted); }
.pi-x { margin-left: auto; width: 36px; height: 36px; border-radius:6px; border: 1px solid var(--pi-line); background: var(--j-surface); font-size: 20px; line-height: 1; cursor: pointer; flex: none; color: var(--pi-ink); }
.pi-db { padding: 14px 20px; overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pi-db > * { min-width: 0; }
.pi-df { padding: 12px 20px 18px; border-top: 1px solid var(--pi-line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.pi-df .exp-button { min-height: 44px; }
.pi-field > span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.pi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pi-chip { border: 1px solid var(--pi-line); background: var(--j-surface); color: var(--pi-ink); border-radius:3px; padding: 7px 11px; font: 500 14px/1.1 'Inter',system-ui,sans-serif; cursor: pointer; min-height: 38px; }
.pi-chip small { display: block; font-weight: 500; font-size: 11px; color: var(--pi-muted); margin-top: 2px; }
.pi-chip[aria-pressed="true"] { border-color: #00b864; background: #e3fbef; box-shadow: inset 0 0 0 1px #00b864; }
.pi-chip:disabled { cursor: not-allowed; color: #93a49b; background: repeating-linear-gradient(135deg, #f4f6f4 0 6px, #eef1ee 6px 12px); text-decoration: line-through; }
.pi-days { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.pi-days .pi-chip { padding: 6px 8px; min-width: 52px; text-align: center; flex: none; }
.pi-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.pi-legend { display: flex; gap: 12px; font-size: 12px; color: var(--pi-muted); margin-top: 6px; flex-wrap: wrap; }
.pi-sum { border-radius:6px; background: #f6faf7; border: 1px solid var(--pi-line); padding: 12px 14px; display: grid; gap: 6px; font-size: 14px; }
.pi-sum .kv { display: flex; justify-content: space-between; gap: 12px; }
.pi-sum .kv span:first-child { color: var(--pi-muted); }
.pi-sum .kv strong { text-align: right; }
.pi-note { font-size: 13px; color: var(--pi-muted); margin: 0; }
.pi-alert { border-radius:6px; padding: 10px 12px; font-size: 14px; border: 1px solid; display: grid; gap: 2px; }
.pi-alert strong { font-weight: 700; }
.pi-alert.warn { background: #fff8e6; border-color: #f0d79a; color: #5d3d06; }
.pi-alert.bad { background: #fff1ef; border-color: #f2b8b0; color: #7b2318; }
.pi-alert.ok { background: #eafcf2; border-color: #9fe4c0; color: #0b4d31; }
.pi-alert.info { background: #eef4fc; border-color: #c4d7f1; color: #183f73; }
.pi-alert .exp-actions { margin-top: 8px; }
@media (max-width: 560px) {
  dialog.pi-dialog { width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius:6px; }
  .pi-df { position: sticky; bottom: 0; background: var(--j-surface); }
  .pi-df .exp-button { flex: 1; }
}

/* ---------- Rezervările mele (inside the existing profile hub page) */
.pi-res-list { display: grid; gap: 12px; margin: 10px 0 22px; }
.pi-res-group { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pi-muted); margin: 18px 0 2px; }
.pi-res { border: 1px solid var(--pi-line); background: var(--j-surface); border-radius:6px; padding: 16px 18px; display: grid; gap: 10px; }
.pi-res.focus { box-shadow: 0 0 0 3px #00e68055; }
.pi-res-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pi-res-top h3 { margin: 0; font-size: 19px; font-style: italic; font-weight: 800; }
.pi-res .pi-meta { margin: 0; color: var(--pi-muted); font-size: 14px; }
.pi-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pi-compare > div { border-radius:6px; padding: 10px 12px; border: 1px solid var(--pi-line); font-size: 14px; }
.pi-compare small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pi-muted); margin-bottom: 3px; }
.pi-compare .was { background: #f7f8f7; } .pi-compare .was b { text-decoration: line-through; text-decoration-color: #9aa79f; color: #5e6c64; }
.pi-compare .new { background: var(--pi-prop-bg); border-color: #b9cff0; } .pi-compare .new small { color: var(--pi-prop); }
.pi-res .exp-actions { gap: 8px; }
.pi-res .exp-button { min-height: 42px; padding: 9px 16px; font-size: 14px; }
.pi-res .exp-button.danger { background: var(--j-surface); border-color: #e5b0a8; color: #9b2c1f; }
.pi-link { background: none; border: 0; padding: 0; color: #087046; font: 500 14px 'Inter',system-ui,sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pi-skel { height: 96px; border-radius:6px; background: linear-gradient(90deg, #eef2ef 0, #f7f9f7 40%, #eef2ef 80%); background-size: 200% 100%; animation: pi-sh 1.2s linear infinite; }
@keyframes pi-sh { to { background-position: -200% 0; } }
@media (max-width: 560px) { .pi-compare { grid-template-columns: 1fr; } .pi-res .exp-button { flex: 1; } }

/* ---------- Game Hub: compact „Rezervarea terenului” (inside the existing venue card) */
.pi-hubres { border-top: 1px solid var(--pi-line); margin-top: 12px; padding-top: 12px; display: grid; gap: 8px; }
.pi-hubres h4 { margin: 0; font-size: 15px; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-style: italic; font-weight: 800; }
.pi-hubres p { margin: 0; font-size: 14px; }
.pi-hubres .pi-note { font-size: 12px; }
.pi-hub-banner { margin: 0 0 14px; }
.md-manage-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pi-cancel-game { background: var(--j-surface); border: 1px solid #e5b0a8; color: #9b2c1f; border-radius:6px; min-height: 40px; padding: 8px 14px; font: 500 14px 'Inter',system-ui,sans-serif; cursor: pointer; }
.pi-radio { display: grid; gap: 8px; }
.pi-radio label { display: grid; grid-template-columns: 20px 1fr; gap: 4px 10px; border: 1px solid var(--pi-line); border-radius:3px; padding: 12px; cursor: pointer; font-size: 14px; }
.pi-radio label:has(input:checked) { border-color: #00b864; box-shadow: inset 0 0 0 1px #00b864; background: #f2fdf7; }
.pi-radio input { margin: 3px 0 0; accent-color: #00a65a; }
.pi-radio small { grid-column: 2; color: var(--pi-muted); font-size: 13px; }

/* ---------- create game from reservation: locked fields */
.pi-locked { border: 1px solid #9fe4c0; background: #eafcf2; color: #0b4d31; border-radius:6px; padding: 12px 14px; display: grid; gap: 4px; font-size: 14px; margin: 4px 0 14px; }
.pi-locked strong { font-size: 15px; }
.pi-locked .pi-note { color: #2d6047; }
.create-game-v2 [data-pi-lock] { opacity: .75; cursor: not-allowed; }
.pi-invite { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--pi-line); border-radius:6px; padding: 12px; margin-top: 8px; font-size: 14px; cursor: pointer; }
.pi-invite input { margin-top: 3px; accent-color: #00a65a; }
.pi-invite small { display: block; color: var(--pi-muted); }

/* ---------- shell: staff link to the separate B2B workspace */
.exp-app-sidebar .pi-manage { border-top: 0 !important; margin-top: auto; }
.exp-app-sidebar .pi-manage + .exp-sidebar-bottom { margin-top: 6px; }
.pi-ext { font-size: 12px; opacity: .8; }
.pi-out { padding: 40px 24px; text-align: center; color: var(--pi-muted); }

/* ---------- prototype-only: a toast for things outside the prototype */
.pi-toast[hidden] { display: none !important; }
.pi-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--j-rail) !important; color: #F2EEE8 !important; border: 0 !important; border-radius:6px; padding: 10px 14px; font: 500 14px 'Inter',system-ui,sans-serif; z-index: 3000; box-shadow: 0 8px 24px #16181B4D; max-width: calc(100% - 32px); --j-ink: #F2EEE8; --j-ink-2: #F3F6F5; --j-muted: #F3F6F5; --j-link: #F2EEE8; --j-accent: #E2DCD1; --j-on-accent: #0B2320; }

/* ---------- v2: booking state summary in Game Hub, draft badge, form link */
.pi-hist { font-size: 13px; color: var(--pi-muted); }
.pi-hist summary { cursor: pointer; font-weight: 500; }
.pi-hist ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.md-hero-badges .pi-draft-badge { background: #fff1cf; color: #7a4b06; border-color: #f0d79a; }
.pi-book-from-form { display: block; margin: 10px 0 0 auto; }
.pi-hubres .pi-compare > div { padding: 8px 10px; }
.pi-partner-note strong { display: inline; }

.cg-invite-selected .pi-invite { display: flex !important; width: 100%; text-align: left; }
.cg-invite-selected .pi-invite input { width: 18px !important; height: 18px !important; min-width: 0; flex: none; margin: 3px 0 0; appearance: auto; }
@media (max-width: 560px) { .create-game-v2 .cg-controls { flex-wrap: wrap; gap: 10px; } .create-game-v2 .cg-controls .pi-draft { order: 3; flex: 1 1 100%; } }

/* ---------- v2.3 · Inline request in Game Hub (variant C: simple path only) */
.pi-req { display: grid; gap: 10px; border: 1px solid var(--pi-line); border-radius:6px; padding: 12px; background: #fbfdfb; }
.pi-req-head { display: grid; gap: 2px; }
.pi-req-head strong { font-size: 15px; }
.pi-req-head small { color: var(--pi-muted); font-size: 13px; }
.pi-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.pi-pitch, .pi-slot { border: 1px solid var(--pi-line); background: var(--j-surface); border-radius:6px; min-height: 40px; padding: 6px 12px; font: 500 14px 'Inter',system-ui,sans-serif; color: inherit; cursor: pointer; }
.pi-pitch[aria-pressed="true"], .pi-slot[aria-pressed="true"] { border-color: #00b864; box-shadow: inset 0 0 0 1px #00b864; background: #f2fdf7; color: #0b4d31; }
.pi-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.pi-slot { display: grid; justify-items: center; line-height: 1.1; }
.pi-slot small { font: 500 11px 'Inter',system-ui,sans-serif; color: var(--pi-muted); }
.pi-slot.want { border-style: dashed; }
.pi-pitch:focus-visible, .pi-slot:focus-visible { outline: 2px solid #087046; outline-offset: 2px; }
.pi-req-sum { display: grid; gap: 2px; font-size: 13px; color: var(--pi-muted); }
.pi-req-sum b { font-size: 14px; color: var(--pi-ink); }
.pi-req-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.pi-req-actions .page-link { font-size: 13px; }
@media (max-width: 560px) { .pi-req-actions .exp-button { width: 100%; justify-content: center; } }
