/* PRAMAR OS 24/7 — Estética Eliot / Del Río OS en paleta oficial El Legado (Carbón + Bronce + Burdeos) */
#pos-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  height: 40px;
  background: rgba(16, 17, 15, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(193, 165, 113, 0.45);
  color: #f4efe5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 11.5px;
  gap: 10px;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.45);
}
.pos-bar-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.pos-bar-metrics::-webkit-scrollbar { display: none; }
.pos-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #d6cfc2;
}
.pos-pill strong { color: #f7e7c1; font-weight: 700; }
.pos-pill.is-alert strong { color: #f87171; }
.pos-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  display: inline-block;
}
.pos-dot.is-off { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.pos-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.pos-btn-main {
  background: linear-gradient(135deg, #530a11, #7c1c2c);
  color: #f7e7c1;
  border: 1px solid #c1a571;
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pos-btn-main:hover { filter: brightness(1.12); }
.pos-btn-ghost {
  background: rgba(193, 165, 113, 0.14);
  color: #f7e7c1;
  border: 1px solid rgba(193, 165, 113, 0.4);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.pos-btn-ghost:hover { background: rgba(193, 165, 113, 0.25); }
.pos-badge {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
}

/* FULL-SCREEN OVERLAY */
#pos-overlay {
  position: fixed;
  inset: 0 0 40px 0;
  z-index: 105;
  background: radial-gradient(circle at 20% 0%, #1c1917 0%, #0e0f0d 65%);
  color: #f4efe5;
  display: flex;
  flex-direction: column;
  font-family: "Inter", -apple-system, sans-serif;
}
#pos-overlay[hidden] { display: none !important; }
.pos-topbar {
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(193, 165, 113, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(12, 13, 11, 0.92);
  gap: 10px;
}
.pos-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pos-brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #c1a571;
}
.pos-brand-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  color: #f7e7c1;
  letter-spacing: 0.04em;
}
.pos-brand-sub {
  font-size: 10.5px;
  color: #86efac;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.pos-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 185px 1fr 330px;
}
.pos-nav {
  border-right: 1px solid rgba(193, 165, 113, 0.22);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 16, 14, 0.85);
}
.pos-nav-btn {
  text-align: left;
  background: transparent;
  color: #d6cfc2;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pos-nav-btn:hover { background: rgba(193, 165, 113, 0.1); color: #fff; }
.pos-nav-btn.is-active {
  background: linear-gradient(135deg, rgba(83, 10, 17, 0.85), rgba(124, 28, 44, 0.6));
  border-color: rgba(193, 165, 113, 0.65);
  color: #f7e7c1;
}
.pos-main {
  padding: 16px 18px;
  overflow-y: auto;
  min-height: 0;
}
.pos-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
  flex-wrap: wrap;
}
.pos-sec-head h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 19px;
  color: #f7e7c1;
}
.pos-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pos-chip {
  background: rgba(193, 165, 113, 0.12);
  border: 1px solid rgba(193, 165, 113, 0.35);
  color: #f4efe5;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11.5px;
  cursor: pointer;
}
.pos-chip:hover { background: rgba(193, 165, 113, 0.25); }

/* 4-COLUMN SEGUIMIENTO BOARD */
.pos-board-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.pos-col {
  background: rgba(24, 25, 22, 0.82);
  border: 1px solid rgba(193, 165, 113, 0.2);
  border-radius: 12px;
  padding: 10px;
  min-height: 360px;
}
.pos-col.is-wait { border-color: rgba(251, 191, 36, 0.55); background: rgba(36, 28, 16, 0.65); }
.pos-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #c1a571;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(193, 165, 113, 0.18);
}
.pos-card {
  background: rgba(15, 16, 14, 0.92);
  border: 1px solid rgba(193, 165, 113, 0.25);
  border-radius: 10px;
  padding: 9px;
  margin-bottom: 8px;
  font-size: 12px;
}
.pos-card-code {
  font-size: 10px;
  font-weight: 800;
  color: #c1a571;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.pos-card-title { font-weight: 700; color: #fff; margin-bottom: 4px; line-height: 1.3; }
.pos-card-desc { font-size: 11px; color: #a8a29e; line-height: 1.35; margin-bottom: 7px; }
.pos-card-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.pos-btn-ok {
  background: #15803d;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.pos-btn-sm {
  background: rgba(255, 255, 255, 0.08);
  color: #e7e5e4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 11px;
  cursor: pointer;
}

/* KPI GRID & FUNNEL */
.pos-kpi-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.pos-kpi-card {
  background: rgba(24, 25, 22, 0.9);
  border: 1px solid rgba(193, 165, 113, 0.28);
  border-radius: 12px;
  padding: 12px;
}
.pos-kpi-card strong {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  color: #f7e7c1;
}
.pos-kpi-card span { font-size: 11px; color: #a8a29e; }
.pos-grid-2 {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.pos-panel {
  background: rgba(24, 25, 22, 0.85);
  border: 1px solid rgba(193, 165, 113, 0.22);
  border-radius: 12px;
  padding: 12px;
}
.pos-panel h3 {
  margin: 0 0 10px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #c1a571;
  text-transform: uppercase;
}
.pos-bar-row {
  display: grid;
  grid-template-columns: 125px 1fr 56px;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 11.5px;
}
.pos-bar-track {
  height: 16px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
}
.pos-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #530a11, #c1a571);
  border-radius: 6px;
}
.pos-bar-fill.is-leak { background: linear-gradient(90deg, #b45309, #ef4444); }
.pos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.pos-table th, .pos-table td {
  text-align: left;
  padding: 7px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pos-table th { color: #c1a571; font-size: 10.5px; text-transform: uppercase; }

/* SLACK-STYLE AGENTS CHANNEL */
.pos-slack {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 10px;
  height: calc(100vh - 180px);
}
.pos-chan-list {
  background: rgba(18, 19, 17, 0.9);
  border: 1px solid rgba(193, 165, 113, 0.2);
  border-radius: 12px;
  padding: 8px;
  overflow-y: auto;
}
.pos-chan-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #d6cfc2;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 11.5px;
  cursor: pointer;
  margin-bottom: 3px;
}
.pos-chan-btn.is-active { background: rgba(193, 165, 113, 0.22); color: #f7e7c1; font-weight: 700; }
.pos-feed {
  background: rgba(18, 19, 17, 0.9);
  border: 1px solid rgba(193, 165, 113, 0.2);
  border-radius: 12px;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pos-msg {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid #c1a571;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}
.pos-msg-meta { font-size: 10.5px; color: #c1a571; font-weight: 700; margin-bottom: 3px; }

/* RIGHT SIDEBAR: SECRETARIA ORQUESTADORA */
.pos-secretary {
  border-left: 1px solid rgba(193, 165, 113, 0.26);
  background: rgba(12, 13, 11, 0.96);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.pos-sec-avatar {
  padding: 14px;
  text-align: center;
  border-bottom: 1px solid rgba(193, 165, 113, 0.2);
}
.pos-avatar-ring {
  width: 68px;
  height: 68px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 2px solid #c1a571;
  box-shadow: 0 0 24px rgba(193, 165, 113, 0.35), inset 0 0 14px rgba(83, 10, 17, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #530a11, #151611);
}
.pos-avatar-ring img { width: 44px; height: 44px; border-radius: 50%; }
.pos-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pos-bubble {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.pos-bubble.is-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #530a11, #7c1c2c);
  color: #f7e7c1;
  max-width: 88%;
}
.pos-bubble.is-ai {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(193, 165, 113, 0.22);
  color: #f4efe5;
  max-width: 94%;
}
.pos-chat-input-wrap {
  padding: 10px;
  border-top: 1px solid rgba(193, 165, 113, 0.22);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pos-chat-row { display: flex; gap: 6px; }
.pos-chat-input {
  flex: 1;
  background: #1c1917;
  color: #fff;
  border: 1px solid rgba(193, 165, 113, 0.4);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
}
.pos-voice-btn {
  width: 100%;
  background: rgba(193, 165, 113, 0.15);
  color: #f7e7c1;
  border: 1px solid #c1a571;
  border-radius: 8px;
  padding: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.pos-voice-btn.is-listening {
  background: #dc2626;
  border-color: #fca5a5;
  color: #fff;
}

/* DELIVERABLE MODAL */
#pos-deliverable-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#pos-deliverable-modal[hidden] { display: none !important; }
.pos-deliv-box {
  width: min(680px, 96vw);
  max-height: 82vh;
  overflow-y: auto;
  background: #181917;
  border: 1.5px solid #c1a571;
  border-radius: 14px;
  padding: 16px;
  color: #f4efe5;
}
.pos-deliv-pre {
  background: #10110f;
  border: 1px solid rgba(193, 165, 113, 0.25);
  border-radius: 10px;
  padding: 12px;
  white-space: pre-wrap;
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  line-height: 1.55;
  margin: 10px 0;
}

@media (max-width: 1080px) {
  .pos-body { grid-template-columns: 1fr; }
  .pos-nav { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid rgba(193, 165, 113, 0.22); }
  .pos-board-4, .pos-kpi-4, .pos-grid-2, .pos-slack { grid-template-columns: 1fr; height: auto; }
  .pos-secretary { max-height: 320px; border-left: none; border-top: 1px solid rgba(193, 165, 113, 0.25); }
}
