.zlc-dialog { position:fixed; inset:0; width:min(1100px,96%); height:min(850px,94dvh); max-width:96vw; max-height:94dvh; margin:auto; padding:0; border:1px solid #aaa; border-radius:8px; background:#fff; color:#202020; }
.zlc-dialog:not([open]) { display:none; }
.zlc-dialog::backdrop { background:#0008; }
#zaloInboxOpen[hidden] { display:none; }
.zlc-shell { padding:16px; width:100%; height:100%; overflow:auto; box-sizing:border-box; }
.zlc-shell header { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:4px 12px; align-items:center; }
.zlc-shell header span { grid-column:1; grid-row:2; }
.zlc-shell header button { grid-column:2; grid-row:1 / span 2; width:44px; height:44px; padding:0; font-size:24px; }
.zlc-shell header span,.zlc-shell small { color:#666; font-size:12px; }
.zlc-layout { display:grid; grid-template-columns:280px minmax(0,1fr); gap:20px; }
.zlc-layout aside { border-right:1px solid #ddd; padding-right:12px; }
.zlc-layout select,.zlc-chat textarea { width:100%; box-sizing:border-box; font-size:16px; }
.zlc-actions { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0; }
.zlc-shell button { min-height:44px; border-radius:6px; }
.zlc-shell [data-chats] { max-height:48dvh; overflow:auto; }
.zlc-shell [data-chats] button { display:block; width:100%; text-align:left; background:#f6f7f8; color:#202020; border:1px solid #ddd; margin:6px 0; padding:10px; }
.zlc-shell [data-chats] button[aria-pressed=true] { border-color:#16814c; background:#e9f7ef; }
.zlc-shell [data-chats] span,.zlc-shell [data-chats] small { display:block; }
.zlc-shell [data-messages] { height:32dvh; min-height:150px; overflow:auto; border-block:1px solid #ddd; margin:10px 0; }
.zlc-shell article { border-bottom:1px solid #eee; padding:10px; overflow-wrap:anywhere; }
.zlc-shell article p { white-space:pre-wrap; margin:5px 0; }
.zlc-shell .zlc-out { border-left:3px solid #16814c; }
.zlc-shell .zlc-self { border-left:3px solid #c07a12; }
.zlc-shell [data-send] { margin-top:8px; width:100%; background:#16784a; color:white; }
.zlc-shell pre { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; }
.zlc-chat { min-width:0; }
.zlc-chat h3 { font-size:18px; margin:0; overflow-wrap:anywhere; }
.zlc-shell [data-note] { color:#8a4512; overflow-wrap:anywhere; }
.zlc-shell [data-list] { display:none; }
@media(max-width:650px) {
  .zlc-shell { padding:12px; }
  .zlc-layout { grid-template-columns:minmax(0,1fr); gap:12px; }
  .zlc-dialog[data-selected=yes] aside { display:none; }
  .zlc-dialog[data-selected=no] .zlc-chat { display:none; }
  .zlc-dialog[data-selected=yes] [data-list] { display:inline-block; margin-bottom:12px; }
  .zlc-layout aside { border-right:0; border-bottom:1px solid #ddd; padding:0 0 10px; }
  .zlc-shell [data-chats] { max-height:150px; }
  .zlc-shell [data-messages] { height:230px; }
}
.zlc-dialog [data-delivery-review] {border-block:1px solid #ddd;margin:12px 0;padding:12px 0;}
.zlc-dialog [data-delivery-review][hidden] {display:none;}
.zlc-dialog [data-delivery-review] summary {font-weight:700;cursor:pointer;min-height:44px;display:flex;align-items:center;}
.zlc-dialog [data-review-rows] {list-style:none;padding:0;margin:8px 0;max-height:280px;overflow:auto;}
.zlc-dialog [data-review-rows] li {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;padding:10px 0;border-bottom:1px solid #eee;align-items:center;overflow-wrap:anywhere;}
.zlc-dialog [data-review-rows] small {display:block;}
.zlc-dialog [data-review-filter] {width:auto;max-width:100%;font-size:16px;}
.zlc-dialog .zlc-review-buttons {display:flex;gap:6px;flex-wrap:wrap;}
.zlc-dialog [data-manual-review] {border-top:1px solid #ddd;margin-top:12px;padding-top:12px;}
.zlc-dialog [data-manual-review][hidden] {display:none;}
.zlc-dialog [data-manual-review] h3 {font-size:18px;margin:0;}
.zlc-dialog [data-manual-note] {display:block;width:100%;box-sizing:border-box;font-size:16px;min-height:44px;}
.zlc-dialog [data-manual-result] {overflow-wrap:anywhere;}
@media(max-width:650px) {
  .zlc-dialog [data-review-rows] li {grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
  .zlc-dialog [data-review-rows] button {grid-column:1 / -1;justify-self:start;}
  .zlc-dialog .zlc-review-buttons {grid-column:1 / -1;}
}
