/* Live chat fills the screen and uses Inter throughout. */
body.with-app-bar[data-route=chat]{padding-top:0}
body.with-app-bar[data-route=chat] #app-bar,body.with-app-bar[data-route=chat] #page-header{display:none}
body.with-app-bar[data-route=chat] .workspace{height:100dvh;min-height:0;margin-left:0}
body[data-route=chat],body[data-route=chat] *,.sales-chat *{font-family:var(--font-inter)!important}
body[data-route=chat] .backdrop{top:0}
body[data-route=chat] .support-layout{grid-template-columns:75px 305px minmax(0,1fr) 186px 260px}
body[data-route=chat] .support-person strong{font-size:13px}
body[data-route=chat] .support-bubble p{font-size:13px;line-height:1.5}
body[data-route=chat] .support-composer-area textarea{font-size:13px;line-height:1.5}
body[data-route=chat] .support-client{padding-top:0}
body[data-route=chat] .support-client>.support-rail-heading{height:34px;min-height:34px;padding:0 12px;font-size:9px;letter-spacing:.8px}
body[data-route=chat] .support-client .client-profile{min-height:72px;padding:10px 12px;gap:10px}
body[data-route=chat] .support-client .client-profile .support-avatar{width:38px;height:38px;flex-basis:38px}
body[data-route=chat] .support-client .client-profile-name{display:flex;align-items:center;gap:6px}
body[data-route=chat] .client-profile-name strong{font-size:13px}
body[data-route=chat] .client-profile-name .icon-btn{width:22px;height:22px;padding:3px;background:transparent;border:0}
body[data-route=chat] .client-profile-name .icon-btn .icon{width:13px;height:13px}
body[data-route=chat] .client-profile-phone{font-size:11px}
body[data-route=chat] .support-client .rail-section{padding:13px 11px}
body[data-route=chat] .support-client .rail-section>summary{font-family:var(--font-inter);font-size:9px;font-weight:650;letter-spacing:.65px;margin-bottom:11px}
body[data-route=chat] .support-client .ticket-facts{gap:4px}
body[data-route=chat] .support-client .ticket-fact{min-height:30px;padding:5px 7px}
body[data-route=chat] .support-client .ticket-fact span{font-size:8px}
body[data-route=chat] .support-client .ticket-fact strong{font-size:9px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body[data-route=chat] .support-client .ticket-fact-wide{grid-column:1/-1;display:flex;flex-direction:column;min-height:28px}
body[data-route=chat] .ticket-fact-origin a{color:#00bca4;text-decoration:underline}
body[data-route=chat] .support-client .memory-section .rail-card{min-height:0;padding:12px 10px;border-radius:9px}
body[data-route=chat] .support-client .rail-card>h3{font-size:9px;margin:0 0 12px}
body[data-route=chat] .support-client .sales-data{padding:9px 8px}
body[data-route=chat] .support-client .sales-data strong{font-size:14px;overflow-wrap:anywhere}
body[data-route=chat] .support-client .sales-data>div{gap:8px;font-size:9px}
body[data-route=chat] .support-client .sales-empty{min-height:40px;margin:8px 0 0;font-size:9px}
body[data-route=chat] .support-client [data-action=schedule-message]{min-height:31px;font-size:10px}
body[data-route=chat] .support-client .notes-section textarea{min-height:57px;font-size:10px;padding:9px;resize:vertical}
body[data-route=chat] .notes-section .rail-empty{display:none}
body[data-route=chat] .notes-section .note-save{display:none}
body[data-route=chat] .notes-section form:has(textarea:not(:placeholder-shown)) .note-save{display:inline-flex}
body[data-route=chat] .support-client .client-shipping-action{min-height:32px;font-size:10px}
body[data-route=chat] .support-client .order-section{padding:13px 11px}
body[data-route=chat] .order-section .picker{width:100%}
body[data-route=chat] .order-section .picker-trigger{width:100%;min-height:30px;font-size:10px;background:var(--panel);border:1px solid var(--line)}
body[data-route=chat] .client-order-review{width:100%;margin-top:7px;min-height:31px;border:1px solid #cc28404d;border-radius:6px;color:#ed6559;background:#cc28400a;font-size:10px;font-weight:650}
.client-payment-list{display:grid;margin-top:10px;gap:5px}
.client-payment-list button{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px;background:transparent;color:var(--muted);font-size:10px}
.client-payment-list button strong{color:#00bca4}

/* Compact calendar filters, including the two-date range used in Sales. */
.date-filter-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:34px;padding:7px 11px;border:1px solid var(--line);border-radius:7px;color:var(--text);background:var(--panel);font-size:11px;font-weight:600;white-space:nowrap}
.date-filter-button>.icon{width:14px;height:14px;color:#00bba1}
.date-filter-button>.icon:last-child{width:11px;height:11px;color:var(--muted)}
.date-filter-button:focus-visible{outline:2px solid #18afe9;outline-offset:2px}
body[data-route=chat] .support-inbox-filters>.date-filter-button{grid-column:span 2;width:100%;min-width:0;min-height:29px;font-size:10px;justify-content:flex-start}
body[data-route=chat] .date-filter-button>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
body[data-route=chat] .date-filter-button>.icon:last-child{margin-left:auto}
.activity-calendar{position:fixed;inset:auto;margin:0;z-index:160;box-sizing:border-box;padding:9px;background:#201f22;border:1px solid #3e3c43;color:#f5f4f8;border-radius:14px;box-shadow:0 12px 32px #0005;overflow:auto;font-family:var(--font-system)}
.activity-calendar.range-calendar{display:grid;grid-template-columns:148px minmax(0,1fr);padding:10px}
.calendar-shortcuts{display:flex;flex-direction:column;padding:6px 12px 6px 3px;border-right:1px solid #36343b}
.calendar-shortcuts h3{font-size:9px;color:#949199;font-weight:750;margin:0 0 8px;padding:4px 7px}
.calendar-shortcuts button{background:transparent;color:#dedce2;text-align:left;padding:9px 8px;border:0;border-radius:6px;font-size:12px;font-weight:600;white-space:nowrap}
.calendar-shortcuts button:hover{background:#ffffff09;color:#18baf2}
.calendar-month{padding:1px 5px;min-width:0}
.range-calendar .calendar-month{padding-left:12px}
.calendar-month>header{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:39px}
.calendar-month>header strong{font-size:13px;text-transform:capitalize;white-space:nowrap}
.calendar-month>header button{display:grid;place-items:center;width:29px;height:29px;background:transparent;color:#f1eef6;border-radius:6px}
.calendar-month>header .icon{width:15px;height:15px}
.calendar-weekdays,.calendar-day-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}
.calendar-weekdays{margin:7px 0 5px;color:#99969f;font-size:10px;font-weight:650;text-align:center}
.calendar-day-grid button{min-width:0;min-height:31px;padding:6px 2px;border-radius:6px;background:transparent;color:#f1edf8;font-size:12px;line-height:1.2;border:1px solid transparent}
.calendar-day-grid button.outside,.calendar-day-grid button:disabled{color:#66616d}
.calendar-day-grid button:not(:disabled):hover,.calendar-month>header button:hover{background:#ffffff0c;color:#18baf2}
.calendar-day-grid button.in-range{background:#18afe919;border-radius:0}
.calendar-day-grid button.selected{background:#18afe9;color:#fff;font-weight:750}
.calendar-day-grid button[aria-current=date]:not(.selected){border-color:#18afe959}
.calendar-day-grid button:focus-visible{outline:2px solid #78dbff;outline-offset:-2px}
.calendar-month>footer{display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap;padding:15px 4px 9px;color:#aaa4b2;font-size:10px;text-align:center}
.calendar-month>footer button{background:transparent;color:#18baf2;font-size:10px;text-decoration:underline}

/* Sales keeps the status controls, table, case and conversation in one workspace. */
body[data-route=ventas]{--section-accent:#00b69d;overflow:hidden}
body.with-app-bar[data-route=ventas] .workspace{height:calc(100dvh - var(--app-bar-height));min-height:0;display:flex;flex-direction:column}
body[data-route=ventas]:not([data-flow-editor=true]) #page-header{display:grid;grid-template-columns:265px minmax(0,1fr);align-items:center;gap:16px;min-height:100px;padding:10px 14px;border-bottom:1px solid var(--line)}
body[data-route=ventas] #page-header .section-title{align-self:start;margin-top:4px}
body[data-route=ventas] #page-header .section-title h1{font-size:20px!important}
body[data-route=ventas] #page-header .section-title p{font-size:11px;line-height:1.45}
body[data-route=ventas] #page-content{flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden}
.sales-header-controls{display:flex;flex-direction:column;gap:8px;min-width:0}
.sales-control-row,.sales-search-row{display:flex;align-items:center;gap:6px;min-width:0}
.sales-control-row{flex-wrap:wrap}
.sales-status-tabs{display:flex;align-items:center;gap:5px;min-width:0}
.sales-status-tabs button,.sales-control-row>.btn{display:flex;align-items:center;gap:6px;min-height:29px;padding:6px 9px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--muted);font-size:10px;line-height:1.25;font-weight:650;white-space:nowrap}
.sales-status-tabs button span{display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#ffffff08;font-size:10px;color:#83abc4}
.sales-status-tabs button[data-status=rejected] span{color:#ff7587}
.sales-status-tabs button[data-status=pending] span{color:#ffb85b}
.sales-status-tabs button.selected{background:#008f83;border-color:#00a99b;color:#fff}
.sales-status-tabs button.selected span{background:#ffffff26;color:#fff}
.sales-control-row>.btn{color:var(--text)}
.sales-control-row>.btn.selected{border-color:#18afe942;background:#18afe90b}
.sales-control-row>.btn .icon{width:14px;height:14px}
.sales-sort{display:flex;align-items:center;gap:5px;min-height:30px;border:1px solid var(--line);border-radius:7px;padding:0 6px;background:var(--panel)}
.sales-sort>.icon{width:12px;height:12px;color:var(--muted)}
.sales-sort .picker-trigger{min-height:28px;min-width:120px;font-size:10px;border:0;background:none;padding:5px 0;box-shadow:none}
.sales-control-row>.icon-btn{width:30px;height:30px;padding:6px;border-radius:7px}
.sales-search-row .search-field{flex:1;min-width:0;min-height:33px;padding:0 10px;background:var(--panel);border:1px solid var(--line);border-radius:7px}
.sales-search-row input{font-size:11px;padding:8px 0}
.sales-search-row .date-filter-button{font-size:10px;min-height:33px}
body[data-route=ventas] #page-content>.page.sales-page{display:grid;grid-template-columns:minmax(0,1fr);flex:1;min-height:0;height:100%;gap:10px;padding:10px 12px 0;overflow:hidden}
body[data-route=ventas] #page-content>.sales-page.has-case{grid-template-columns:minmax(0,1fr) 270px}
body[data-route=ventas] #page-content>.sales-page.has-case.has-chat{grid-template-columns:minmax(0,1fr) 270px 320px}
.sales-list{display:flex;flex-direction:column;min-height:0;min-width:0}
.sales-table-scroll{position:relative;flex:1;min-height:0;overflow:auto;border:1px solid var(--line);border-radius:9px;background:var(--bg)}
.sales-review-table{width:100%;min-width:745px;border-collapse:collapse;text-align:left}
.sales-review-table th{position:sticky;top:0;z-index:1;padding:12px 10px;background:var(--panel);border-bottom:1px solid var(--line);color:var(--muted);font-size:9px;font-weight:650;letter-spacing:.55px;white-space:nowrap}
.sales-review-table td{padding:10px;border-bottom:1px solid var(--line);font-size:11px;vertical-align:middle}
.sales-review-table td>strong{font-size:11px;white-space:nowrap}
.sales-review-table td>small{display:block;margin-top:5px;color:var(--muted);font-size:9px;white-space:nowrap}
.sales-review-table tr.selected{background:#cc28400a;box-shadow:inset 0 0 0 1px #cc28408a}
.sales-review-table td:last-child{width:28px;padding:5px}
.sales-review-table .icon-btn{width:26px;height:28px;padding:5px;background:transparent;border:0}
.sale-client{display:flex;align-items:center;gap:10px;min-width:130px;width:100%;background:transparent;color:var(--text);text-align:left;padding:0}
.sale-client strong{display:block;font-size:12px}
.sale-client small{display:block;font-size:10px;color:var(--muted);margin-top:4px}
.sale-avatar{display:grid;place-items:center;flex:0 0 31px;width:31px;height:31px;background:#087f73;border-radius:50%;color:#b8f3e6;font-size:13px;font-weight:700}
.sale-status{display:inline-flex;align-items:center;gap:4px;padding:4px 6px;border-radius:5px;color:#a2a2b2;background:#9898ab13;font-size:9px;font-weight:650;white-space:nowrap}
.sale-status i{width:4px;height:4px;border-radius:50%;background:currentColor}
.sale-status.approved{color:#00c9a7;background:#00b99b13}
.sale-status.pending{color:#ffb24a;background:#ff9b0016}
.sale-status.rejected{color:#ff576c;background:#cc284019}
.sale-status.review{color:#ef8293;background:#cc284019}
.sale-status.resolved{color:#9889ff;background:#8a71ff15}
.sale-reason{display:inline-block;padding:4px 6px;font-size:9px;border-radius:4px;background:#cc284024;color:#f07887;max-width:160px}
.sale-reason.fraud{background:#cc284036;color:#ff6072}
.sales-list>footer{flex-shrink:0;min-height:33px;display:flex;align-items:center;font-size:10px;color:var(--muted);padding:6px 2px}
.sales-empty-state{display:flex;flex-direction:column;align-items:center;gap:10px;padding:75px 20px;color:var(--muted);text-align:center}
.sales-empty-state>.icon{width:31px;height:31px;padding:5px;border:2px solid #00bda1;border-radius:50%;color:#00bda1}
.sales-empty-state h2{font-size:15px}
.sales-empty-state p{font-size:11px;line-height:1.5}
.sales-empty-state>.btn{margin-top:5px;font-size:11px}
.sale-detail{min-width:0;min-height:0;overflow:auto;border-left:1px solid var(--line);border-right:1px solid var(--line);background:var(--bg)}
.sale-detail>header{display:flex;align-items:center;gap:6px;min-height:37px;padding:7px 10px;border-bottom:1px solid var(--line)}
.sale-detail>header>strong{font-size:11px;margin-right:auto}
.sale-detail>header .icon-btn{width:20px;height:20px;padding:3px;border:0;background:transparent}
.sale-detail-person{display:flex;gap:9px;align-items:center;padding:12px 10px}
.sale-detail-person>div{min-width:0;flex:1}
.sale-detail-person strong{font-size:12px;overflow-wrap:anywhere}
.sale-detail-person small{display:block;font-size:9px;color:var(--muted);margin-top:4px;overflow-wrap:anywhere}
.sale-detail-person .icon-btn{width:24px;height:25px;padding:4px;border:0;background:transparent;color:#00bda1}
.sale-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px;padding:0 10px 12px;margin:0}
.sale-facts dt{font-size:9px;color:var(--muted);margin-bottom:6px}
.sale-facts dd{font-size:11px;font-weight:650;line-height:1.5;margin:0;overflow-wrap:anywhere}
.sale-facts .sale-fact-wide{grid-column:1/-1;padding-top:10px;border-top:1px solid var(--line)}
.sale-detail-actions{display:flex;flex-wrap:wrap;gap:6px;padding:0 10px 13px;border-bottom:1px solid var(--line)}
.sale-detail-actions>.btn{min-height:28px;padding:6px 7px;font-size:10px;border-radius:5px}
.sale-detail-actions>.btn .icon{width:12px;height:12px}
.btn.danger-outline{background:transparent;color:#ff6574;border:1px solid #cc2840;box-shadow:none}
.sales-chat{display:flex;flex-direction:column;min-height:0;min-width:0;--chat-bg:var(--bg);--chat-panel:var(--panel);--chat-raised:var(--panel);--chat-line:var(--line);--chat-text:var(--text);--chat-muted:var(--muted);--teal:#00af97;background:var(--bg)}
.sales-chat-title{display:flex;align-items:center;gap:8px;min-height:37px;padding:6px 10px;border-bottom:1px solid var(--line);font-size:11px}
.sales-chat-title>.icon{width:15px;height:15px;color:#00bca1}
.sales-chat-title .icon-btn{margin-left:auto;width:23px;height:23px;padding:4px;background:none;border:0}
.sales-chat .support-conversation{flex:1;min-height:0;border:0}
.sales-chat .support-conversation-header{display:none}
.sales-chat .support-messages{padding:14px 10px;background-image:url('/wallpaper-dark.png');background-color:var(--bg);background-blend-mode:luminosity}
.sales-chat .support-composer-area{padding:10px 7px 0;background:var(--bg)}
.sales-chat .support-composer-area form{background:var(--panel);border-color:var(--line);border-radius:12px;padding:10px}
.sales-chat .support-composer-area textarea{font-size:12px;min-height:55px}
.sales-chat .support-quick-tools{background:var(--panel);padding:6px 0}
.sales-chat .support-quick-tools>span{font-size:9px}
.sales-chat .support-bubble{max-width:92%;font-size:12px}
.sales-chat-empty{padding:20px;color:var(--muted);font-size:12px}
.sale-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 15px}
.payment-edit-grid{display:grid;grid-template-columns:minmax(0,1fr) 130px;gap:12px}
body #modal[data-kind=sale-edit]{width:600px;border-radius:13px;background:var(--bg)}
body #modal[data-kind=sale-edit] .modal-head{background:var(--panel);padding:18px 24px}
body #modal[data-kind=sale-edit] #modal-content{padding:20px 24px 0}
body #modal[data-kind=sale-edit] .modal-actions{margin:18px -24px 0;padding:14px 18px;background:var(--panel);border-top:1px solid var(--line)}

/* Dashboard: eight sales metrics, distributions and the editable sales history. */
body[data-route=dashboard] .sales-dashboard{padding:14px 18px 22px}
body[data-route=dashboard] .sales-dashboard .filterbar{margin-bottom:18px;min-height:64px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--panel);gap:12px}
.sales-dashboard .filters-left{gap:12px;flex-wrap:wrap;flex:1}
.sales-dashboard .filters-right{gap:8px}
.sales-dashboard .filterbar .segments{flex-shrink:0;background:var(--bg);border-radius:7px;padding:4px}
.sales-dashboard .filterbar .segments>button{padding:7px 13px;font-size:12px}
body[data-route=dashboard] .sales-dashboard .filterbar .picker-trigger{min-height:36px;background:var(--bg);border:1px solid var(--line);border-radius:6px;font-size:12px}
.sales-dashboard .filterbar .picker{min-width:130px}
.sales-dashboard .filterbar .picker:has([data-filter=connection]),.sales-dashboard .filterbar .picker:has([data-filter=dashboardProduct]){min-width:170px}
body[data-route=dashboard] .sales-dashboard .metric-grid{gap:16px;margin-bottom:22px}
body[data-route=dashboard] .sales-dashboard .metric-card{height:142px;min-height:0;padding:16px 17px;border:1px solid var(--line);border-radius:9px;box-shadow:none;background:var(--panel)}
body[data-route=dashboard] .sales-dashboard .metric-card-top{margin-bottom:24px;align-items:center}
body[data-route=dashboard] .sales-dashboard .color-icon{width:30px;height:30px;border:0;border-radius:7px;box-shadow:none;background:#18afe914;color:#18afe9}
body[data-route=dashboard] .sales-dashboard .color-icon.electric-lime{color:#00cda0;background:#00cda013}
body[data-route=dashboard] .sales-dashboard .color-icon.electric-purple{color:#a66af2;background:#a66af213}
body[data-route=dashboard] .sales-dashboard .color-icon.electric-amber{color:#ffb600;background:#ffb60012}
body[data-route=dashboard] .sales-dashboard .color-icon.electric-red{color:#ff4357;background:#ff435712}
body[data-route=dashboard] .sales-dashboard .color-icon.electric-pink{color:#b672ff;background:#b672ff14}
body[data-route=dashboard] .sales-dashboard .color-icon>.icon{width:19px;height:19px}
.sales-dashboard .percentage{background:#ffffff06;border-radius:5px;padding:3px 8px;font-size:12px}
body[data-route=dashboard] .sales-dashboard .metric-value{font-size:22px;font-weight:750;line-height:1.15;background:transparent;color:var(--text)}
body[data-route=dashboard] .sales-dashboard .metric-value.electric-cyan{color:#41dcca}
body[data-route=dashboard] .sales-dashboard .metric-value.electric-amber{color:#ffb600}
body[data-route=dashboard] .sales-dashboard .metric-value.electric-red{color:#ff4658}
body[data-route=dashboard] .sales-dashboard .metric-value.electric-lime{color:#16c878}
.sales-dashboard .metric-label h2{font-size:13px;color:var(--muted);font-weight:650}
.sales-dashboard .metric-label .icon-btn{width:22px;height:22px;padding:3px}
body[data-route=dashboard] .sales-dashboard :is(.chart-panel,.charts-three>.panel,.dashboard-bottom>.panel){padding:20px 21px;border:1px solid var(--line);border-radius:9px;box-shadow:none;background:var(--panel)}
.sales-dashboard :is(.charts-two,.dashboard-bottom){display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:16px;margin-bottom:18px}
.sales-dashboard .charts-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:20px}
.sales-dashboard .charts-three>.panel{min-height:275px;min-width:0}
.sales-dashboard .chart-panel{min-height:290px}
.sales-dashboard .chart-panel h2,.sales-dashboard .charts-three h2,.sales-dashboard .dashboard-bottom h2{font-size:16px;line-height:1.4;font-weight:750}
.sales-dashboard .subtext{font-size:13px;line-height:1.5;margin-top:4px}
.sales-dashboard .panel-title-row{gap:12px}
.sales-dashboard .segments>button{font-size:12px;padding:6px 10px}
.sales-data-chart{display:block;width:100%;height:auto;min-height:210px;margin-top:15px;overflow:visible}
.sales-data-chart line{stroke:var(--line);stroke-dasharray:3 4}
.sales-data-chart text{font-family:var(--font-system);font-size:11px;fill:var(--muted)}
.sales-data-chart .sales-chart-line{stroke:#35ddc5;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.sales-data-chart .sales-chart-bar{fill:#18afe9}
.sales-dashboard .dashboard-no-data{display:flex;align-items:center;justify-content:center;min-height:100px;margin-top:18px;border:1px dashed var(--line);color:var(--muted);font-size:13px;text-align:center;padding:14px}
.sales-distribution{display:grid;gap:17px;margin-top:22px;max-height:300px;overflow:auto}
.sales-distribution>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px 12px;font-size:12px}
.sales-distribution strong{font-size:12px}
.sales-distribution i{grid-column:1/-1;display:block;height:7px;background:var(--bg);border-radius:5px;overflow:hidden}
.sales-distribution b{display:block;height:100%;border-radius:5px;background:#18afe9}
.dashboard-history-actions{display:flex;flex-direction:column;align-items:flex-end;gap:9px;flex-shrink:0}
.dashboard-history-actions>.btn{font-size:12px;min-height:31px;padding:7px 10px;border-radius:6px}
.sales-dashboard .sales-history{min-width:0}
.sales-dashboard .sales-history .table-scroll{margin-top:20px;border:1px solid var(--line);border-radius:5px;min-height:150px;max-height:430px;overflow:auto}
.sales-dashboard .sales-history table{min-width:885px;width:100%}
.sales-dashboard .sales-history th{background:var(--bg);font-size:10px;padding:12px 10px;white-space:nowrap}
.sales-dashboard .sales-history td{font-size:11px;padding:11px 10px;border-top:1px solid var(--line);white-space:nowrap}
.sales-dashboard .sales-history .table-empty{height:125px;text-align:center;white-space:normal}
.sales-dashboard .sales-history .icon-btn{width:25px;height:26px;padding:4px;background:transparent;border:0}
.sales-dashboard .product-performance .dashboard-no-data{min-height:165px}

@media(max-width:1600px){body[data-route=chat] .support-layout{grid-template-columns:72px 280px minmax(0,1fr) 176px 250px}.sales-dashboard .filterbar{flex-wrap:wrap}.sales-dashboard .filters-right{margin-left:auto}}
@media(max-width:1350px){
 body[data-route=ventas]:not([data-flow-editor=true]) #page-header{grid-template-columns:minmax(0,1fr);gap:10px}
 body[data-route=ventas] #page-header .section-title{margin:0}
 body[data-route=ventas] #page-content>.sales-page.has-case.has-chat{grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:auto minmax(0,1fr)}
 .sales-page.has-chat .sales-list{grid-row:1 / span 2}
 .sales-page.has-chat .sale-detail{grid-column:2;grid-row:1;max-height:250px}
 .sales-page.has-chat .sales-chat{grid-column:2;grid-row:2}
 .sales-dashboard .charts-two,.sales-dashboard .dashboard-bottom{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr)}
 .sales-dashboard .panel-title-row{flex-wrap:wrap}
}
@media(max-width:1280px){body[data-route=chat] .support-layout{grid-template-columns:70px 265px minmax(0,1fr) 250px}.sales-dashboard .charts-three{grid-template-columns:repeat(3,minmax(0,1fr))}.sales-dashboard .charts-three h2{font-size:14px}}
@media(max-width:1080px){body[data-route=chat] .support-layout{grid-template-columns:65px 260px minmax(0,1fr)}.sales-dashboard .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sales-dashboard .charts-two,.sales-dashboard .dashboard-bottom{grid-template-columns:minmax(0,1fr)}.sales-dashboard .charts-three{grid-template-columns:minmax(0,1fr)}.sales-dashboard .charts-three>.panel{min-height:210px}}
@media(max-width:760px){
 body[data-route=chat] .support-layout{grid-template-columns:260px minmax(0,1fr)}
 body[data-route=ventas]:not([data-flow-editor=true]) #page-header{padding:10px 12px}
 .sales-status-tabs{width:100%;overflow:auto;padding-bottom:4px}
 .sales-control-row{gap:6px}
 .sales-search-row{flex-wrap:wrap}
 .sales-search-row .search-field{flex-basis:100%}
 .sales-search-row .date-filter-button{margin-left:auto}
 body[data-route=ventas] #page-content>.page.sales-page{padding:8px 10px 0}
 body[data-route=ventas] #page-content>.sales-page.has-case,body[data-route=ventas] #page-content>.sales-page.has-case.has-chat{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);overflow:auto}
 .sales-page.has-case .sales-list{display:none}
 .sales-page.has-case .sale-detail{grid-column:1;grid-row:1;max-height:none}
 .sales-page.has-case .sales-chat{grid-column:1;grid-row:2;min-height:330px}
 .sale-detail-actions{padding-bottom:9px}
 .sale-form-grid{grid-template-columns:minmax(0,1fr)}
 .activity-calendar.range-calendar{grid-template-columns:120px minmax(0,1fr);padding:8px}
 .calendar-shortcuts{padding-right:6px}
 .calendar-shortcuts button{font-size:11px;padding:9px 5px}
 .calendar-month>header strong{font-size:12px}
 .range-calendar .calendar-month{padding-left:6px}
 body[data-route=dashboard] .sales-dashboard{padding:12px 14px}
 .sales-dashboard .filterbar .picker{flex:1;min-width:115px}
 .sales-dashboard .filters-left{width:100%;gap:8px}
 body[data-route=dashboard] .sales-dashboard .metric-grid{gap:10px}
 body[data-route=dashboard] .sales-dashboard .metric-card{padding:14px 12px;height:137px}
 body[data-route=dashboard] .sales-dashboard .metric-value{font-size:20px}
 .sales-dashboard .metric-label h2{font-size:12px}
 body[data-route=dashboard] .sales-dashboard :is(.chart-panel,.charts-three>.panel,.dashboard-bottom>.panel){padding:16px 14px}
 .sales-data-chart{min-height:165px}
 .sales-dashboard .chart-panel{min-height:245px}
}
@media(max-width:600px){body[data-route=chat] .support-layout{grid-template-columns:minmax(0,1fr)}}

/* Contact editing and ticket creation share the compact chat form layout. */
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]){width:600px;max-width:calc(100vw - 24px);padding:0;border:0;border-radius:15px;background:var(--bg);color:var(--text);box-shadow:0 18px 70px #0008;overflow:auto;max-height:calc(100dvh - 24px)}
body #modal[data-kind=chat-ticket]{width:445px}
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) .modal-head{min-height:53px;padding:16px 21px;background:linear-gradient(105deg,#189bec,#0b77c9);border:0;color:#fff}
body #modal[data-kind=chat-ticket] .modal-head{background:linear-gradient(105deg,#21c45a,#11a24a)}
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) #modal-title{display:flex;align-items:center;gap:10px;font-size:16px;font-weight:750;color:#fff;line-height:1.3}
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) #modal-title>.icon{width:19px;height:19px;flex:0 0 19px;color:#fff;background:none;padding:0}
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) .modal-head>.icon-btn{width:25px;height:25px;min-width:25px;padding:4px;background:transparent;box-shadow:none;border:0;color:#fff}
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) #modal-content{padding:17px 21px 0}
.chat-form-intro{color:#aaa6ae;font-size:13px;line-height:1.5;font-style:italic;margin:0 0 15px}
.chat-contact-field{display:flex;flex-direction:column;gap:5px;margin:0 0 14px;min-width:0}
.chat-field-label{display:flex;align-items:center;gap:8px;min-height:25px;color:var(--muted);font-size:13px;font-weight:600}
.chat-field-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:6px;background:#9b52ed15;color:#aa66ff;flex:0 0 25px;font-style:normal}
.chat-field-icon>.icon{width:15px;height:15px;padding:0;background:none}
.chat-field-icon.green{background:#00b66c13;color:#00c978}.chat-field-icon.blue{background:#18afe914;color:#18afe9}.chat-field-icon.amber{background:#ffb60016;color:#ffb600}
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) :is(.chat-contact-field input,.contact-extra-row input){display:block;width:100%;min-width:0;height:36px;padding:8px 11px;border:1px solid #4b484e;border-radius:8px;background:transparent;color:var(--text);font-size:13px;box-shadow:none}
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) input:focus{outline:1px solid #18afe9;border-color:#18afe9}
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) input[aria-invalid=true]{border-color:#ff4f42;outline-color:#ff4f42}
.chat-field-error{display:block;padding:0 12px;color:#ff584b;font-size:11px;line-height:1.4}
.chat-field-error[hidden]{display:none}
.chat-field-helper{font-size:11px;line-height:1.4;margin:-10px 0 15px 12px;color:#89858e}
.chat-origin-field{display:flex;align-items:center;gap:4px;margin:3px 0 14px;font-size:13px;color:#aaa5af;flex-wrap:wrap}
.contact-extra-fields>.chat-field-label{margin-bottom:6px}
#contact-extra-rows{display:grid;gap:8px}
.contact-extra-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 25px;align-items:center;gap:8px}
.contact-extra-row>.icon-btn{width:25px;height:30px;padding:4px;color:#ff4357;border:0;background:transparent;box-shadow:none}
.contact-extra-row>.icon-btn .icon{width:16px;height:16px}
.contact-add-field{width:100%;min-height:34px;margin-top:8px;border:1px solid #ffb600;border-radius:8px;background:transparent;color:#ffb600;font-size:12px;font-weight:650}
.contact-add-field:hover{background:#ffb6000c}
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) .modal-actions{display:flex;justify-content:flex-end;gap:9px;margin:17px -21px 0;padding:12px 21px;border-top:1px solid var(--line);background:transparent}
body #modal[data-kind=chat-ticket] .modal-actions{border:0;padding-top:18px;padding-bottom:17px;margin-top:3px}
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) .modal-actions>.btn{min-height:36px;padding:8px 20px;border-radius:9px;font-size:12px;box-shadow:none}
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) .modal-actions>.secondary{color:#aaa6ae;border:1px solid #aaa6ae;background:transparent}
body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) .chat-form-save{color:#fff;background:#189bec;border:1px solid #189bec}
body #modal[data-kind=chat-ticket] .chat-form-save{background:#21c45a;border-color:#21c45a}
body #modal[data-kind=chat-ticket] .chat-form-save:disabled{background:#a7efce;border-color:#a7efce;opacity:.65;color:#174d37}
body #modal[data-kind=chat-ticket] .picker,body #modal[data-kind=chat-ticket] .picker-trigger{width:100%;min-width:0}
body #modal[data-kind=chat-ticket] .picker-trigger{height:36px;min-height:36px;padding:8px 11px;border:1px solid #4b484e;border-radius:8px;background:transparent;color:var(--text);font-size:13px}
.chat-connection-hint{color:var(--muted);font-size:11px;line-height:1.5;margin:-4px 0 0}
.chat-connection-hint a{color:#21c45a;text-decoration:underline}

/* Bare section icons in the live chat; colored fields remain inside forms. */
body[data-route=chat] .support-layout .support-client .rail-section>summary>.icon:first-child{background:none;border:0;border-radius:0;box-shadow:none;padding:0;width:14px;height:14px;flex:0 0 14px}
body[data-route=chat] .support-filters :is(.support-rail-heading,.rail-control,.manage-labels,small)>.icon{background:none;border:0;border-radius:0;box-shadow:none;padding:0}
body[data-route=chat] .support-filters footer :is(.icon-btn,a){background:none;border-color:transparent;box-shadow:none}
body[data-route=chat] .support-client .ticket-fact .chat-origin-rocket{width:14px;height:14px;object-fit:contain;flex:0 0 14px;padding:0;background:none}
body[data-route=chat] .support-client .memory-section .payment-memory{padding:12px 10px}
body[data-route=chat] .support-client .payment-memory .sales-data{border:1px solid #00bba12b;background:#00bba109;border-radius:8px;padding:9px}
body[data-route=chat] .payment-memory .sales-data>span{font-size:8px;letter-spacing:.5px}
body[data-route=chat] .support-client .payment-memory .sales-data>div{align-items:center;gap:6px}
body[data-route=chat] .support-client .payment-memory .sales-data strong{font-size:17px;color:#00cba7}
.chat-manual-payment{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:34px;margin-top:8px;padding:7px 4px;color:#00cba7;border:1px solid #00bba1;border-radius:7px;background:#00bba108;font-size:10px;font-weight:700;line-height:1.3}
.chat-manual-payment>.icon{width:16px;height:16px}
.chat-manual-payment:hover{background:#00bba11c}
.chat-payment-list{display:grid;gap:8px;margin-top:9px}
.chat-payment-card{padding:9px 7px;background:#ffffff03;border:1px solid var(--line);border-radius:8px;min-width:0}
.chat-payment-card>header{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.chat-payment-card>header>strong{font-size:13px;font-weight:750;line-height:1.3}
.chat-payment-status{display:inline-block;padding:3px 4px;border-radius:4px;color:var(--muted);background:#ffffff06;font-size:7px;font-weight:750}
.chat-payment-status.confirmed{color:#00cda7;background:#00bba118}
.chat-payment-card>header>div{display:flex;align-items:center;margin-left:auto;gap:3px}
.chat-payment-card>header .icon-btn{width:21px;height:23px;padding:3px;background:none;border:0;border-radius:4px;color:#81939e;box-shadow:none}
.chat-payment-card>header .icon-btn .icon{width:14px;height:14px}
.chat-payment-card [data-action=chat-payment-delete]:hover{color:#ff4357}
.chat-payment-priority{display:inline-block;margin-top:6px;padding:3px 5px;border-radius:4px;color:#74b4ff;background:#1685f52b;font-size:7px;font-weight:750}
.chat-payment-card dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px 8px;margin:9px 0 0}
.chat-payment-card dl>div{min-width:0}
.chat-payment-card dt{color:#8398a5;font-size:8px;letter-spacing:.5px;line-height:1.3}
.chat-payment-card dd{margin:2px 0 0;color:var(--text);font-size:9px;line-height:1.5;overflow-wrap:anywhere}
.chat-payment-card dl>div:last-child dd{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-payment-card>footer{display:flex;justify-content:flex-end;margin-top:10px}
.chat-payment-card>footer>button{display:flex;align-items:center;gap:5px;border:1px solid var(--line);border-radius:6px;min-height:29px;padding:5px 7px;font-size:9px;font-weight:650;background:transparent;color:#8398a5;cursor:default}
.chat-payment-card>footer .icon{width:11px;height:11px}
.chat-payment-form{padding:9px 7px;margin-top:8px;background:#00bba107;border:1px solid #00bba12b;border-radius:8px}
.chat-payment-form h4{font-size:10px;font-weight:750;line-height:1.4;margin:0}
.chat-payment-form>p:not(.form-error){font-size:9px;line-height:1.5;color:var(--muted);margin:3px 0 9px}
.chat-payment-amount{display:grid;grid-template-columns:minmax(0,1fr) 72px;gap:6px;align-items:end}
.chat-payment-amount>label{position:relative;display:block;min-width:0}
.chat-payment-amount>label>span{position:absolute;left:7px;top:-5px;font-size:7px;background:var(--panel);padding:0 3px;z-index:1;color:var(--muted)}
body[data-route=chat] .chat-payment-form input{width:100%;min-width:0;min-height:30px;padding:7px 6px;color:var(--text);background:transparent;border:1px solid #4b484e;border-radius:6px;font-size:9px;box-shadow:none}
.chat-payment-form>input{margin-top:6px}
body[data-route=chat] .chat-payment-form .picker{width:100%;min-width:0}
body[data-route=chat] .chat-payment-form .picker-trigger{width:100%;min-width:0;min-height:30px;padding:6px;font-size:9px;border:1px solid #4b484e;border-radius:6px;background:transparent;color:var(--text)}
.chat-payment-form>footer{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-top:8px}
.chat-payment-form>footer>button{font-size:9px;padding:7px 6px;min-height:30px;border-radius:5px;font-weight:600}
.chat-payment-form>footer>button:not(.btn){background:none;color:var(--muted)}
.chat-payment-form>footer>.btn{background:#00af97;color:#fff;border:0;box-shadow:none;gap:4px}
.chat-payment-form>footer>.btn .icon{width:12px;height:12px}
.chat-payment-form .form-error{font-size:9px;line-height:1.45;margin:6px 0 0}
@media(max-width:480px){
 body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) #modal-content{padding:16px 15px 0}
 body #modal:is([data-kind=chat-contact-edit],[data-kind=chat-ticket]) .modal-actions{margin-left:-15px;margin-right:-15px;padding-left:15px;padding-right:15px}
 .chat-form-intro{font-size:12px}
 .contact-extra-row{gap:5px;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 22px}
 body #modal[data-kind=chat-contact-edit] .contact-extra-row input{padding:7px;font-size:11px}
}

/* Solid metric tiles with white glyphs, independent from metric value colors. */
body[data-route=dashboard] .sales-dashboard .color-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;color:#fff;background:#3488f7}
body[data-route=dashboard] .sales-dashboard .color-icon.electric-blue{color:#fff;background:#3488f7}
body[data-route=dashboard] .sales-dashboard .color-icon.electric-cyan{color:#fff;background:#10afe0}
body[data-route=dashboard] .sales-dashboard .color-icon.electric-lime{color:#fff;background:#00b99a}
body[data-route=dashboard] .sales-dashboard .color-icon.electric-purple{color:#fff;background:#9b52ed}
body[data-route=dashboard] .sales-dashboard .color-icon.electric-amber{color:#fff;background:#eea600}
body[data-route=dashboard] .sales-dashboard .color-icon.electric-red{color:#fff;background:#ef354d}
body[data-route=dashboard] .sales-dashboard .color-icon.electric-pink{color:#fff;background:#d847b7}
body[data-route=dashboard] .sales-dashboard .color-icon>.icon{width:21px;height:21px;color:#fff;background:none;padding:0}
body[data-route=dashboard] .sales-dashboard .metric-card-top{margin-bottom:20px}
body[data-route=dashboard] .sales-dashboard .period-chart{--series-color:#35ddc5}
body[data-route=dashboard] .sales-dashboard .period-chart[data-measure=quantity]{--series-color:#9b52ed}
body[data-route=dashboard] .sales-dashboard .period-chart .panel-title-row{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:nowrap}
.period-measure{flex-shrink:0;margin-top:4px}
body[data-route=dashboard] .sales-dashboard .period-measure .segments{display:flex;gap:3px;padding:4px;background:var(--bg);border:1px solid var(--line);border-radius:7px;box-shadow:none}
body[data-route=dashboard] .sales-dashboard .period-measure .segments>button{padding:6px 10px;min-height:30px;border:0;border-radius:7px;font-size:12px;font-weight:700;line-height:1.2;color:var(--muted);background:transparent;box-shadow:none}
body[data-route=dashboard] .sales-dashboard .period-chart[data-measure=value] .period-measure .segments>button.selected{background:#18afe9;color:#fff}
body[data-route=dashboard] .sales-dashboard .period-chart[data-measure=quantity] .period-measure .segments>button.selected{background:#9b52ed;color:#fff}
body[data-route=dashboard] .sales-dashboard .period-data-chart{margin-top:17px;min-height:0;width:100%;height:auto;overflow:visible}
body[data-route=dashboard] .sales-dashboard .period-data-chart line{stroke:#45434f;stroke-opacity:.6;stroke-dasharray:2 4;stroke-width:1}
body[data-route=dashboard] .sales-dashboard .period-data-chart .sales-chart-line{stroke:var(--series-color);stroke-width:2;vector-effect:non-scaling-stroke;stroke-dasharray:none}
body[data-route=dashboard] .sales-dashboard .period-data-chart text{font-size:13px;font-weight:400;fill:var(--muted)}
body[data-route=dashboard] .sales-dashboard .period-chart{min-height:0;align-self:stretch;overflow:hidden}
@media(max-width:600px){
 body[data-route=dashboard] .sales-dashboard .period-chart{overflow:auto}
 body[data-route=dashboard] .sales-dashboard .period-data-chart{min-width:620px}
 body[data-route=dashboard] .sales-dashboard .period-chart .panel-title-row{min-width:0;gap:6px}
 body[data-route=dashboard] .sales-dashboard .period-chart h2{font-size:14px}
 body[data-route=dashboard] .sales-dashboard .period-chart .subtext{font-size:11px}
 body[data-route=dashboard] .sales-dashboard .period-measure .segments>button{font-size:11px;padding:5px 7px}
}
