/* guest-care-module.css — directors+ console (guest directory, sends,
   activity, rewards, settings). Token-driven (var(--rr-*)) per repo
   convention, same family as hiring-module.css. */

.gc-section { padding: 4px 2px 40px; }

/* ── passcode gate ─────────────────────────────────────────────────── */
.gc-gate-wrap { display: flex; align-items: center; justify-content: center; min-height: 50vh; }
.gc-gate-card {
  width: min(360px, 92vw); text-align: center; background: var(--rr-panel); border: 1px solid var(--rr-border);
  border-radius: 20px; padding: 34px 26px; box-shadow: 0 0 40px rgba(242,57,247,0.14);
}
.gc-gate-icon { font-size: 40px; margin-bottom: 10px; }
.gc-gate-title { font-size: 16.5px; font-weight: 800; margin-bottom: 16px; }
.gc-gate-input {
  width: 100%; background: rgba(0,0,0,0.3); border: 2px solid var(--rr-border); border-radius: 12px;
  padding: 14px; color: var(--rr-text); font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 18px; letter-spacing: 3px; text-align: center; text-transform: uppercase; margin-bottom: 12px;
}
.gc-gate-input:focus { outline: none; border-color: var(--rr-cyan); }
.gc-gate-error { color: var(--rr-danger); font-size: 12.5px; font-weight: 600; margin: -6px 0 12px; }
.gc-gate-hint { margin-top: 14px; font-size: 11.5px; color: var(--rr-text-muted); }

/* ── tabs ──────────────────────────────────────────────────────────── */
.gc-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.gc-tab { background: transparent; border: 1px solid var(--rr-border); color: var(--rr-text-muted); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-family: inherit; cursor: pointer; }
.gc-tab-active { background: rgba(242,57,247,0.14); border-color: var(--rr-pink); color: var(--rr-text); }

/* ── guests: search + list ────────────────────────────────────────── */
.gc-search-row { display: flex; gap: 10px; margin-bottom: 14px; }
.gc-search-input { flex: 1; min-width: 0; background: rgba(0,0,0,0.3); border: 1px solid var(--rr-border); border-radius: 12px; padding: 12px 14px; color: var(--rr-text); font-family: inherit; font-size: 15px; }
.gc-search-input:focus { outline: none; border-color: var(--rr-cyan); }
.gc-empty-cta { display: flex; justify-content: center; margin-top: 10px; }

.gc-guest-list { display: flex; flex-direction: column; gap: 8px; }
.gc-guest-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--rr-panel); border: 1px solid var(--rr-border); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.gc-guest-row-main { min-width: 0; }
.gc-guest-row-name { font-size: 14.5px; font-weight: 600; }
.gc-guest-row-meta { font-size: 12px; color: var(--rr-text-muted); margin-top: 3px; }

/* ── guest profile ─────────────────────────────────────────────────── */
.gc-back { background: none; border: none; color: var(--rr-cyan); font-family: inherit; font-size: 13px; cursor: pointer; padding: 0 0 12px; display: block; }
.gc-profile-head { margin-bottom: 14px; }
.gc-profile-name { font-size: 20px; font-weight: 800; }
.gc-profile-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.gc-profile-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; margin-bottom: 22px; }
@media (max-width: 860px) { .gc-profile-grid { grid-template-columns: 1fr; } }
.gc-profile-actions { display: flex; flex-direction: column; gap: 10px; }
.gc-profile-timeline { margin-top: 6px; }

.gc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.gc-form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--rr-text-muted); font-weight: 600; }
.gc-form-grid input, .gc-form-grid select, .gc-form-grid textarea {
  background: rgba(0,0,0,0.3); border: 1px solid var(--rr-border); border-radius: 10px; padding: 9px 11px;
  color: var(--rr-text); font-family: inherit; font-size: 14px;
}
.gc-form-grid input:focus, .gc-form-grid select:focus, .gc-form-grid textarea:focus { outline: none; border-color: var(--rr-cyan); }
.gc-form-grid input:disabled { opacity: 0.55; }
.gc-form-notes { grid-column: 1 / -1; }
.gc-form-notes textarea { min-height: 64px; resize: vertical; }
.gc-form-check { flex-direction: row !important; align-items: center; gap: 8px !important; grid-column: 1 / -1; }

/* ── timeline ─────────────────────────────────────────────────────── */
.gc-timeline { display: flex; flex-direction: column; gap: 8px; }
.gc-tl-row { display: flex; align-items: flex-start; gap: 12px; background: var(--rr-panel); border: 1px solid var(--rr-border); border-radius: 12px; padding: 12px 14px; }
.gc-tl-icon { font-size: 18px; line-height: 1.3; }
.gc-tl-main { flex: 1; min-width: 0; }
.gc-tl-title { font-size: 14px; font-weight: 700; }
.gc-tl-notes { font-size: 13px; color: var(--rr-text-muted); margin-top: 3px; white-space: pre-wrap; }
.gc-tl-meta { font-size: 11.5px; color: var(--rr-text-dim); margin-top: 4px; }

/* ── modal (portaled to <body> — see gcPortalModal()) ────────────────
   Same fix as hiring-module.js's hiringPortalModal(): styles.css's
   #view-container > * entry animation retains a transform, making the
   view root a CSS containing block, so a fixed modal inside it would
   render pinned to the section instead of the viewport. ─────────────── */
.gc-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; }
.gc-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 201; width: min(560px, 94vw); max-height: 88vh; overflow-y: auto; background: var(--rr-violet-2); border: 1px solid var(--rr-border); border-radius: 16px; padding: 22px; box-shadow: 0 24px 80px rgba(0,0,0,0.55); }
.gc-modal--wide { width: min(760px, 96vw); }
.gc-modal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.gc-modal-h h3 { font-size: 18px; }
.gc-modal-x { cursor: pointer; color: var(--rr-text-muted); font-size: 16px; }
.gc-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.gc-modal label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--rr-text-muted); font-weight: 600; margin-bottom: 12px; }
.gc-modal input, .gc-modal select, .gc-modal textarea {
  background: rgba(0,0,0,0.3); border: 1px solid var(--rr-border); border-radius: 10px; padding: 9px 11px;
  color: var(--rr-text); font-family: inherit; font-size: 14px;
}
.gc-modal input:focus, .gc-modal select:focus, .gc-modal textarea:focus { outline: none; border-color: var(--rr-cyan); }
.gc-modal textarea { min-height: 64px; resize: vertical; }

/* ── send-a-reward modal specifics ───────────────────────────────── */
.gc-send-guest { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.gc-send-warn { background: rgba(255,180,64,0.12); border: 1px solid rgba(255,180,64,0.4); color: var(--rr-warn); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }
.gc-send-warn-chip { margin-bottom: 10px; }
.gc-reason-seg { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.gc-reason-btn { flex: 1; min-width: 90px; background: transparent; border: 1px solid var(--rr-border); color: var(--rr-text-muted); border-radius: 10px; padding: 9px 10px; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.gc-reason-btn--active { background: rgba(242,57,247,0.16); border-color: var(--rr-pink); color: var(--rr-text); }
.gc-preview-label { font-size: 11.5px; color: var(--rr-text-dim); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 6px; }
.gc-preview-body { background: rgba(0,0,0,0.25); border: 1px dashed var(--rr-border); border-radius: 10px; padding: 12px; font-size: 13px; line-height: 1.5; color: var(--rr-text-muted); margin-bottom: 4px; white-space: pre-wrap; }

.gc-send-ok { font-size: 14.5px; font-weight: 600; }
.gc-send-mock-banner { background: rgba(255,180,64,0.12); border: 1px solid rgba(255,180,64,0.4); color: var(--rr-warn); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.gc-send-link { font-size: 13px; word-break: break-all; margin-bottom: 10px; }
.gc-send-link a { color: var(--rr-cyan); }
.gc-send-qr { background: #fff; border-radius: 12px; padding: 12px; width: 140px; height: 140px; margin-top: 12px; }
.gc-send-qr svg { width: 100%; height: 100%; display: block; }
.gc-send-optout { font-size: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.gc-send-error { color: var(--rr-danger); font-size: 14px; font-weight: 600; }

/* ── rewards tab ──────────────────────────────────────────────────── */
.gc-rewards-head { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.gc-reward-list { display: flex; flex-direction: column; gap: 8px; }
.gc-reward-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--rr-panel); border: 1px solid var(--rr-border); border-radius: 12px; padding: 12px 14px; }
.gc-reward-row--inactive { opacity: 0.55; }
.gc-reward-row-main { cursor: pointer; min-width: 0; }
.gc-reward-row-name { font-size: 14.5px; font-weight: 700; }
.gc-reward-row-desc { font-size: 12.5px; color: var(--rr-text-muted); margin-top: 3px; }
.gc-reward-row-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ── settings tab ─────────────────────────────────────────────────── */
.gc-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 860px) { .gc-settings-grid { grid-template-columns: 1fr; } }
.gc-passcode-plain { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 800; letter-spacing: 2px; color: var(--rr-cyan); margin: 6px 0 10px; }
.gc-passcode-note { font-size: 12.5px; color: var(--rr-text-muted); margin: 8px 0 12px; line-height: 1.5; }
.gc-sms-status { font-size: 13px; line-height: 1.55; padding: 10px 12px; border-radius: 10px; }
.gc-sms-status--live { background: rgba(70,227,155,0.12); border: 1px solid var(--rr-ok); color: var(--rr-ok); }
.gc-sms-status--mock { background: rgba(255,180,64,0.1); border: 1px solid rgba(255,180,64,0.4); color: var(--rr-warn); }
.gc-backfill-result { font-size: 12.5px; color: var(--rr-text); background: rgba(0,0,0,0.2); border-radius: 8px; padding: 8px 10px; margin: 4px 0 12px; }

.gc-csv-table { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; margin-bottom: 8px; }
.gc-csv-row { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr auto; gap: 10px; align-items: center; background: rgba(0,0,0,0.2); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }
.gc-csv-row--dup { opacity: 0.5; }

/* ── activity tab ─────────────────────────────────────────────────── */
.gc-stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.gc-activity-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.gc-activity-filters select { background: rgba(0,0,0,0.3); border: 1px solid var(--rr-border); border-radius: 10px; padding: 8px 10px; color: var(--rr-text); font-family: inherit; font-size: 12.5px; }
.gc-activity-table { display: flex; flex-direction: column; gap: 6px; }
.gc-activity-row { display: grid; grid-template-columns: 90px 1.2fr 1.2fr 1fr 1fr 1fr auto; gap: 10px; align-items: center; background: var(--rr-panel); border: 1px solid var(--rr-border); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.gc-activity-cell--when { color: var(--rr-text-muted); }
@media (max-width: 900px) {
  .gc-activity-row { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
}

/* 2026-08-17 QA sweep additions */
.gc-gate-owner { margin-top: 14px; }
.gc-tl-code { font-size: 12.5px; color: var(--rr-text-muted); margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gc-tl-code b { color: var(--rr-text); font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 1px; }
.gc-tl-code a { color: var(--rr-cyan); }
.gc-tl-code .rr-btn--sm { padding: 3px 9px; font-size: 11.5px; }

/* ── send promo tab ───────────────────────────────────────────────── */
.gc-promo { display: flex; flex-direction: column; gap: 14px; }
.gc-promo-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 900px) { .gc-promo-grid { grid-template-columns: 1fr; } }
.gc-promo-col { display: flex; flex-direction: column; gap: 14px; }
.gc-promo-aud, .gc-promo-scope { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 560px) { .gc-promo-aud { grid-template-columns: 1fr; } }
.gc-promo-aud-btn { text-align: left; background: rgba(0,0,0,0.25); border: 1px solid var(--rr-border); border-radius: 12px; padding: 12px; color: var(--rr-text); font-family: inherit; cursor: pointer; }
.gc-promo-aud-btn--active { border-color: var(--rr-pink); background: rgba(242,57,247,0.12); }
.gc-promo-aud-n { font-size: 22px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.gc-promo-aud-l { font-size: 13px; font-weight: 700; margin-top: 2px; }
.gc-promo-aud-h { font-size: 11.5px; color: var(--rr-text-muted); margin-top: 2px; }
.gc-promo-label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--rr-text-muted); font-weight: 600; margin-bottom: 12px; }
.gc-promo-opt { font-weight: 500; }
.gc-promo-input, .gc-promo-body { background: rgba(0,0,0,0.3); border: 1px solid var(--rr-border); border-radius: 10px; padding: 10px 12px; color: var(--rr-text); font-family: inherit; font-size: 14.5px; width: 100%; }
.gc-promo-input:focus, .gc-promo-body:focus { outline: none; border-color: var(--rr-cyan); }
.gc-promo-body { resize: vertical; min-height: 96px; line-height: 1.45; }
.gc-promo-hint { font-size: 11.5px; color: var(--rr-text-muted); line-height: 1.45; }
.gc-promo-bubble { background: rgba(88,249,244,0.10); border: 1px solid rgba(88,249,244,0.35); border-radius: 16px 16px 16px 4px; padding: 12px 14px; font-size: 14.5px; line-height: 1.45; word-break: break-word; min-height: 46px; transition: opacity .15s; }
.gc-promo-bubble--busy { opacity: 0.55; }
.gc-promo-bubble-empty { color: var(--rr-text-muted); }
.gc-promo-seg { font-size: 11.5px; color: var(--rr-text-muted); margin-top: 8px; font-family: 'JetBrains Mono', monospace; }
.gc-promo-segwarn { margin-top: 8px; font-size: 12px; color: var(--rr-warn, #e9b949); font-weight: 600; }
.gc-promo-test-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.gc-promo-test-row .gc-promo-input { flex: 1; min-width: 0; }
.gc-promo-actions { display: flex; justify-content: flex-end; }
.gc-promo--confirm, .gc-promo--progress, .gc-promo--scheduled { max-width: 640px; }
.gc-promo-confirm-n { font-size: 34px; font-weight: 800; font-family: 'JetBrains Mono', monospace; margin-bottom: 12px; }
.gc-promo-confirm-n span { font-size: 14px; font-weight: 600; font-family: inherit; color: var(--rr-text-muted); margin-left: 6px; }
.gc-promo-bar { height: 10px; background: rgba(0,0,0,0.35); border: 1px solid var(--rr-border); border-radius: 999px; overflow: hidden; margin: 6px 0 10px; }
.gc-promo-bar-fill { height: 100%; background: linear-gradient(90deg, var(--rr-pink), var(--rr-cyan)); transition: width .3s; }
.gc-promo-progress-n { font-size: 24px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.gc-promo-progress-n span { font-size: 13px; color: var(--rr-text-muted); margin-left: 8px; }
.gc-promo-stats { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.gc-promo-history { margin-top: 6px; }
.gc-promo-hist-row { display: flex; justify-content: space-between; gap: 12px; background: var(--rr-panel); border: 1px solid var(--rr-border); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.gc-promo-hist-main { min-width: 0; }
.gc-promo-hist-name { font-size: 14px; font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gc-promo-hist-body { font-size: 12.5px; color: var(--rr-text-muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gc-promo-hist-meta { font-size: 12px; color: var(--rr-text-muted); text-align: right; white-space: nowrap; }

/* Marketing → Loyalty SMS (2026-10-19): scope picker (store / corporate-wide)
   reuses the audience button look; the corporate button gets a warning tint
   so "every store" never reads like just another store. */
.gc-promo-scope .gc-promo-aud-btn--active:last-child { border-color: var(--rr-warn, #e9b949); background: rgba(233,185,73,0.12); }
.gc-promo-confirm-scope { margin: 4px 0 10px; }

/* Reward-attached promos (2026-10-19) */
.gc-promo-reward-opts { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 8px 0 4px; }
.gc-promo-check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.gc-promo-label--inline { display: flex; align-items: center; gap: 8px; }
.gc-promo-input--sm { width: 72px; }
.gc-promo-hint code { font-family: var(--rr-mono, monospace); background: rgba(255,255,255,0.08); padding: 0 4px; border-radius: 4px; }

/* ── Loyalty SMS → flyer picker + QR-slot editor (2026-10-19) ───────── */
.gc-flyer-head { font-size: 12.5px; color: var(--rr-text-muted); font-weight: 600; margin: 2px 0 6px; }
.gc-flyer-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.gc-flyer-chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.25); border: 1px solid var(--rr-border); border-radius: 12px; padding: 6px 12px 6px 6px; color: var(--rr-text); cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 600; max-width: 100%; text-align: left; }
.gc-flyer-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.gc-flyer-chip--active { border-color: var(--rr-pink); background: rgba(242,57,247,0.12); }
.gc-flyer-chip--text, .gc-flyer-chip--upload { padding: 10px 12px; }
.gc-flyer-chip--upload { border-style: dashed; }
.gc-flyer-chip img { width: 36px; height: 48px; object-fit: cover; border-radius: 6px; background: #fff; flex: none; }
.gc-flyer-chip input[type=file] { display: none; }
.gc-flyer-editor { margin: 4px 0 12px; }
.gc-flyer-stage { position: relative; width: 100%; max-width: 380px; margin: 0 auto 8px; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--rr-border); user-select: none; -webkit-user-select: none; }
.gc-flyer-stage > img { display: block; width: 100%; height: auto; pointer-events: none; }
.gc-flyer-slot { position: absolute; box-sizing: border-box; background: #fff; border: 2px dashed var(--rr-pink); border-radius: 4px; cursor: move; touch-action: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 4% 4% 2%; box-shadow: 0 0 0 9999px rgba(0,0,0,0.18); }
.gc-flyer-slot-qr { width: 100%; height: auto; pointer-events: none; image-rendering: pixelated; }
.gc-flyer-slot-qr--ph { aspect-ratio: 1; display: grid; place-items: center; color: #200230; font-weight: 800; }
.gc-flyer-slot-code { font-family: 'JetBrains Mono', monospace; font-weight: 800; color: #200230; font-size: 11px; line-height: 1.2; margin-top: 2px; pointer-events: none; letter-spacing: 0.08em; }
.gc-flyer-slot-handle { position: absolute; right: -11px; bottom: -11px; width: 22px; height: 22px; border-radius: 50%; background: var(--rr-pink); border: 2px solid #fff; cursor: nwse-resize; touch-action: none; box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.gc-flyer-preview { display: block; width: 100%; max-width: 380px; height: auto; margin: 6px auto 8px; border-radius: 10px; border: 1px solid var(--rr-border); background: #000; }
.gc-flyer-preview--confirm { max-width: 240px; margin: 10px auto; }
.gc-flyer-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* Schedule for later (2026-10-22): Send now / Schedule chips + date & time on
   the confirm card; scheduled rows in Past promos get a Cancel link. */
.gc-promo-when { margin: 14px 0 10px; padding-top: 12px; border-top: 1px solid var(--rr-border); }
.gc-promo-when-head { font-size: 12.5px; color: var(--rr-text-muted); font-weight: 600; margin-bottom: 8px; }
.gc-promo-when-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.gc-promo-when-btn { background: rgba(0,0,0,0.25); border: 1px solid var(--rr-border); border-radius: 999px; padding: 8px 14px; color: var(--rr-text); font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.gc-promo-when-btn--active { border-color: var(--rr-pink); background: rgba(242,57,247,0.12); }
.gc-promo-when-row { display: flex; gap: 10px; flex-wrap: wrap; }
.gc-promo-when-row .gc-promo-label { flex: 1; min-width: 140px; margin-bottom: 8px; }
.gc-promo-when-row .gc-promo-input { box-sizing: border-box; min-width: 0; color-scheme: dark; }
.gc-promo-when-at { font-size: 13px; margin: 2px 0 8px; }
.gc-promo-hist-cancel { color: var(--rr-pink); font-weight: 700; text-decoration: none; }
