/* V59: production look. Same Panitas identity (black, white, red); calmer chrome, clearer actions. */
.demo-permanent.v59-live{background:#0b0b0c!important;color:#d7d7da!important;border-color:#0b0b0c!important;letter-spacing:.02em}
.demo-permanent.v59-live b{color:#fff!important;border-left:3px solid #19c37d!important;padding-left:9px}
.demo-permanent.v59-live span{opacity:.92}

/* Reply shortcuts */
.chat-composer{position:relative}
.v59-shortcuts{position:absolute;left:12px;right:12px;bottom:calc(100% + 8px);z-index:40;background:#fff;border:1px solid #e4e4e7;
  border-radius:16px;box-shadow:0 18px 48px rgba(0,0,0,.16);padding:8px;max-height:min(56vh,420px);overflow:auto}
.v59-shortcuts-head{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:6px 10px 10px;font-size:12px;color:#71717a}
.v59-shortcuts-head b{color:#111;font-size:12px;letter-spacing:.08em;text-transform:uppercase}
.v59-shortcut{display:grid;grid-template-columns:1fr auto;gap:2px 10px;width:100%;text-align:left;border:0;background:transparent;
  padding:10px 12px;border-radius:12px;cursor:pointer;font:inherit;color:#111}
.v59-shortcut strong{font-size:14px;font-weight:700}
.v59-shortcut em{font-style:normal;font-size:11px;color:#71717a;background:#f4f4f5;border-radius:999px;padding:2px 9px;align-self:center}
.v59-shortcut span{grid-column:1/-1;font-size:13px;color:#52525b;line-height:1.35;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.v59-shortcut:hover,.v59-shortcut.active{background:#f4f4f5}
.v59-shortcut.active{box-shadow:inset 3px 0 0 #fa0000}

/* Chat: files and messages read as one conversation */
.v12-attachment .v12-media-bubble{border-radius:18px;overflow:hidden}
.v12-attachment.in .v12-media-bubble{background:#fff}
.v12-media-only-crm{font-size:11px;color:#71717a;letter-spacing:.01em}
.v12-attachment.out .v12-media-only-crm{color:#3f6212}
.v12-media-audio{width:min(320px,100%)}

/* Buttons: one clear primary action, quieter secondary ones, visible keyboard focus */
.btn{border-radius:12px;font-weight:600;transition:background-color .15s,border-color .15s,box-shadow .15s,transform .05s}
.btn:active{transform:translateY(1px)}
.btn.primary{box-shadow:0 1px 0 rgba(0,0,0,.08),0 6px 16px rgba(250,0,0,.18)}
.btn:focus-visible,.chat-item:focus-visible,.v59-shortcut:focus-visible,button:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible{
  outline:2px solid #111;outline-offset:2px}
.chat-item{transition:background-color .12s}
.chat-item.active{box-shadow:inset 3px 0 0 #fa0000}
.thread-header{backdrop-filter:saturate(1.2) blur(6px)}
.thread-header-main small{color:#71717a}
select,input[type=text],input[type=search],textarea{border-radius:12px}

@media(max-width:760px){
  .v59-shortcuts{left:8px;right:8px;max-height:46vh}
  .v59-shortcuts-head span{display:none}
  .v59-shortcut{padding:12px}
}
@media(prefers-reduced-motion:reduce){.btn,.chat-item{transition:none}}

/* V63: WhatsApp templates */
.v63-open{display:block;width:calc(100% - 24px);margin:0 12px 8px;padding:9px 14px;border-radius:12px;border:1px dashed #d4d4d8;background:#fafafa;color:#52525b;font:inherit;font-size:13px;text-align:left;cursor:pointer}
.v63-open.late{border:1px solid #fde6b8;background:#fff8eb;color:#7a4a00}
.v63-open u{font-weight:700}
.v63-sheet{position:fixed;inset:0;z-index:1200;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;padding:16px}
.v63-card{background:#fff;border-radius:20px;width:min(560px,100%);max-height:86vh;overflow:auto;padding:20px 22px;box-shadow:0 24px 70px rgba(0,0,0,.3)}
.v63-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.v63-head h3{margin:0;font-size:18px}
.v63-x{border:0;background:#f4f4f5;border-radius:999px;width:34px;height:34px;font-size:20px;cursor:pointer}
.v63-note{color:#52525b;font-size:14px;line-height:1.5;margin:8px 0}
.v63-note.warn{background:#fff8eb;border:1px solid #fde6b8;border-radius:12px;padding:10px 12px;color:#7a4a00}
.v63-list{display:flex;flex-direction:column;gap:8px}
.v63-item{display:grid;grid-template-columns:1fr auto;gap:4px 10px;text-align:left;border:1px solid #e7e7ea;background:#fff;border-radius:14px;padding:12px 14px;cursor:pointer;font:inherit}
.v63-item:hover{border-color:#111}
.v63-item strong{font-size:14.5px;text-transform:capitalize}
.v63-item em{font-style:normal;font-size:11px;background:#f4f4f5;border-radius:999px;padding:2px 9px;align-self:center;color:#52525b}
.v63-item span{grid-column:1/-1;font-size:13px;color:#52525b;line-height:1.4}
.v63-back{border:0;background:transparent;color:#52525b;font:inherit;font-size:13px;cursor:pointer;padding:0;margin-bottom:10px}
.v63-preview{white-space:pre-wrap;font:inherit;font-size:14px;line-height:1.5;background:#f0f7ee;border-radius:14px;padding:14px 16px;margin:0 0 14px}
.v63-preview mark{background:#fff3b0;border-radius:4px;padding:0 3px}
.v63-preview small{color:#71717a}
.v63-field{display:block;margin-bottom:10px}
.v63-field span{display:block;font-size:12px;font-weight:700;color:#52525b;margin-bottom:4px}
.v63-field input{width:100%;padding:11px 12px;border:1px solid #d4d4d8;border-radius:12px;font:inherit}
.v63-send{width:100%;margin-top:6px;justify-content:center}
