/* AdCost Sync · Soporte (área de cliente y panel) */
.acst-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.acst-list a { display: grid; gap: 6px; padding: 18px 20px; background: #fff; border: 1px solid var(--p-line, #e2e0e8); text-decoration: none; color: var(--p-ink, #27262B); transition: border-color .2s, box-shadow .2s; }
.acst-list a:hover { border-color: var(--p-violet, #623FA2); box-shadow: 0 10px 30px -20px rgba(45, 33, 79, .5); }
.acst-list .is-unread a { border-left: 4px solid #FF4D8D; }
.acst-list__top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.acst-list__top strong { font-family: var(--p-display, inherit); color: var(--p-indigo, #2D214F); font-size: 18px; }
.acst-list__meta { font-size: 14px; color: #6B6A72; }
.acst-list__last { font-size: 15px; color: #45434d; }
.acst-list .is-unread .acst-list__top strong::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 8px; border-radius: 50%; background: #FF4D8D; box-shadow: 0 0 8px #FF4D8D; vertical-align: middle; }

.acst-status { display: inline-block; font: 600 13px/1 var(--p-display, inherit); padding: 6px 10px; white-space: nowrap; vertical-align: middle; }
.acst-status--abierto { background: #E7E0F7; color: #2D214F; }
.acst-status--en_curso { background: #DDF1FF; color: #0B4A77; }
.acst-status--esperando { background: #FFF1B8; color: #5C4400; }
.acst-status--resuelto { background: #DDF5E6; color: #1F5B34; }

/* Conversación */
.acst-chat { background: #fff; border: 1px solid var(--p-line, #e2e0e8); display: flex; flex-direction: column; }
.acst-chat__scroll { max-height: 62vh; overflow-y: auto; padding: 24px clamp(14px, 3vw, 28px); background: linear-gradient(180deg, #FBFAFD, #F4F2F8); scroll-behavior: smooth; }
.acst-chat--admin .acst-chat__scroll { max-height: 520px; }
.acst-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.acst-msg { display: flex; gap: 12px; align-items: flex-end; max-width: 82%; }
.acst-msg--mine { margin-left: auto; flex-direction: row-reverse; }
.acst-avatar { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--p-display, inherit); color: #fff; background: #2D214F; }
.acst-msg--mine .acst-avatar { background: var(--p-electric, #8B00ED); }
.acst-bubble { background: #fff; border: 1px solid var(--p-line, #e2e0e8); border-radius: 14px 14px 14px 4px; padding: 12px 16px; box-shadow: 0 6px 18px -14px rgba(45, 33, 79, .5); min-width: 0; }
.acst-msg--mine .acst-bubble { background: linear-gradient(135deg, #7A3BE0, #5B1FC4); color: #fff; border-color: transparent; border-radius: 14px 14px 4px 14px; }
.acst-msg--internal .acst-bubble { background: #FFF8DC; color: #3F3300; border: 1px dashed #D8B44A; }
.acst-meta { margin: 0 0 6px !important; font-size: 12px; opacity: .75; }
.acst-text { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.acst-msg--mine .acst-text a { color: #fff; }
.acst-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.acst-file--img img { display: block; max-width: 260px; max-height: 220px; width: auto; height: auto; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .08); background: #fff; }
.acst-file--video { max-width: 320px; border-radius: 8px; background: #000; }
.acst-file--doc { display: inline-block; padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, .9); color: #2D214F !important; font-weight: 600; font-size: 14px; text-decoration: none; border: 1px solid var(--p-line, #e2e0e8); }
.acst-msg.is-new .acst-bubble { animation: acstIn .5s ease-out; }
@keyframes acstIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* Caja de respuesta */
.acst-composer { border-top: 1px solid var(--p-line, #e2e0e8); padding: 14px; display: grid; gap: 10px; background: #fff; }
.acst-composer textarea { width: 100%; resize: none; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #CFCDD6; border-radius: 10px; min-height: 52px; }
.acst-composer textarea:focus { outline: none; border-color: var(--p-violet, #623FA2); box-shadow: 0 0 0 3px rgba(98, 63, 162, .2); }
.acst-composer__bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.acst-composer__bar .acsp-btn { margin-left: auto; }
.acst-attach { position: relative; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--p-violet, #623FA2); cursor: pointer; padding: 8px 12px; border: 1px dashed #C9C7D0; border-radius: 8px; }
.acst-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.acst-attach:focus-within { outline: 3px solid var(--p-electric, #8B00ED); outline-offset: 2px; }
.acst-attach__names { font-size: 13px; color: #6B6A72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }
@media (max-width: 640px) { .acst-msg { max-width: 100%; } .acst-file--img img { max-width: 100%; } }
@media (prefers-reduced-motion: reduce) { .acst-msg.is-new .acst-bubble { animation: none; } .acst-chat__scroll { scroll-behavior: auto; } }

/* Panel de WordPress */
.acst-reply { margin-top: 14px; }
.acst-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #d63638; margin-right: 6px; vertical-align: middle; }
tr.acst-unread .row-title { font-weight: 800; }
.acst-pri { display: inline-block; padding: 2px 8px; border-radius: 3px; font-weight: 600; font-size: 12px; background: #f0f0f1; }
.acst-pri--alta { background: #FFF1B8; color: #5C4400; }
.acst-pri--urgente { background: #d63638; color: #fff; }
