#ph06chatbot-root {
  --ph06-navy: #0A304F;
  --ph06-blue: #0097D1;
  --ph06-green: #98B821;
  --ph06-paper: #F5F8FA;
  --ph06-line: #D9E3E9;
  --ph06-ink: #173042;
  --ph06-soft-blue: #EAF6FB;
  --ph06-soft-green: #F3F8E6;
  --ph06-danger: #B42318;
  font-family: Arial, Helvetica, sans-serif;
}

.ph06cb-launcher {
  position: fixed; right: 24px; bottom: 24px;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--ph06-navy); color: #fff; border: none; cursor: pointer;
  box-shadow: 0 8px 24px rgba(10,48,79,.30);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.ph06cb-launcher:hover { background: #082941; }
.ph06cb-launcher svg { width: 26px; height: 26px; }
.ph06cb-dot {
  position: absolute; top: 6px; right: 6px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--ph06-blue); border: 2px solid var(--ph06-navy);
}

.ph06cb-panel {
  position: fixed; right: 24px; bottom: 98px; width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px);
  background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(10,48,79,.24);
  display: flex; flex-direction: column; overflow: hidden; z-index: 9998;
  opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease; border: 1px solid var(--ph06-line);
}
.ph06cb-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.ph06cb-header { background: var(--ph06-navy); color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.ph06cb-avatar {
  width: 58px; height: 36px; border-radius: 6px; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; background: var(--ph06-navy);
}
.ph06cb-avatar img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.ph06cb-who { flex: 1; min-width: 0; }
.ph06cb-name { font-size: 13.5px; font-weight: 700; }
.ph06cb-status { font-size: 10.5px; display: flex; align-items: center; gap: 5px; opacity: .9; margin-top: 2px; }
.ph06cb-led { width: 6px; height: 6px; border-radius: 50%; background: var(--ph06-green); }
.ph06cb-escalated .ph06cb-led { background: var(--ph06-blue); }
.ph06cb-transmitted .ph06cb-led { background: var(--ph06-green); }
.ph06cb-close { background: none; border: none; color: #fff; opacity: .75; cursor: pointer; font-size: 16px; padding: 4px; }

.ph06cb-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--ph06-paper); }
.ph06cb-msg { max-width: 86%; font-size: 13.5px; line-height: 1.5; padding: 10px 12px; border-radius: 12px; overflow-wrap: anywhere; }
.ph06cb-assistant { background: #fff; border: 1px solid var(--ph06-line); color: var(--ph06-ink); align-self: flex-start; border-bottom-left-radius: 3px; }
.ph06cb-user { background: var(--ph06-navy); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }

.ph06cb-typing { display: flex; gap: 4px; padding: 12px 14px; align-self: flex-start; background: #fff; border: 1px solid var(--ph06-line); border-radius: 12px; border-bottom-left-radius: 3px; }
.ph06cb-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ph06-blue); opacity: .5; animation: ph06cb-blink 1.1s infinite ease-in-out; }
.ph06cb-typing span:nth-child(2) { animation-delay: .15s; }
.ph06cb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ph06cb-blink { 0%,80%,100% { opacity: .25; } 40% { opacity: .9; } }

.ph06cb-product { align-self: flex-start; max-width: 86%; display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--ph06-line); border-left: 3px solid var(--ph06-blue); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: inherit; }
.ph06cb-product:hover { border-left-color: var(--ph06-green); text-decoration: none; }
.ph06cb-thumb { width: 34px; height: 34px; border-radius: 7px; background: var(--ph06-soft-blue); color: var(--ph06-blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ph06cb-thumb svg { width: 17px; height: 17px; }
.ph06cb-info { flex: 1; min-width: 0; }
.ph06cb-pname { font-size: 12.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph06cb-pmeta { font-size: 11px; color: var(--ph06-blue); margin-top: 2px; }
.ph06cb-arrow { color: #5A6472; flex-shrink: 0; }
.ph06cb-arrow svg { width: 15px; height: 15px; }

.ph06cb-escalate { align-self: flex-start; max-width: 92%; background: var(--ph06-soft-green); border: 1px solid #D5E39B; border-radius: 12px; padding: 12px; font-size: 13px; }
.ph06cb-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: #647D0E; font-weight: 700; margin-bottom: 6px; }
.ph06cb-reason { color: #405219; margin-bottom: 10px; }
.ph06cb-escalate input[type=email] { width: 100%; padding: 8px 10px; border: 1px solid #BDD06E; border-radius: 7px; font-size: 13px; margin-bottom: 8px; box-sizing: border-box; background: #fff; }
.ph06cb-escalate input.ph06cb-invalid { border-color: var(--ph06-danger); }
.ph06cb-escalate button { width: 100%; background: var(--ph06-blue); color: #fff; border: none; padding: 9px; border-radius: 7px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ph06cb-escalate button:hover { background: #0086BA; }

.ph06cb-contact-link { display: block; width: 100%; background: var(--ph06-blue); color: #fff !important; border: none; padding: 9px 12px; border-radius: 7px; font-size: 13px; font-weight: 700; text-align: center; text-decoration: none !important; box-sizing: border-box; }
.ph06cb-contact-link:hover { background: #0086BA; color: #fff !important; text-decoration: none !important; }

.ph06cb-escalate button:disabled { opacity: .6; cursor: default; }
.ph06cb-confirm { color: #647D0E; font-weight: 700; }

.ph06cb-composer { border-top: 1px solid var(--ph06-line); padding: 10px; display: flex; gap: 8px; background: #fff; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.ph06cb-composer textarea { flex: 1; resize: none; border: 1px solid var(--ph06-line); border-radius: 9px; padding: 13px 11px; font-family: inherit; font-size: 13.5px; max-height: 70px; color: var(--ph06-ink); }
.ph06cb-composer textarea:focus { outline: none; border-color: var(--ph06-blue); box-shadow: 0 0 0 2px rgba(0,151,209,.12); }
.ph06cb-composer button { background: var(--ph06-blue); border: none; color: #fff; width: 38px; border-radius: 9px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ph06cb-composer button:hover { background: #0086BA; }
.ph06cb-composer button:disabled { opacity: .5; cursor: default; }
.ph06cb-composer button svg { width: 17px; height: 17px; }

@media (max-width: 460px) {
  .ph06cb-panel {
    right: max(10px, env(safe-area-inset-right));
    left: max(10px, env(safe-area-inset-left));
    width: auto;
    bottom: calc(82px + env(safe-area-inset-bottom));
    max-height: calc(100vh - 104px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 104px - env(safe-area-inset-bottom));
  }
  .ph06cb-launcher { right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); }
}

.ph06cb-beta{font-size:.82em;font-weight:500;opacity:.78;}


.ph06cb-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.ph06cb-end {
  border: 1px solid rgba(255,255,255,.55);
  background: transparent;
  color: #fff;
  border-radius: 14px;
  font-size: 11px;
  line-height: 1;
  padding: 6px 9px;
  cursor: pointer;
  white-space: nowrap;
}

.ph06cb-end:hover,
.ph06cb-end:focus {
  background: rgba(255,255,255,.12);
}

@media (max-width: 460px) {
  .ph06cb-end {
    font-size: 10px;
    padding: 5px 7px;
  }
}
