/* Compact inbox: recognizable channels and one clear owner line. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.channel-icon { display: block; width: 20px; height: 20px; flex-shrink: 0; }
.compact-inbox .channel-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.compact-inbox .channel-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f6f8f5;
}
.compact-inbox .channel-filter.whatsapp, .channel-badge.whatsapp { color: #198553; }
.compact-inbox .channel-filter.instagram, .channel-badge.instagram { color: #ba4678; }
.compact-inbox .channel-filter.facebook, .channel-badge.facebook { color: #2873ce; }
.compact-inbox .channel-filter:hover { background: #eef2eb; border-color: #d4dfd0; }
.compact-inbox .channel-filter.active { border-color: #6b926f; background: #e9f2e4; box-shadow: inset 0 0 0 1px #6b926f; }
.compact-inbox .channel-filter.all-channels { font-size: 11px; font-weight: 600; }
.customer-avatar { display: inline-flex; position: relative; flex-shrink: 0; }
.customer-avatar .avatar { width: 36px; height: 36px; border-radius: 11px; }
.channel-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #fff;
}
.channel-badge .channel-icon { width: 15px; height: 15px; }
.compact-inbox .chat-row { padding: 13px 15px; gap: 13px; }
.compact-inbox .row-name { font-size: 12px; line-height: 18px; }
.compact-inbox .row-name time { font-size: 10px; }
.compact-inbox .preview { margin: 5px 0 8px; font-size: 11px; line-height: 16px; }
.compact-inbox .preview-type { color: #8a6a37; font-weight: 550; }
.compact-inbox .chat-meta { min-height: 20px; gap: 5px; }
.compact-inbox .chat-assignee { margin: 0; min-width: 0; gap: 5px; font-size: 10px; }
.compact-inbox .chat-assignee strong { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-inbox .assignee-initials { width: 18px; height: 18px; }
.compact-inbox .tag { padding: 3px 5px; font-size: 9px; flex-shrink: 0; }
.compact-inbox .chat-header > .customer-avatar { margin-right: 3px; }
@media (min-width: 1600px) {
  .compact-inbox .row-name { font-size: 13px; }
  .compact-inbox .preview { font-size: 12px; }
  .compact-inbox .chat-assignee { font-size: 11px; }
}
@media (max-width: 650px) {
  .compact-inbox .channel-filter { min-height: 42px; }
  .compact-inbox .row-name { font-size: 13px; }
  .compact-inbox .chat-row { padding: 12px 15px; }
}

.inbox-live-status{display:block;font-size:10px;color:var(--muted);margin-top:8px}.new-messages{position:sticky;top:0;z-index:2;margin:0 auto 10px;background:#e3efdd;color:#285b43;box-shadow:0 2px 8px #0001}.new-messages[hidden],.message-empty[hidden]{display:none}

/* The inbox owns the available viewport; headings and notices no longer steal chat height. */
.inbox-page .app > main { padding: 12px 18px; max-width: none; }
.inbox-list-title { gap: 8px; }
.inbox-list-title > strong { margin-right: auto; font-weight: 600; }
.inbox-list-title .new-customer { min-height: 28px; padding: 4px 8px; font-size: 11px; white-space: nowrap; }
.inbox-page .flash { padding: 7px 12px; margin: 0 0 8px; font-size: 12px; }
.contact-avatar { position: relative; flex-shrink: 0; overflow: hidden; }
.contact-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.contact-avatar img[hidden] { display: none; }
@media (min-width: 901px) {
  .inbox-page .app { height: 100dvh; display: flex; flex-direction: column; }
  .inbox-page .topbar { height: 48px; flex-shrink: 0; }
  .inbox-page .app > main { flex: 1; min-height: 0; width: 100%; margin: 0; display: flex; flex-direction: column; }
  .inbox-page .app > main .inbox { flex: 1; height: auto; min-height: 0; }
  .inbox-page .chat-header { padding-top: 12px; padding-bottom: 12px; }
}
@media (min-width: 651px) and (max-width: 900px) {
  .inbox-page .app > main .inbox { height: calc(100dvh - 195px); min-height: 460px; }
}
@media (max-width: 650px) {
  .inbox-page .app > main { padding: 8px; }
}

/* A wider, tabbed workspace keeps the catalog beside the conversation. */
@media (min-width: 1600px) { .inbox-page .inbox { grid-template-columns: 330px minmax(420px, 1fr) clamp(480px, 30vw, 580px); } }
@media (min-width: 1400px) and (max-width: 1599px) { .inbox-page .inbox { grid-template-columns: 300px minmax(360px, 1fr) 440px; } }
@media (min-width: 1180px) and (max-width: 1399px) { .inbox-page .inbox { grid-template-columns: 260px minmax(300px, 1fr) 360px; } }
.customer-panel-heading { display:flex; align-items:center; gap:8px; padding:0 14px; border-bottom:1px solid var(--line); flex-shrink:0; }
.customer-panel-tabs { display:flex; flex:1; gap:20px; }
.customer-panel-tabs button { padding:15px 0 12px; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; color:var(--muted); font-size:12px; }
.customer-panel-tabs button[aria-selected=true] { color:var(--green); border-bottom-color:var(--green); font-weight:650; }
.customer-panel-heading .details-close { float:none; margin:0; flex-shrink:0; }
.customer-panel-content { display:flex; flex:1; flex-direction:column; min-height:0; min-width:0; }
.chat-catalog { display:flex; flex:1; flex-direction:column; min-height:0; }
.chat-catalog-search { padding:10px 12px 6px; display:grid; gap:6px; }
.chat-catalog-search > label { font-size:11px; font-weight:600; }
.chat-catalog-search input[type=search], .chat-catalog-search select { font-size:12px; padding:7px 9px; }
.chat-catalog-options { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; }
/* Location, brand and category: two per row in the narrow panel. */
.chat-catalog-options select { flex:1 1 calc(50% - 4px); min-width:0; }
/* The same filters as Tom Select boxes you can type into (searchable_select). */
.chat-catalog-options .ts-wrapper { flex:1 1 calc(50% - 4px); min-width:0; }
.chat-catalog-options .ts-wrapper .ts-control { min-height:34px; padding:7px 26px 7px 9px; border:1px solid var(--line); border-radius:8px; font-size:11px; color:var(--ink); box-shadow:none; }
.chat-catalog-options .ts-wrapper.focus .ts-control { border-color:var(--green); box-shadow:0 0 0 2px #276b4e1f; }
.chat-catalog-options .ts-wrapper .ts-control > input { font-size:11px; }
/* One line: the chosen value (cut with … when long) and the place to type. */
.chat-catalog-options .ts-wrapper.single .ts-control { flex-wrap:nowrap; overflow:hidden; }
.chat-catalog-options .ts-wrapper.single .ts-control > .item { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-catalog-options .ts-wrapper.single.has-items .ts-control > input { flex:0 1 4px; min-width:4px; }
.chat-catalog-options .ts-wrapper.single.has-items.focus .ts-control > input { flex:1 1 auto; }
/* body > …: tom-select.css loads after this file and would put the list behind the catalog. */
body > .ts-dropdown { z-index:1200; border:1px solid var(--line); border-radius:8px; box-shadow:0 10px 28px #163a2622; font-size:12px; color:var(--ink); }
.ts-dropdown .optgroup-header { font-size:10px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); background:#f6f8f5; }
.ts-dropdown .active { background:#eaf2e8; color:var(--green); }
.ts-dropdown .no-results { padding:8px 10px; color:var(--muted); }
.chat-catalog-options .stock-checkbox { font-size:11px; white-space:nowrap; min-height:0; }
.chat-catalog-feedback { font-size:10px; line-height:1.4; color:var(--green); padding:0 12px 7px; border-bottom:1px solid var(--line); }
.chat-catalog-scroll { flex:1; min-height:0; overflow-y:auto; scrollbar-width:thin; padding:0 12px 12px; }
.chat-catalog-count { display:flex; align-items:center; justify-content:space-between; gap:6px; margin:7px 0; font-size:11px; }
.chat-catalog-count small { font-size:9px; }
/* Square product cards; an opened card spans the full row. */
.chat-catalog-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:8px; }
.chat-catalog-product { display:flex; flex-direction:column; min-width:0; border:1px solid var(--line); border-radius:10px; padding:8px; background:#fff; }
.chat-product-image { position:relative; height:84px; display:grid; place-items:center; border:1px solid #edf0ea; border-radius:7px; overflow:hidden; color:var(--green); font-size:12px; background:#f8faf7; }
.chat-product-image img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; padding:4px; background:#fff; }
.chat-product-image .inventory-count { position:absolute; right:4px; bottom:4px; font-size:9px; padding:2px 5px; }
.chat-product-info { min-width:0; margin-top:6px; }
.chat-product-info small { display:block; font-size:9px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-product-info h3 { margin:3px 0 5px; font-size:11px; line-height:1.35; font-weight:650; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.7em; }
.chat-product-price { font-size:12px; }
.chat-product-wholesale { margin:6px 0 0; padding-top:5px; border-top:1px dashed #e3e8df; font-size:10px; }
.chat-product-wholesale > div { display:flex; justify-content:space-between; gap:6px; line-height:1.6; }
.chat-product-wholesale dt { color:var(--muted); white-space:nowrap; }
.chat-product-wholesale dd { margin:0; font-weight:600; white-space:nowrap; }
.chat-product-details-link { align-self:center; margin-top:4px; padding:2px 6px; min-height:0; border:0; background:transparent; color:var(--muted); font-size:10px; text-decoration:underline; cursor:pointer; }
.chat-product-details-link:hover { color:var(--green); }
dialog.chat-product-dialog { width:520px; max-width:calc(100% - 30px); max-height:85dvh; padding:22px; overflow:auto; cursor:auto; }
.chat-product-dialog .close { float:right; min-width:32px; }
.chat-product-dialog-head { display:flex; gap:16px; align-items:flex-start; margin-bottom:6px; }
.chat-product-dialog-image { position:relative; width:130px; height:130px; flex-shrink:0; display:grid; place-items:center; border:1px solid #edf0ea; border-radius:9px; background:#fff; color:var(--green); overflow:hidden; }
.chat-product-dialog-image img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; padding:6px; }
.chat-product-dialog-head small { font-size:10px; color:var(--muted); overflow-wrap:anywhere; }
.chat-product-dialog h2 { font-size:16px; margin:4px 0 8px; padding-right:30px; line-height:1.35; }
.chat-product-dialog-price { font-size:18px; }
.chat-product-dialog-stock { margin:6px 0 0; font-size:11px; color:var(--muted); }
.chat-product-dialog h4 { margin:16px 0 6px; font-size:12px; }
.chat-product-dialog dl { margin:0; font-size:12px; }
.chat-product-dialog dl > div { display:flex; justify-content:space-between; gap:8px; padding:6px 0; border-bottom:1px solid #edf0ea; }
.chat-product-dialog dd { margin:0; white-space:nowrap; font-weight:600; }
.chat-product-description { max-height:220px; overflow:auto; font-size:12px; color:var(--ink); line-height:1.6; overflow-wrap:anywhere; }
.chat-product-dialog-foot { display:flex; gap:12px; align-items:center; justify-content:space-between; margin-top:16px; padding-top:12px; border-top:1px solid var(--line); }
.chat-product-dialog-foot small { font-size:10px; color:var(--muted); line-height:1.5; }
.chat-product-dialog-foot .chat-recommend-form { margin:0; flex-shrink:0; }
.chat-product-dialog-foot .chat-recommend-form button { width:auto; }
.chat-recommend-form { margin-top:6px; }
.chat-catalog-product > .chat-recommend-form { margin-top:auto; padding-top:6px; }
.chat-recommend-form button { width:100%; min-height:28px; padding:4px 8px; font-size:11px; }
.chat-catalog-pagination { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:12px 0; }
#conversation-catalog-results[busy] { opacity:.55; pointer-events:none; }
@media (min-width:651px) and (max-width:1179px) { .inbox.details-open .order-panel { width:390px; max-width:90%; } }
@media (max-width:650px) { .chat-catalog-scroll { max-height:620px; flex:auto; } .customer-panel-heading { padding:0 20px; } }

/* Product drops send immediately; the button remains a draft alternative. */
.chat-catalog-product[draggable=true] { cursor:grab; }
.chat-catalog-product[draggable=true]:active { cursor:grabbing; }
.chat-catalog-product[draggable=true] .chat-product-image img { pointer-events:none; }
.chat { position:relative; }
.product-drop-hint { display:none; position:absolute; inset:8px; z-index:10; border:2px dashed var(--green); border-radius:12px; background:#f1f8eff2; color:var(--green); pointer-events:none; align-items:center; justify-content:center; flex-direction:column; gap:8px; text-align:center; padding:20px; }
.product-drop-hint strong { font-size:18px; }
.product-drop-hint span { font-size:12px; }
.product-drag-ready .product-drop-hint { display:flex; }
.product-drag-over .product-drop-hint { border-style:solid; background:#e2efdcf5; }

#conversation-order-summary { flex-shrink:0; }

.product-thumbnail { position:relative; width:48px; height:56px; overflow:hidden; }
.product-thumbnail img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#fff; }
.product-thumbnail img[hidden] { display:none; }

.order-history-filter { display:grid; gap:8px; margin:14px 0; max-width:440px; }
.order-history-filter select { font-size:11px; }
.customer-order-card { padding:13px 0; border-bottom:1px solid var(--line); }
.customer-order-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:7px; font-size:11px; }
.order-state { display:inline-block; font-size:9px; line-height:1.4; padding:4px 6px; border-radius:5px; background:#edf1eb; color:#52604e; }
.order-state-awaiting_payment,.order-state-processing { background:#fff2d5; color:#775719; }
.order-state-paid,.order-state-completed { background:#e6f1e2; color:#286448; }
.order-state-cancelled,.order-state-rejected { background:#f9e8e4; color:#884735; }
.order-state-expired { background:#ececf1; color:#626274; }
.customer-order-products { display:flex; gap:10px; align-items:center; margin:12px 0 8px; font-size:11px; line-height:1.5; }
.customer-order-products .product-thumbnail { width:36px; height:44px; }
.customer-order-actions,.draft-order-reference { display:flex; align-items:center; gap:7px; margin-top:10px; }
.customer-order-actions b,.draft-order-reference small { margin-right:auto; }
.customer-order-actions b { font-size:12px; }
.order-closure { margin-top:22px; border-top:1px solid var(--line); padding-top:16px; font-size:12px; }
.order-closure summary { cursor:pointer; }
.orders-history-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; }
.orders-history-grid .order-card { padding:18px; background:#fff; border:1px solid var(--line); border-radius:10px; }
.orders-history-grid h3 { margin:14px 0 8px; font-size:15px; }
.orders-history-grid p { font-size:12px; color:var(--muted); }

.customer-profile-summary { display:grid; gap:4px; padding:12px 0 5px; }
.customer-profile-summary > small { font-size:9px; color:var(--muted); }
.customer-profile-summary > strong { font-size:11px; line-height:1.5; font-weight:550; margin-bottom:6px; }
.customer-type-options { border:0; padding:6px 0; margin:0; }
.customer-type-options legend { font-size:11px; }
.customer-type-options label { display:flex; gap:7px; align-items:center; }
.customer-type-options input { width:auto; }

.order-checkout { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border, #dce5df); }
.checkout-details { font-size: 12px; margin: 10px 0; }
.checkout-details dt { color: #65766c; margin-top: 10px; font-size: 11px; }
.checkout-details dd { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.checkout-editor summary { cursor: pointer; font-size: 12px; color: #28684f; }
.order-notifications { position: relative; font-size: 12px; }
.order-notifications > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #dce5df; border-radius: 7px; color: #24553f; background: #f6faf5; }
.order-notifications > summary::-webkit-details-marker { display: none; }
.order-notifications > summary b { background: #dfeedd; border-radius: 12px; padding: 1px 6px; }
.order-notifications-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 100; width: min(390px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; padding: 16px; background: white; border: 1px solid #dce5df; border-radius: 12px; box-shadow: 0 12px 35px #163a2626; color: #24372d; }
.order-notifications-menu h2 { font-size: 16px; margin: 0 0 4px; }
.notification-heading { display: flex; justify-content: space-between; margin: 18px 0 6px; font-size: 12px; }
.order-notification { display: block; padding: 12px 0; border-bottom: 1px solid #eef1ed; text-decoration: none; color: inherit; }
.order-notification:hover { background: #f5f8f2; }
.order-notification strong { display: flex; justify-content: space-between; gap: 10px; }
.order-notification strong span { font-size: 10px; font-weight: normal; }
.order-notification > span, .order-notification small { display: block; margin-top: 5px; color: #65766c; font-size: 11px; }
.notification-more { display: block; padding: 10px 0; color: #28684f; }
.notification-empty { color: #65766c; font-size: 12px; }
.opening-conversation .chat { opacity: .65; transition: opacity .1s; position: relative; pointer-events: none; }
.opening-conversation .chat::after { content: "Cargando conversación…"; position: absolute; top: 8px; left: 50%; padding: 6px 12px; border-radius: 20px; background: #e7f1e2; color: #275b41; font-size: 12px; pointer-events: none; }

/* Payments remain in the conversation, with the order total visible before sending. */
.customer-panel-tabs { gap:16px; }
.chat-payment-feedback { margin:0; padding:12px 18px; font-size:12px; color:var(--green); border-bottom:1px solid var(--line); line-height:1.5; }
.chat-payment-heading { display:grid; gap:6px; margin-bottom:18px; }
.chat-payment-heading small, .chat-payment-total small { display:block; color:var(--muted); font-size:11px; font-weight:400; }
.chat-payment-total { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:15px 0; border-bottom:1px solid var(--line); margin-bottom:12px; }
.chat-payment-total strong { font-size:19px; }
.payment-guidance { padding:12px; background:var(--pale,#eef4e9); border-radius:8px; font-size:12px; line-height:1.6; }
.chat-payment-methods { display:grid; gap:12px; margin:18px 0; }
.chat-payment-card { border:1px solid var(--line); border-radius:10px; padding:14px; background:white; }
.chat-payment-card[draggable=true] { cursor:grab; }
.chat-payment-card[draggable=true]:hover { border-color:var(--green); }
.chat-payment-card-title { display:flex; gap:10px; align-items:center; }
.payment-method-symbol { display:grid; place-items:center; background:#edf4e9; color:var(--green); border-radius:8px; width:32px; height:32px; font-size:20px; flex:none; }
.chat-payment-card p { color:var(--muted); font-size:12px; line-height:1.6; margin:10px 0; }
.chat-payment-card small { color:var(--muted); font-size:11px; }
.chat-payment-card.disabled { background:#f7f8f5; }
.chat-payment-form { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.chat-payment-form label { width:100%; font-size:12px; }
.chat-payment-form input[type="number"] { width:100%; padding:9px; border:1px solid var(--line); border-radius:7px; }
.chat-payment-settings { display:block; text-align:center; font-size:12px; margin-top:18px; }
.payment-drop-hint { display:none; position:absolute; inset:8px; z-index:10; border:2px dashed var(--green); border-radius:12px; background:#f1f8eff2; color:var(--green); pointer-events:none; align-items:center; justify-content:center; flex-direction:column; gap:8px; text-align:center; padding:20px; }
.payment-drop-hint strong { font-size:18px; }
.payment-drop-hint span { font-size:12px; }
.payment-drag-ready .payment-drop-hint { display:flex; }
.payment-drag-over .payment-drop-hint { border-style:solid; background:#e2efdcf5; }

.customer-orders-workspace > .section-title { gap:10px; }
.order-workspace-section { margin-top:18px; border-top:1px solid var(--line); padding-top:14px; }
.order-workspace-section > summary { cursor:pointer; color:var(--green); font-weight:650; font-size:13px; margin-bottom:14px; }
.order-workspace-section .chat-payment-feedback { padding:0 0 12px; margin-bottom:14px; }
.order-workspace-section .order-summary { padding:16px 0 0; margin-top:16px; }
.customer-order-payment-summary { display:grid; gap:6px; margin:12px 0; font-size:12px; }
.customer-order-payment-summary > span { display:flex; justify-content:space-between; gap:8px; }
.order-payment-pending { color:#916126; }
.order-payment-paid { color:var(--green); }
.order-payment-neutral { color:var(--muted); font-size:11px; }
.order-payment-balances { display:grid; gap:8px; font-size:12px; margin:12px 0; }
.order-payment-balances > span { display:flex; justify-content:space-between; }
.chat-payment-history { margin:18px 0; font-size:12px; }
.chat-payment-history-row { display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); padding:12px 0; }
.chat-payment-history-row > span:last-child { text-align:right; }
.chat-payment-history-row small { display:block; color:var(--muted); margin-top:5px; }
.payment-summary-page { width:min(100%, 640px); margin:auto; }
.payment-summary-items { border-top:1px solid var(--line); margin-top:24px; }
.payment-summary-item { display:flex; justify-content:space-between; gap:16px; padding:16px 0; border-bottom:1px solid var(--line); }
.payment-summary-item small { display:block; margin-top:6px; }
.payment-summary-item b, .payment-summary-totals dd { white-space:nowrap; }
.payment-summary-totals { margin:24px 0; }
.payment-summary-totals > div { display:flex; justify-content:space-between; gap:16px; margin:12px 0; }
.payment-summary-totals dd { margin:0; }
.payment-summary-page .footnote { margin-top:16px; line-height:1.6; }

.payment-summary-page .banner { display:block; }

/* Facebook and Instagram comment threads */
.channel-filter.comments { color: #7a5a2b; }
.comment-origin { display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.comment-kind { flex-shrink: 0; border-radius: 4px; padding: 2px 5px; background: #f5ecdc; color: #7a5a2b; font-weight: 600; font-size: 9px; }
.comment-post { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fbfaf6; }
.comment-post img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex-shrink: 0; }
.comment-post-text { min-width: 0; font-size: 12px; }
.comment-post-text small { color: var(--muted); font-size: 10px; }
.comment-post-text p { margin: 4px 0 6px; line-height: 1.5; color: var(--ink); }
.comment-post-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; }
.comment-post-links a { color: var(--green); font-weight: 600; }
.comment-reply-label { font-size: 10px; font-weight: 600; color: #7a5a2b; margin-bottom: 6px; }

/* Deleted messages stay visible, crossed out */
.bubble.deleted { opacity: .72; border-style: dashed; }
.deleted-label { font-size: 10px; font-weight: 600; color: #9a4b32; margin-bottom: 6px; }
.deleted-body { text-decoration: line-through; color: var(--muted); }
.message-delete-form { display: inline-block; margin-top: 6px; }
.message-delete { background: transparent; border-color: transparent; color: #9a4b32; font-size: 10px; padding: 3px 6px; min-height: 0; }
.message-delete:hover { background: #fbeee8; border-color: #efd3c6; }

/* Chats waiting for an answer */
.chat-notifications.has-chats > summary { background: #fff4e6; border-color: #f0d2a8; color: #7a4a12; }
.chat-notifications.has-chats > summary b { background: #f6c982; color: #5a3408; }
.notification-hint { font-size: 10px; color: var(--muted); margin: -4px 0 8px; }
.desktop-alerts { margin: 8px 0 4px; }

/* Chats Gemini flagged for follow-up */
.tag.follow-up { background: #fdecd6; color: #8a4d0f; }
.tag.follow-up.urgent { background: #f9d9cf; color: #9a2f17; }
.tag.student { background: #e4eefc; color: #1f4f8f; }
.tag.job-seeker { background: #ece6fb; color: #4b2f8f; }
.student-menu > summary.student-on { background: #e4eefc; color: #1f4f8f; border-color: #bcd2f2; }
.student-form { width: 300px; }
.student-form form { display: grid; gap: 6px; }
.student-requests { display: grid; gap: 3px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.follow-up-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid #f0d8b4; background: #fff6ea; font-size: 12px; }
.follow-up-banner.urgent { background: #fdeee9; border-color: #f2cbbd; }
.follow-up-banner > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.follow-up-banner strong { color: #8a4d0f; }
.follow-up-banner.urgent strong { color: #9a2f17; }
.follow-up-banner small { font-size: 10px; color: var(--muted); }
.follow-up-banner form { flex-shrink: 0; }
.follow-up-notification.urgent strong span { color: #9a2f17; font-weight: 700; }

/* Store transfers */
.transfer-menu { position: relative; }
.transfer-menu > summary { list-style: none; cursor: pointer; }
.transfer-menu > summary::-webkit-details-marker { display: none; }
.transfer-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 270px; display: grid; gap: 6px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px #163a2622; font-size: 11px; }
.transfer-form label { font-weight: 600; margin-top: 4px; }
.transfer-form select, .transfer-form input[type=text] { font-size: 12px; padding: 8px; }
.transfer-form small { color: var(--muted); line-height: 1.5; }
.handoff-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid #cfdcef; background: #eef4fc; font-size: 12px; }
.handoff-banner > div, .handoff-banner:not(.suggestion) { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.handoff-banner strong { color: #24508a; }
.handoff-banner span, .handoff-banner small { color: var(--muted); font-size: 11px; }
.handoff-banner.suggestion { flex-direction: row; align-items: center; }
.handoff-banner form { flex-shrink: 0; }

/* Files attached to replies */
.composer-file { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.composer-file .attach-file { position: relative; overflow: hidden; cursor: pointer; }
.composer-file .attach-file input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.composer-file .attach-file:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
/* The camera button only where there is one to open: phones and tablets. */
.composer-file .take-photo { display: none; }
@media (pointer: coarse) { .composer-file .take-photo { display: inline-flex; } }
.attached-file { font-size: 11px; font-weight: 600; color: var(--green); background: #edf4ea; border-radius: 6px; padding: 4px 8px; max-width: 260px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.remove-file { min-height: 0; padding: 2px 7px; }
.file-hint { font-size: 10px; color: var(--muted); }
#reply-form.file-drag-over { outline: 2px dashed var(--green); outline-offset: 4px; border-radius: 8px; background: #f3f8f1; }
.file-problem { flex-basis: 100%; font-size: 11px; color: #9a4b32; }

/* Compact list header: more room for chats. */
.compact-inbox .list-head { padding: 10px 12px 8px; }
.compact-inbox .inbox-list-title { flex-wrap: nowrap; min-width: 0; }
.compact-inbox .inbox-list-title > strong { margin-right: 0; white-space: nowrap; font-size: 13px; }
.compact-inbox .inbox-list-title .inbox-live-status { flex: 1; min-width: 0; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9px; }
.compact-inbox .inbox-list-title .new-customer { min-height: 26px; padding: 3px 7px; }
.inbox-tabs-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 6px; border-bottom: 1px solid var(--line); }
.inbox-tabs-row .inbox-tabs { margin: 0; border-bottom: 0; gap: 12px; flex-shrink: 0; }
.inbox-tabs-row .inbox-tabs a { padding: 8px 0 7px; }
.inbox-tabs-row .store-filter { margin: 0 0 4px; min-width: 0; flex: 0 1 140px; }
.inbox-tabs-row .store-filter select { width: 100%; font-size: 10px; padding: 4px 6px; min-height: 0; border-radius: 6px; }
.compact-inbox .search { margin: 8px 0 6px; }
.compact-inbox .search input { padding: 7px 10px; font-size: 12px; }
.compact-inbox .channel-filters { margin-top: 0; gap: 4px; }
.compact-inbox .channel-filter { min-height: 30px; padding: 4px; }
.compact-inbox .channel-filter .channel-icon { width: 17px; height: 17px; }
/* Tighter rows */
.compact-inbox .chat-row { padding: 9px 12px; gap: 11px; }
.compact-inbox .preview { margin: 2px 0 4px; }
.compact-inbox .conversation-store { margin-top: 2px; }
.compact-inbox .chat-meta { min-height: 18px; margin-top: 2px; }
.compact-inbox .row-name { margin-bottom: 1px; }

/* Voice note transcripts */
.voice-transcript { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; }
.voice-transcript small { display: block; font-size: 9px; font-weight: 600; letter-spacing: .3px; color: var(--muted); margin-bottom: 2px; }
.voice-transcript.pending small { font-weight: 400; font-style: italic; }

/* The reply box grows with the text (autogrow controller) instead of staying two
   lines tall; on touch screens it starts bigger and uses 16px text, below which
   Safari zooms the page when the box is tapped. */
.composer textarea { height: auto; min-height: 60px; max-height: 40vh; }
@media (pointer: coarse), (min-width: 651px) and (max-width: 1179px) {
  .composer textarea { min-height: 110px; font-size: 16px; line-height: 1.45; }
}
@media (max-width: 650px) {
  .composer textarea { min-height: 90px; max-height: 35vh; }
}

.bot-blocked-icon { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; width:18px; height:18px; border-radius:5px; background:#fff1e8; color:#b0532a; vertical-align:middle; }
.bot-blocked-icon svg { width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.row-name .bot-blocked-icon { margin-right:auto; }
.chat-header .bot-blocked-icon { margin-left:6px; }

/* Short screens — a tablet in landscape, a small laptop. The header, the bot
   bar, its status and a reply box sized for touch left the conversation itself
   a sliver. Here they give the height back to the messages: the reply box starts
   at two lines (it still grows as you type), the hints that repeat on every
   chat are hidden (the file limits stay on the Adjuntar button's tooltip; a
   warning such as "no está conectada" stays), and
   a long bot status is cut to two lines. */
@media (min-width: 651px) and (max-height: 820px) {
  .chat-header { padding-top: 10px; padding-bottom: 10px; min-height: 58px; }
  .bot-toolbar { padding-top: 6px; padding-bottom: 6px; }
  .bot-status { padding: 6px 14px; }
  .bot-status small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .composer { margin: 8px 10px; padding: 8px 12px; }
  .composer-tabs { margin: -2px 0 6px; }
  .composer-tabs button { padding: 5px 0; }
  .composer-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .composer textarea { min-height: 48px; max-height: 28vh; padding: 6px 0; }
  .composer .file-hint, .composer .routine-hint { display: none; }
  .composer-file { margin-top: 2px; }
  .messages { padding-top: 14px; padding-bottom: 14px; }
}
