:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;color:#1b3b31;background:#f5f8f6}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #88baa0;outline-offset:2px}.hidden{display:none!important}.primary{background:#1b503f;border:1px solid #1b503f;color:#fff;border-radius:9px;padding:10px 16px;font-weight:700}.primary:hover{background:#2b6b53}.primary:disabled{opacity:.5;cursor:not-allowed}.secondary{background:#fff;border:1px solid #d9e5dd;color:#315c47;border-radius:9px;padding:9px 13px;font-weight:650}.secondary:hover{background:#f4faf6}.muted{color:#75897b}.error{color:#a94740;font-size:14px;min-height:20px}.login-shell{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 18% 5%,#dcefe2,transparent 32%),#f6f9f6}.login-card{width:min(100%,420px);padding:36px;background:#fff;border:1px solid #e1e9e3;border-radius:18px;box-shadow:0 20px 70px #153b2920}.brand{display:flex;gap:9px;align-items:center;font:23px Georgia,serif;letter-spacing:-.03em;white-space:nowrap}.brand i{font-size:14px;font-weight:400}.logo{color:#d3b179;border:1px solid #d3b179;border-radius:50%;display:grid;place-items:center;width:33px;height:33px;font-size:24px}.login-card h1{font:normal 33px Georgia,serif;margin:30px 0 10px}.login-card p{color:#728477;line-height:1.5;margin-bottom:25px}.login-card label,.agent-form label,.detail-field{display:grid;gap:7px;font-size:14px;color:#546f5d;font-weight:650;margin-bottom:15px}.login-card input,.agent-form input,.detail-field select,.detail-field textarea{border:1px solid #dce7de;border-radius:9px;padding:11px 12px;width:100%;background:#fff;color:#1b3b31}.login-card .primary{width:100%;margin:4px 0 12px}.app{display:grid;grid-template-columns:218px minmax(0,1fr);min-height:100vh}.sidebar{background:#17372e;color:#e8f3ea;padding:26px 16px;display:flex;flex-direction:column}.sidebar .brand{padding:4px 8px}.side-title{font-size:12px;color:#93af9c;letter-spacing:.1em;margin:43px 12px 13px}.nav{border:0;border-radius:9px;padding:12px 14px;background:transparent;text-align:left;color:#bbd2c2;font-size:14px;margin-bottom:4px}.nav.active,.nav:hover{background:#2d5442;color:#fff}.sidebar-foot{margin-top:auto;border-top:1px solid #3f624f;padding:18px 10px 3px;display:grid;gap:4px;font-size:14px}.sidebar-foot span{color:#a2bba8;font-size:13px}.logout{border:0;background:none;color:#d7e7dc;text-align:left;padding:11px 0 0}.main{min-width:0;padding:28px clamp(16px,3vw,44px) 42px}.header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:25px}.eyebrow{font-size:12px;font-weight:750;letter-spacing:.12em;color:#8ca091}.header h1{font:normal 34px Georgia,serif;margin:6px 0 0}.status{padding:8px 11px;border-radius:99px;border:1px solid #d9e5dd;color:#57715f;background:#fff;font-size:13px;font-weight:700;white-space:nowrap}.status.live{background:#e4f4e9;border-color:#cfe8d7;color:#26714b}.status.offline{background:#fff3e3;border-color:#efd9b7;color:#956728}.inbox{display:grid;grid-template-columns:minmax(340px,400px) minmax(300px,1fr) minmax(215px,275px);min-height:620px;height:calc(100vh - 145px);background:#fff;border:1px solid #e3ebe5;border-radius:16px;overflow:hidden;box-shadow:0 12px 38px #18452b0b}.chat-list{min-width:0;overflow-y:auto;overflow-x:hidden;border-right:1px solid #e8efe9}.list-head{display:flex;justify-content:space-between;align-items:center;padding:20px 17px 13px}.list-head span{font-size:13px;color:#84978a}.search{display:block;padding:0 14px 12px}.search input{width:100%;border:1px solid #dfe9e2;border-radius:9px;padding:10px 12px;background:#f8faf8}.chat-item{display:flex;gap:10px;width:100%;border:0;border-top:1px solid #f0f3f0;background:#fff;text-align:left;padding:15px 14px;color:#254939}.chat-item:hover,.chat-item.active{background:#ecf5ee}.avatar{width:38px;height:38px;flex:none;border-radius:50%;background:#e0ede2;color:#4b7053;display:grid;place-items:center;font-size:15px;font-weight:750}.chat-summary{min-width:0;flex:1}.chat-summary .line{display:flex;justify-content:space-between;gap:7px}.chat-summary strong{font-size:14px;min-width:0;overflow-wrap:anywhere;line-height:1.3}.chat-summary small{font-size:11px;color:#91a094}.chat-summary p{font-size:13px;color:#809184;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:5px 0}.tag{display:inline-block;font-size:11px;font-weight:750;border-radius:99px;padding:4px 7px;color:#427255;background:#e4f1e6}.conversation{display:flex;flex-direction:column;min-width:0}.conversation-head{display:flex;align-items:center;gap:10px;padding:15px 20px;border-bottom:1px solid #e8efe9}.conversation-head strong{display:block}.conversation-head small{color:#8da193}.messages{flex:1;overflow:auto;background:#f8faf8;padding:20px;display:flex;flex-direction:column;gap:12px}.bubble{max-width:82%;align-self:flex-start;background:#fff;padding:10px 13px;border-radius:13px;box-shadow:0 2px 8px #153f2c0c;line-height:1.45;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.out{align-self:flex-end;background:#e3f2e6}.bubble small{display:block;text-align:right;color:#93a599;font-size:11px;margin-top:5px}.composer{padding:13px;border-top:1px solid #e8efe9;display:flex;gap:8px}.composer textarea{flex:1;resize:none;min-height:43px;max-height:100px;border:1px solid #dce7de;border-radius:9px;padding:10px 12px}.details{padding:20px;overflow:auto;border-left:1px solid #e8efe9}.details h2{font:normal 23px Georgia,serif;margin:2px 0 8px}.details h3{font-size:14px;color:#426149;margin:23px 0 11px}.detail-field{margin-top:16px}.detail-field select{padding:9px}.detail-field textarea{min-height:70px;resize:vertical}.note{border-left:2px solid #bed9c5;padding:2px 0 2px 10px;margin:11px 0;color:#57715f;font-size:13px;line-height:1.45}.note small{display:block;color:#9bac9f;margin-top:4px}.empty{display:grid;place-content:center;text-align:center;flex:1;padding:25px;color:#7f9686}.empty strong{font:normal 22px Georgia,serif;color:#3e664c}.empty p{max-width:260px;font-size:14px;line-height:1.5}.empty-icon{font-size:35px;color:#9bc1a7;margin-bottom:12px}.empty.small{font-size:13px}.content-card{background:#fff;border:1px solid #e3ebe5;border-radius:16px;padding:28px;max-width:850px;box-shadow:0 12px 38px #18452b0b}.card-head{display:flex;align-items:center;gap:16px;margin-bottom:24px}.card-head h2{font:normal 27px Georgia,serif;margin:0 0 5px}.card-head p{color:#829488;margin:0;font-size:14px}.symbol{display:grid;place-items:center;width:48px;height:48px;border-radius:12px;background:#e4f1e7;color:#3c7152;font-size:25px}.connection-state{border:1px solid #e6ece7;border-radius:12px;padding:20px;background:#f9fbf9}.connection-state h3{margin:0 0 8px;font-size:17px}.connection-state p{color:#718878;font-size:14px;line-height:1.55}.qr{display:block;max-width:320px;width:100%;height:auto;padding:8px;margin:20px 0;background:#fff;border:1px solid #e1e9e3;border-radius:10px}.help{margin-top:20px;font-size:14px;color:#4e7159}.help li{margin:7px 0}.team-row{display:flex;justify-content:space-between;border-bottom:1px solid #ebf0ec;padding:12px 3px;gap:10px}.team-row small{color:#84998a}.agent-form{border-top:1px solid #e5ece6;margin-top:25px;padding-top:20px;max-width:420px}.agent-form h3{font-size:17px}.toast{position:fixed;right:20px;bottom:20px;background:#1d4836;color:#fff;border-radius:9px;padding:10px 15px;box-shadow:0 10px 30px #17402935;opacity:0;pointer-events:none;transition:opacity .2s}.toast.show{opacity:1}@media(max-width:1150px){.inbox{grid-template-columns:minmax(260px,min(32vw,360px)) minmax(0,1fr)}.details{grid-column:1/-1;border-left:0;border-top:1px solid #e8efe9;max-height:250px}.inbox{height:auto;min-height:670px}.messages{min-height:400px}}@media(max-width:750px){.app{display:block}.sidebar{padding:11px 15px;display:block}.sidebar .brand{display:none}.side-title,.sidebar-foot{display:none}.nav{display:inline-block;margin:0 3px 0 0;padding:10px 8px}.main{padding:20px 12px}.header h1{font-size:27px}.header{align-items:flex-start}.status{font-size:11px;max-width:135px;white-space:normal}.inbox{display:block}.chat-list{border-right:0;border-bottom:1px solid #e8efe9;max-height:240px}.conversation{min-height:460px}.messages{min-height:300px}.details{max-height:none}.content-card{padding:20px}}

/* Keep the reply box visible when a conversation has a long history. */
.inbox{grid-template-rows:minmax(0,1fr)}
.conversation{min-height:0;overflow:hidden}
.messages{min-height:0;overflow-y:auto}
.composer{flex-shrink:0}
@media(max-width:1150px){
  .inbox{height:calc(100vh - 145px);grid-template-rows:minmax(0,1fr) 220px}
  .messages{min-height:0}
}
@media(max-width:750px){
  .inbox{height:auto;min-height:0}
  .conversation{height:min(65vh,600px);min-height:420px}
  .messages{min-height:0}
}

/* Media attachments in the conversation and composer. */
.chat-media{display:block;max-width:min(300px,100%);max-height:320px;border-radius:9px;object-fit:contain;margin-bottom:6px}
.chat-audio{display:block;max-width:100%;width:270px;margin-bottom:6px}
.audio-transcription{max-width:360px;margin:3px 0 8px;padding:8px 10px;border-radius:8px;background:#f0f6f1;color:#345b42;font-size:13px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.media-link{display:block;margin:3px 0 7px;color:#246b47;text-decoration:underline;overflow-wrap:anywhere}
.composer{flex-wrap:wrap;align-items:center}
.composer textarea{flex:1 1 160px;min-width:0}
.composer #attachButton{white-space:nowrap;padding:10px}
.composer #productPhotosButton{white-space:nowrap;font-size:12px;padding:10px}
.product-photos-panel{flex-basis:100%;display:flex;align-items:end;gap:8px;flex-wrap:wrap;padding:12px;border:1px solid #dbe9de;border-radius:9px;background:#f7faf7}
.product-photos-panel label{display:grid;gap:5px;min-width:min(100%,220px);flex:1;font-size:12px;font-weight:700;color:#426149}
.product-photos-panel select{max-width:100%;border:1px solid #dce7de;border-radius:8px;padding:9px;background:#fff;color:#1b3b31}
.product-photos-panel #productPhotosHint{flex-basis:100%;font-size:12px;color:#58735e}
.pending-file{flex-basis:100%;font-size:12px;color:#426b51;overflow-wrap:anywhere}
.pending-file:empty{display:none}
.pending-file button{border:0;background:transparent;color:#6b3a3a;font-size:18px;cursor:pointer;margin-left:8px}

.search-notice{margin:0 14px 10px;font-size:12px;font-weight:800;letter-spacing:.03em;color:#62776a}
.search-notice:empty{display:none}
.search-notice.found{color:#237449}
.search-notice.not-found{color:#a25324}
.new-chat-actions{display:flex;gap:7px;flex-wrap:wrap}
.new-chat-actions button{font-size:12px;padding:8px 10px}
.compose-hint{flex-basis:100%;color:#829486;font-size:11px;text-align:right}
.file-preview{position:fixed;inset:0;z-index:10;display:grid;place-items:center;padding:16px;background:#13291ec9}
.file-preview-card{width:min(100%,460px);max-height:90vh;overflow:auto;background:#fff;border-radius:15px;padding:24px;box-shadow:0 20px 70px #122d2490}
.file-preview-card h2{font:normal 25px Georgia,serif;margin:0 0 18px}
.file-preview-body{display:grid;gap:5px;min-width:0;background:#f7faf7;border:1px solid #e5eee7;border-radius:10px;padding:12px;margin-bottom:16px;overflow-wrap:anywhere}
.file-preview-body small{color:#75897b}
.file-preview-media{display:block;max-width:100%;max-height:270px;margin:12px auto 0;object-fit:contain;border-radius:8px}
.file-preview-card label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#506c58}
.file-preview-card textarea{width:100%;min-height:72px;resize:vertical;border:1px solid #dce7de;border-radius:8px;padding:10px}
.file-preview-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
.note-body{white-space:pre-wrap;overflow-wrap:anywhere}
.note-actions{display:flex;gap:6px;margin-top:8px}
.note-actions button{padding:5px 8px;font-size:11px}
.toast{z-index:11}
.shopify-search{display:grid;gap:7px;color:#546f5d;font-size:14px;font-weight:650;margin-bottom:18px}
.shopify-search input{border:1px solid #dce7de;border-radius:9px;padding:11px 12px;width:100%;min-width:0}
.shopify-orders,.shopify-chat-orders{display:grid;gap:12px}
.shopify-order{border:1px solid #e1eae3;border-radius:11px;padding:14px;overflow-wrap:anywhere;background:#fafcfb}
.shopify-order-head{display:flex;justify-content:space-between;gap:8px;align-items:center}
.shopify-order-head small{color:#819987;font-size:11px;text-align:right}
.shopify-order p{margin:8px 0;font-size:13px;line-height:1.45;color:#4b6754}
.shopify-order button{font-size:12px}
.shopify-chat-orders .shopify-order{padding:10px}
.tracking-feedback{font-size:12px;color:#5d8068;margin:8px 0 20px;line-height:1.4}
.inbox-tabs{display:flex;gap:6px;flex-wrap:wrap;padding:0 14px 12px}
.inbox-tab{flex:none;border:1px solid #dce7de;background:#fff;color:#476855;border-radius:8px;padding:7px 9px;font-size:12px;font-weight:700}
.inbox-tab.active{background:#dff1e3;border-color:#aed3b6;color:#1e5739}
.inbox-tab span{font-size:11px;color:#799583;margin-left:3px}
.follow-up-tag{background:#fff1d8;color:#925e16;margin-left:5px}
.agent-tag{display:inline-block;color:#7b9381;font-size:11px;margin-left:6px}
.follow-up-field{display:flex;align-items:flex-start;gap:9px;padding:12px;background:#fff9ed;border:1px solid #f1dfb8;border-radius:10px;margin:17px 0 12px;cursor:pointer}
.follow-up-field input{margin-top:3px;accent-color:#ab7928}
.follow-up-field strong{display:block;font-size:13px;color:#735528}
.follow-up-field small{display:block;margin-top:4px;line-height:1.4;font-size:11px;color:#8b7958}
.claim-chat{width:100%;margin-top:15px}
.nav-count{display:inline-block;min-width:20px;text-align:center;border-radius:20px;background:#42684e;color:#fff;font-size:11px;padding:2px 5px;margin-left:4px}
.nav.active .nav-count{background:#dceee0;color:#28573d}
.stage-filter{display:grid;gap:5px;padding:0 14px 10px;color:#6c8473;font-size:12px;font-weight:700}
.stage-filter select{width:100%;padding:8px 9px;border:1px solid #dfe9e2;border-radius:8px;background:#fff;color:#31543d;font-size:12px}
.chat-summary .tag{margin:2px 4px 2px 0;white-space:normal}
.order-tag{background:#e9eaf8;color:#4a5481}
.shipping-tag{background:#e5f3f9;color:#2e6b81}
.delivery-indicator{color:#6e9579;font-weight:650}
.delivery-indicator.read{color:#2885aa}
.composer #quickToggle{font-size:12px;padding:9px}
.quick-panel{flex-basis:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px;max-height:245px;overflow:auto;padding:9px;background:#f7faf8;border:1px solid #e3ede5;border-radius:9px}
.quick-card{background:#fff;border:1px solid #e1ebe3;border-radius:8px;padding:10px;min-width:0}
.quick-card strong,.quick-card small{display:block;font-size:12px}
.quick-card small{color:#7c8f81;margin-top:3px}
.quick-card p{font-size:12px;color:#5f7765;white-space:pre-wrap;overflow-wrap:anywhere;max-height:52px;overflow:hidden}
.quick-card img{max-width:100%;height:75px;object-fit:contain;margin-top:6px}
.quick-card button{font-size:12px;padding:7px 9px}
.reply-template-form{border-top:0;margin-top:0;padding-top:0;max-width:620px}
.reply-template-form select,.reply-template-form textarea{width:100%;border:1px solid #dce7de;border-radius:9px;padding:10px 12px;background:#fff;color:#1b3b31}
.reply-template-form textarea{min-height:100px;resize:vertical}
.reply-template-form .hidden{display:none}
.reply-template-list{border-top:1px solid #e5ece6;margin-top:22px;padding-top:15px;display:grid;gap:12px}
.reply-template-card{display:flex;gap:14px;padding:12px;border:1px solid #e0ebe3;border-radius:10px;overflow-wrap:anywhere}
.reply-template-card img,.reply-template-card video{width:100px;height:100px;object-fit:contain;flex:none}
.reply-template-card small{display:block;color:#708978;margin-top:4px}
.reply-template-card p{font-size:13px;white-space:pre-wrap}
.reply-template-card button{font-size:12px}
.reply-template-card .danger{color:#a13d3d}
.chat-phone{display:block;color:#5d7c69;font-size:11px;margin-top:3px}
.details .detail-field input{border:1px solid #dce7de;border-radius:9px;padding:10px 12px;width:100%;background:#fff;color:#1b3b31}
.details .detail-field small{font-weight:400;line-height:1.4;color:#7c9081}
.stage-nuevo{--stage-bg:#e2efff;--stage-fg:#1e538e;--stage-border:#a9c8ed}
.stage-por_confirmar{--stage-bg:#fff2cd;--stage-fg:#79540b;--stage-border:#e7ce83}
.stage-adelanto_pendiente{--stage-bg:#dff5e5;--stage-fg:#245c3c;--stage-border:#aadbb9}
.stage-confirmado{--stage-bg:#16543f;--stage-fg:#fff;--stage-border:#0e3d2e}
.stage-subido_a_ruta_contraentrega,.stage-subido_a_agencia{--stage-bg:#e5ddfa;--stage-fg:#513885;--stage-border:#bbaae5}
.stage-entregado{--stage-bg:#d0efe9;--stage-fg:#146858;--stage-border:#83c9b9}
.stage-oferta_enviada_cancelado{--stage-bg:#fff0dc;--stage-fg:#92501b;--stage-border:#ecc18a}
.stage-cancelado{--stage-bg:#e8eae9;--stage-fg:#4b5a51;--stage-border:#c7ceca}
.stage-unclassified{--stage-bg:#f6e9db;--stage-fg:#82522c;--stage-border:#e0c6a9}
.chat-summary .order-tag,.detail-field .stage-select{background:var(--stage-bg);color:var(--stage-fg);border:1px solid var(--stage-border);font-weight:750}
.stage-history{display:grid;gap:8px;margin:10px 0 20px}
.stage-history-entry{display:grid;gap:3px;padding:9px 11px;background:#f5f8f5;border-left:3px solid #9bbdac;border-radius:7px;font-size:12px}
.stage-history-entry small{color:#60796a;line-height:1.4}
.chat-link-section{margin:16px 0;padding:12px;background:#f7faf8;border:1px solid #d5e8da;border-radius:10px}
.chat-link-section h3{margin:0 0 8px}
.chat-link-section .muted{font-size:12px}
.linked-banner{padding:9px 0;font-size:12px;line-height:1.5;border-bottom:1px solid #dce9df}
.linked-banner button{font-size:11px;margin:4px 4px 0 0;padding:5px 7px}
.chat-link-panel{display:grid;gap:9px;margin-top:12px}
.chat-link-panel label{display:grid;gap:5px;font-size:12px;font-weight:700}
.chat-link-panel input[type=search]{width:100%;padding:8px;border:1px solid #dce7de;border-radius:8px}
.chat-link-panel #linkChatChoice{display:grid;gap:7px;padding:10px;background:white;border-radius:8px}
.chat-link-panel #linkChatChoice label{display:block;font-weight:500}
.chat-link-panel #linkChatChoice input{margin-right:6px}
.chat-link-panel small,.link-history small{display:block;font-size:11px;color:#66806d}
.link-candidate{display:block;width:100%;text-align:left;padding:8px;margin:3px 0;border:1px solid #dce7de;border-radius:8px;background:white;color:#31543d;cursor:pointer}
.link-candidate:hover{background:#eaf5ec}
.link-history{display:grid;gap:4px;margin-top:10px}
.nav.subnav{margin-left:18px;padding:8px 10px;font-size:12px;color:#c0d7c8}
.offer-alert{background:#ffe5b5;color:#854713;border:1px solid #e4b56e}
.offer-reply-banner{padding:11px 13px;margin:12px 0;background:#fff3db;border-left:4px solid #d99035;border-radius:8px;font-size:13px;color:#824b1c;line-height:1.5}
.follow-up-day-field{padding:10px;border:1px solid #b8d9c5;border-radius:9px;background:#f4faf5}
.phone-link{margin-top:16px;padding:12px;border:1px solid #dce9df;background:#f7faf7;border-radius:10px}
.phone-link .detail-field{margin:0 0 8px}
.phone-link button{font-size:12px}
.reminder-field{margin:6px 0 18px;padding:12px;border:1px solid #b8d9c5;border-radius:10px;background:#f1faf3;color:#245c3c}
.chat-item.reminder-overdue{background:#fff4f0;border-left:4px solid #c1553b;padding-left:10px}
.chat-item.reminder-overdue.active,.chat-item.reminder-overdue:hover{background:#ffeae4}
.reminder-time{display:block;margin-top:6px;font-size:12px;font-weight:700;color:#477653}
.reminder-time.late{color:#a63c28}
.inbox.confirmed-mode{grid-template-columns:minmax(340px,410px) minmax(320px,1fr) minmax(215px,275px)}
.shipping-date-filter{padding:0 14px 12px}.shipping-date-filter label{display:grid;gap:5px;font-size:11px;font-weight:700;color:#5d7a64}.shipping-date-filter input{min-width:0;width:100%;padding:8px 7px;border:1px solid #dce7de;border-radius:8px;background:#fff;color:#254939;font-size:12px}
.confirmed-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 14px 12px}
.confirmed-filters label{display:grid;gap:5px;font-size:11px;font-weight:700;color:#5d7a64}
.confirmed-filters input,.confirmed-filters select{min-width:0;width:100%;padding:8px 7px;border:1px solid #dce7de;border-radius:8px;background:#fff;color:#254939;font-size:12px}
.confirmed-filters #downloadRouteExcel,.confirmed-filters #downloadAgencyExcel{align-self:end;font-size:12px;padding:9px 7px}
.export-feedback{grid-column:1/-1;font-size:12px;line-height:1.4;color:#6f5136}
.export-feedback:empty{display:none}
.confirmed-data{display:grid;gap:5px;margin:10px 0 4px;padding:9px;border-radius:8px;background:#f5f8f5;font-size:12px;line-height:1.35}
.confirmed-data span{display:grid;grid-template-columns:70px minmax(0,1fr);gap:7px;overflow-wrap:anywhere}
.confirmed-data b{color:#627b68}
.download-status{display:grid;gap:9px;margin:14px 0;padding:11px;border:1px solid #c8decf;border-radius:9px;background:#f1f9f3;color:#315d41;font-size:12px;font-weight:700}
.download-status button{justify-self:start;font-size:12px}
.total-field{margin-bottom:7px}
.reset-total{font-size:12px;margin-bottom:16px}
@media(max-width:1150px){.inbox.confirmed-mode{grid-template-columns:minmax(260px,min(32vw,370px)) minmax(0,1fr)}}
@media(max-width:750px){.inbox.confirmed-mode{display:block}.confirmed-filters{grid-template-columns:1fr 1fr}}

/* Atención por chat: selector fijo junto al nombre y número. */
.conversation-head{flex-wrap:wrap;min-width:0}
.conversation-identity{min-width:0;flex:1 1 150px;overflow-wrap:anywhere}
.mode-control{display:grid;gap:5px;margin-left:auto;flex:none}
.mode-control>span{font-size:11px;font-weight:750;color:#5c7562}
.mode-choices{display:flex;gap:4px;padding:3px;border:1px solid #cbded0;border-radius:9px;background:#f4f8f4}
.mode-choice{border:0;border-radius:6px;background:transparent;color:#476a52;padding:6px 9px;font-size:12px;font-weight:750}
.mode-choice.active[data-mode=agente]{background:#dfe9fa;color:#375c91}
.mode-choice.active[data-mode=humano]{background:#1b503f;color:#fff}
.mode-choice:disabled{opacity:.55;cursor:not-allowed}
.mode-choice.active:disabled{opacity:1}
.human-alert{flex:none;padding:9px 20px;background:#fff2d8;color:#855320;font-size:12px;font-weight:750;border-bottom:1px solid #f0d6a6}
.advisor-agent-block{flex:none;padding:9px 20px;background:#fcebe7;color:#813f36;font-size:12px;font-weight:750;border-bottom:1px solid #eec9c2}
.chat-item .avatar{position:relative}
.unread-badge{position:absolute;top:-8px;right:-11px;min-width:20px;height:20px;padding:0 5px;border-radius:12px;display:grid;place-items:center;background:#217a51;color:#fff;font-size:11px;font-weight:800;box-shadow:0 0 0 2px #fff}
.chat-resolution{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0;color:#526e5a;font-size:13px}
.chat-resolution button{font-size:12px}
.chat-item.human-chat{border-left:4px solid #df9938;padding-left:10px}
.human-mode-tag{background:#fff0cf;color:#86531d;border:1px solid #e8c37a}
.agent-mode-tag{background:#e2edfa;color:#3c6290}
.unselected-mode-tag{background:#f1f2ee;color:#657266}
.handoff-panel{padding:12px;margin:14px 0;background:#fff8e8;border:1px solid #f0d7aa;border-radius:10px;color:#6e532c;font-size:12px;line-height:1.45}
.handoff-panel strong{display:block;margin-bottom:5px}
.handoff-panel p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:750px){.mode-control{margin-left:0;flex:1 1 100%;padding-left:48px}.mode-choices{width:max-content}}
.handoff-panel textarea{width:100%;min-height:75px;resize:vertical;padding:9px;border:1px solid #e6cfaa;border-radius:8px;background:#fff;color:#3a513e;font-size:12px}
.handoff-panel button{display:block;margin:8px 0;font-size:12px}
.handoff-panel small{color:#7b765f}

.stage-confirmado_por_asesora{--stage-bg:#624c90;--stage-fg:#fff;--stage-border:#513c80}

/* Shopify intake table and confirmation settings. */
.shopify-page{max-width:none;min-width:0}
.shopify-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}
.shopify-filters{display:grid;grid-template-columns:repeat(3,minmax(145px,1fr)) minmax(220px,2fr);gap:10px;margin-bottom:18px}
.shopify-filters label,.config-editor label{display:grid;gap:6px;font-size:12px;font-weight:700;color:#54705c}
.shopify-filters input,.shopify-filters select,.config-editor textarea,.config-editor input[type=file]{width:100%;min-width:0;border:1px solid #dce7de;border-radius:9px;padding:9px 10px;background:#fff;color:#1b3b31}
.shopify-table-wrap{width:100%;overflow-x:auto;border:1px solid #e1ebe3;border-radius:11px}
.shopify-table{border-collapse:collapse;min-width:1900px;width:100%;font-size:12px}
.shopify-table th,.shopify-table td{padding:11px 10px;text-align:left;border-bottom:1px solid #ebf0ec;vertical-align:top;max-width:220px;overflow-wrap:anywhere}
.shopify-table th{position:sticky;top:0;background:#edf5ef;color:#365f45;font-size:11px;white-space:nowrap;z-index:1}
.shopify-table tr:last-child td{border-bottom:0}
.shopify-table tr.shopify-late{background:#fff2dc}
.shopify-table tr:hover{background:#f5faf6}
.shopify-table tr.shopify-late:hover{background:#ffebc9}
.shopify-table .zone-select{font-size:12px;max-width:145px;border:1px solid #d5e5da;border-radius:7px;padding:6px}
.shopify-state{display:inline-block;padding:5px 8px;border-radius:30px;background:#f0f1ef;white-space:nowrap;font-weight:700}
.shopify-state.contactado{background:#e5efff;color:#27578f}.shopify-state.confirmado{background:#dcf3e5;color:#266444}.shopify-state.cancelado{background:#f4e7e5;color:#854542}
.shopify-action{font-size:11px;padding:7px 10px;min-width:118px}
.shopify-empty{text-align:center!important;padding:30px!important;color:#75897b}
.shopify-pagination{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:16px;font-size:12px;color:#637a69}
.shopify-pagination button{font-size:12px}
.shopify-preview-card{width:min(100%,560px)}
#shopifyPreviewImage img{display:block;max-width:100%;max-height:210px;object-fit:contain;margin:0 auto 16px;border-radius:8px}
#shopifyPreviewImage{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;max-height:42vh;overflow:auto;margin:12px 0}
.shopify-preview-photo{border:1px solid #e7eee8;border-radius:8px;padding:9px;min-width:0}
.shopify-preview-photo strong{display:block;font-size:12px;overflow-wrap:anywhere;margin-bottom:8px}
.shopify-preview-photo small{display:block;line-height:1.35}
#shopifyPreviewText{min-height:145px;white-space:pre-wrap}
.config-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:15px;font-size:12px;color:#607b65}
.config-product{display:grid;grid-template-columns:minmax(0,1fr) 130px auto auto;align-items:center;gap:12px;border-bottom:1px solid #e7eee8;padding:11px 4px;font-size:13px}
.config-product span small{display:block}
.config-product small{color:#768e7d}.config-product button{font-size:12px}
.config-editor{padding:20px;border:1px solid #cfe2d3;border-radius:12px;background:#fafcfb;margin-top:22px;max-width:670px}
.config-editor h3{margin:0 0 15px}.config-editor label{margin:12px 0}.config-editor textarea{min-height:130px;resize:vertical;font-size:14px}
.config-editor .config-remove{display:flex;align-items:center;font-weight:500}.config-editor input[type=checkbox]{width:auto}
#configImagePreview img{max-width:240px;max-height:170px;object-fit:contain;border-radius:8px}
.config-text-preview{background:#fff;padding:13px;border-radius:8px;border:1px solid #e1ece3;white-space:pre-wrap;font-size:13px;line-height:1.5}
@media(max-width:900px){.shopify-filters{grid-template-columns:repeat(2,minmax(140px,1fr))}}
@media(max-width:550px){.shopify-filters{grid-template-columns:1fr}.config-product{grid-template-columns:1fr auto auto}.config-product>small{grid-column:1/-1;grid-row:2}.config-product button{grid-row:3}}
.cart-product{border:1px solid #dbe5e0;border-radius:12px;padding:16px;margin:14px 0;background:#fff}
.cart-product-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.cart-product-head strong small{font-weight:normal;color:#687a71}
.cart-slots{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px}
.cart-slot{border:1px solid #dbe5e0;border-radius:10px;padding:10px;display:flex;flex-direction:column;gap:8px;min-width:0}
.cart-slot img,.cart-placeholder{width:100%;height:135px;object-fit:contain;background:#f4f7f5;border-radius:7px}
.cart-placeholder{display:grid;place-items:center;color:#87978e}
.cart-slot-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:auto}
@media(max-width:850px){.cart-slots{grid-template-columns:repeat(2,minmax(130px,1fr))}}
@media(max-width:480px){.cart-slots{grid-template-columns:1fr 1fr}.cart-slot img,.cart-placeholder{height:95px}}

.connection-reconnect{display:grid;justify-items:start;gap:9px;border-top:1px solid #e1e9e3;padding-top:18px;margin-top:22px}.connection-reconnect small{font-size:12px;color:#6a806f;line-height:1.5}

.team-actions,.team-form-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.team-row{align-items:center}.team-actions .secondary{padding:6px 10px}@media(max-width:500px){.team-row{flex-wrap:wrap}}
