/* La misma familia rosada de la tienda: viva en los acentos, delicada en los fondos. */
:root { --rose:#db2777; --rose-dark:#be185d; --rose-bright:#ec4899; --ink:#382330; --muted:#715363; --line:#fbcfe8; --canvas:#fdf2f8; --petal:#fce7f3; }
.venta-perfume-item[hidden] { display:none!important; }
body { background:var(--canvas)!important; color:var(--ink); }
#sidebar { background:#fffafd; border-color:var(--line); width:248px; flex-shrink:0; }
#sidebar .crm-brand { height:72px; min-height:72px; padding:12px 18px; order:0; }
#sidebar .crm-account { order:2; border-bottom:0; border-top:1px solid var(--line); padding:12px 16px; flex-shrink:0; }
#sidebar nav { order:1; padding:16px 12px; min-height:0; }
#sidebar .nav-link { min-height:46px; margin-bottom:5px; font-size:13px; color:#733653; border-radius:12px; transition:background .18s,color .18s; }
#sidebar .nav-link:hover { background:var(--petal); }
#sidebar .nav-link.active { background:linear-gradient(100deg,var(--rose-dark),var(--rose)); color:white; box-shadow:0 5px 16px #db277729; }
#sidebar .nav-link.active svg { color:white; }
#sidebar .crm-primary-nav { padding-bottom:10px; border-bottom:1px solid var(--line); }
#sidebar .crm-primary-nav .nav-link svg { padding:7px; width:34px!important; height:34px!important; background:var(--petal); border-radius:10px; color:var(--rose-dark); flex-shrink:0; }
#sidebar .crm-primary-nav .nav-link.active svg { color:white; background:#ffffff20; }
#sidebar .nav-group-toggle { color:var(--rose-dark); font-size:10px; margin:18px 0 6px; }
#sidebar .nav-group-toggle span { letter-spacing:.14em; }
#sidebar .text-brand-400,#sidebar .text-brand-500 { color:var(--rose-dark); }
#app header { background:#fffafd; border-color:var(--line); min-height:72px; padding:12px 24px; }
#app main { max-width:none; margin:0; width:100%; padding:20px 24px; }
#app main>.app-section { margin:0!important; }
#app .app-section.space-y-6>:not([hidden])~:not([hidden]) { margin-top:18px; }
#app[data-section="ventas"] .crm-global-search { display:none; }
#app .text-slate-400,#app .text-brand-300,#app .text-brand-400 { color:var(--muted); }
#app .text-brand-800,#app .text-brand-700 { color:var(--rose-dark); }
#app .border-brand-100,#app .border-slate-100 { border-color:var(--line); }
#app input:not([type=checkbox]):not([type=radio]),#app select,#app textarea { color:var(--ink); border-color:#dc95b8; min-height:42px; background-color:white; }
#app input::placeholder,#app textarea::placeholder { color:#806173; }
#app button:focus-visible,#app a:focus-visible,#app input:focus-visible,#app select:focus-visible,#app summary:focus-visible { outline:3px solid var(--rose-dark); outline-offset:3px; }
#app button[type=submit] { background:linear-gradient(100deg,var(--rose-dark),var(--rose)); color:white; box-shadow:0 5px 16px #db277724; }
#app table th { color:var(--rose-dark); font-weight:600; letter-spacing:.06em; font-size:10px; }
#app table td { vertical-align:top; }
#app .shadow-sm { box-shadow:0 4px 18px #be185d08; }
.crm-eyebrow { text-transform:uppercase; letter-spacing:.16em; font-size:10px; font-weight:600; color:var(--rose-dark); margin-bottom:10px; }
.crm-hero { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:0 0 24px; }
.crm-hero h2 { font-family:'Playfair Display',Georgia,serif; font-size:clamp(30px,3vw,42px); font-weight:600; line-height:1.16; letter-spacing:-.025em; margin:0 0 10px; }
.crm-hero p,.crm-muted { color:var(--muted); font-size:13px; line-height:1.7; }
.crm-date { font-size:11px; color:var(--muted); margin-bottom:12px; text-transform:capitalize; }
.crm-btn { display:inline-flex; align-items:center; justify-content:center; gap:9px; padding:11px 17px; border-radius:11px; border:1px solid var(--rose); background:var(--rose); color:white; font-size:12px; font-weight:600; cursor:pointer; min-height:44px; text-decoration:none; white-space:normal; transition:background .18s,box-shadow .18s; }
.crm-btn:hover { background:var(--rose-dark); color:white; box-shadow:0 4px 12px #db277724; }
.crm-btn-secondary { background:white; color:var(--rose-dark); }
.crm-btn-small { padding:7px 11px; min-height:36px; font-size:11px; }
.crm-btn:disabled { opacity:.55; cursor:wait; }
.crm-btn svg { width:17px; height:17px; flex-shrink:0; }
.crm-full { width:100%; }
.crm-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

/* Dashboard: los seis indicadores originales permanecen visibles y en primer plano. */
.crm-welcome { position:relative; isolation:isolate; overflow:hidden; border-radius:18px; padding:16px 22px; background:linear-gradient(110deg,#db2777,#be185d); color:white; box-shadow:0 6px 20px #db27771c; margin-bottom:0; }
.crm-welcome::after { content:''; position:absolute; width:245px; height:245px; right:-24px; top:-100px; border:38px solid #ffffff10; outline:1px solid #ffffff26; border-radius:46% 54% 65% 35%; z-index:-1; transform:rotate(-25deg); }
.crm-welcome .crm-eyebrow { color:#fff; opacity:.95; }
.crm-welcome h2 { color:white; font-size:28px; margin-bottom:5px; }
.crm-welcome .crm-eyebrow { margin-bottom:5px; font-size:9px; }
.crm-welcome p { font-size:12px; }
.crm-welcome p,.crm-welcome .crm-date { color:#fff; }
.crm-welcome .crm-btn { background:white; color:var(--rose-dark); border-color:white; }
.crm-welcome .crm-btn:hover { background:var(--petal); }
.crm-welcome-actions { flex-shrink:0; text-align:right; }
.crm-dashboard-tools { gap:12px; }
.crm-dashboard-tools p { color:var(--muted); font-size:12px; }
.crm-dashboard-tools button { min-height:38px; }
#app .crm-dashboard-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
#app .crm-dashboard-kpis>div { position:relative; min-height:116px; padding:16px; border-radius:14px; border:1px solid var(--line); }
.crm-dashboard-kpis>div>p:first-of-type { max-width:calc(100% - 28px); line-height:1.4; font-size:10px; }
.crm-kpi-icon { position:absolute; top:13px; right:13px; width:26px; height:26px; border-radius:8px; display:grid; place-items:center; color:var(--rose-dark); background:var(--petal); }
.crm-kpi-icon svg { width:16px; height:16px; }
#app .crm-dashboard-kpis .crm-kpi-value { font-size:24px; line-height:1.2; letter-spacing:-.035em; margin-top:9px; overflow-wrap:anywhere; }
#app .crm-dashboard-kpis>div>p:last-child { font-size:10px; line-height:1.5; }
#app .crm-dashboard-kpis>div:first-child { background:#db2777; border-color:#db2777; box-shadow:0 8px 20px #db277727; }
#app .crm-dashboard-kpis>div:first-child p { color:white; }
.crm-dashboard-kpis>div:first-child .crm-kpi-icon { color:white; background:#ffffff20; }
#app .crm-dashboard-kpis>div:nth-child(2) { border-top:3px solid #10b981; }
#app .crm-dashboard-kpis>div:nth-child(2) .crm-kpi-value { color:#047857; }
.crm-dashboard-kpis>div:nth-child(2) .crm-kpi-icon { background:#ecfdf5; color:#047857; }
#app .crm-dashboard-kpis>div:nth-child(3) { border-top:3px solid #fb923c; }
#app .crm-dashboard-kpis>div:nth-child(3) .crm-kpi-value { color:#c2410c; }
.crm-dashboard-kpis>div:nth-child(3) .crm-kpi-icon { background:#fff7ed; color:#c2410c; }
#app .crm-dashboard-kpis>div:nth-child(4) { border-top:3px solid #f472b6; }
#app .crm-dashboard-kpis>div:nth-child(5) { border-top:3px solid #f87171; }
#app .crm-dashboard-kpis>div:nth-child(5) .crm-kpi-value { color:#b91c1c; }
.crm-dashboard-kpis>div:nth-child(5) .crm-kpi-icon { background:#fef2f2; color:#b91c1c; }
#app .crm-dashboard-kpis>div:nth-child(6) { border-top:3px solid #fbbf24; }
#app .crm-dashboard-kpis>div:nth-child(6) .crm-kpi-value { color:#92400e; }
.crm-dashboard-kpis>div:nth-child(6) .crm-kpi-icon { background:#fffbeb; color:#92400e; }
.crm-today { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:18px; padding:18px 22px; border-radius:16px; border:1px solid var(--line); background:white; margin:0 0 24px; }
.crm-today-title { font-size:13px; font-weight:600; display:flex; align-items:center; gap:9px; color:var(--rose-dark); }
.crm-today-title svg { width:20px; height:20px; }
.crm-today-metric { min-width:120px; }
.crm-today-metric small { display:block; color:var(--muted); font-size:11px; margin-bottom:4px; }
.crm-today-metric strong { font-size:18px; }
.crm-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr); gap:24px; }
.crm-panel { border:1px solid var(--line); border-radius:17px; background:white; padding:24px; min-width:0; margin-bottom:24px; }
.crm-panel-head { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:22px; }
.crm-panel h3,.crm-panel-head h3 { font-family:'Playfair Display',Georgia,serif; font-size:22px; font-weight:600; margin:0; }
.crm-panel h4 { font-size:13px; font-weight:600; margin:0; }
.crm-agenda { background:var(--petal); border-color:#f9a8d4; }
.crm-tag { font-size:10px; padding:5px 9px; background:var(--petal); border-radius:7px; color:var(--rose-dark); white-space:nowrap; }
.crm-tag.debt { background:#fff1d6; color:#854d0e; }
.crm-tag.paid { background:#dcfce7; color:#166534; }
.crm-row { display:flex; align-items:center; gap:13px; padding:15px 0; border-bottom:1px solid var(--petal); }
.crm-row:last-child { border-bottom:0; }
.crm-row .grow { flex:1; min-width:0; }
.crm-row small { display:block; font-size:11px; color:var(--muted); margin-top:4px; }
.crm-row strong { font-size:13px; }
.crm-avatar { height:40px; width:40px; background:var(--petal); color:var(--rose-dark); border-radius:50%; display:grid; place-items:center; flex-shrink:0; font-size:13px; font-weight:600; }
.crm-quick { width:100%; display:flex; text-align:left; gap:14px; align-items:center; padding:18px 0; border-bottom:1px solid #f9a8d4; }
.crm-quick:last-child { border:0; }
.crm-quick svg { height:35px; width:35px; padding:7px; color:var(--rose-dark); background:white; border-radius:11px; flex-shrink:0; }
.crm-quick strong { display:block; font-size:13px; }
.crm-quick small { display:block; font-size:11px; color:var(--muted); margin-top:5px; }
.crm-quick .grow { flex:1; }
.crm-arrow { color:var(--rose-dark); font-size:21px; }
.crm-note { padding:16px 20px; border-left:3px solid var(--rose); background:var(--petal); color:#733653; font-size:12px; line-height:1.7; margin:18px 0; }
.crm-empty { padding:28px 8px; color:var(--muted); font-size:13px; text-align:center; line-height:1.8; }
.crm-search { display:block; width:100%; padding:10px 13px; border:1px solid #dc95b8; border-radius:10px; margin:10px 0; font-size:13px; min-height:44px; }

/* Módulos reconocibles: venta activa, fichas personales, cartera y mercadería. */
.crm-section-heading { display:flex; align-items:center; gap:14px; padding:14px 18px; border-radius:15px; background:white; border:1px solid var(--line); border-left:5px solid var(--rose); }
.crm-section-heading h2 { font-family:'Playfair Display',Georgia,serif; font-size:24px; line-height:1.2; margin:0 0 4px; }
.crm-section-heading p { font-size:12px; color:var(--muted); line-height:1.7; }
.crm-section-heading .crm-eyebrow { margin-bottom:4px; font-size:9px; }
.crm-section-emblem { flex-shrink:0; width:44px; height:44px; background:var(--petal); color:var(--rose-dark); border-radius:13px; display:grid; place-items:center; }
.crm-section-emblem svg { width:25px; height:25px; }
.crm-section-heading.crm-sales-heading { background:transparent; border:0; padding:0; }
.crm-sales-heading .crm-section-emblem { background:var(--rose); color:white; box-shadow:0 6px 18px #db277727; }
#section-ventas .overflow-x-auto { max-width:100%; }
.crm-cart { margin:14px 0 22px; }
.crm-cart-line { display:flex; gap:9px; align-items:center; border-bottom:1px solid var(--line); padding:13px 0; font-size:12px; }
.crm-cart-line>div { flex:1; }
.crm-cart-line small { display:block; color:var(--muted); margin-top:4px; }
.crm-cart-line button { min-width:34px; min-height:36px; color:#b91c1c; font-size:24px; }
.crm-payment-summary { padding:13px 0; font-size:13px; font-weight:600; color:var(--rose-dark); }
.crm-clients-heading { padding:18px 22px; background:linear-gradient(100deg,#fce7f3,#fffafd); border:1px solid #f9a8d4; border-radius:38px 16px 16px 16px; }
.crm-clients-heading .crm-section-emblem { width:52px; height:52px; border-radius:50%; background:white; box-shadow:0 6px 20px #db277713; }
.crm-clients-intro { display:flex; align-items:center; gap:20px; }
.crm-clients-heading h2 { font-size:28px; margin-bottom:5px; }
.crm-clients { display:grid; grid-template-columns:280px minmax(0,1fr); gap:24px; }
.crm-clients>aside { border-top:4px solid #f472b6; }
.crm-client-picker { width:100%; text-align:left; padding:14px; border:1px solid transparent; border-bottom-color:var(--line); border-radius:10px; }
.crm-client-picker:hover { background:#fdf2f8; }
.crm-client-picker.active { background:var(--petal); border:1px solid #f472b6; box-shadow:inset 3px 0 var(--rose); }
.crm-client-picker strong { display:block; font-size:13px; }
.crm-client-picker small { font-size:11px; color:var(--muted); }
.crm-client-profile { border-top:4px solid var(--rose); }
.crm-client-profile .crm-avatar { width:64px; height:64px; font-size:24px; background:var(--rose); color:white; }
.crm-profile-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:22px 0; }
.crm-profile-stats>div { padding:14px; background:var(--canvas); border-radius:11px; min-width:0; }
.crm-profile-stats small { display:block; color:var(--muted); font-size:11px; }
.crm-profile-stats strong { font-size:19px; display:block; margin-top:6px; overflow-wrap:anywhere; }
.crm-debt-heading { display:flex; justify-content:space-between; align-items:center; gap:28px; background:white; border:1px solid var(--line); border-radius:20px; overflow:hidden; margin-bottom:24px; }
.crm-debt-intro { padding:18px 22px; display:flex; align-items:center; gap:16px; }
.crm-debt-intro h2 { font-family:'Playfair Display',Georgia,serif; font-size:28px; margin:0 0 5px; }
.crm-debt-total { align-self:stretch; padding:18px 24px; background:var(--rose); color:white; min-width:250px; display:flex; flex-direction:column; justify-content:center; gap:6px; }
.crm-debt-total small { font-size:11px; }
.crm-debt-total strong { font-size:32px; line-height:1.2; letter-spacing:-.03em; }
.crm-debt-total span { font-size:11px; }
.crm-debt-layout { display:grid; grid-template-columns:minmax(0,1fr) 240px; gap:24px; align-items:start; }
.crm-debt-guide { height:fit-content; padding:22px; background:#fffbeb; border-color:#fde68a; }
.crm-debt-guide h3 { font-size:21px; margin-bottom:18px; }
.crm-debt-guide ol { list-style:decimal; padding-left:18px; color:#785221; font-size:12px; line-height:1.9; }
.crm-debt-guide li+li { margin-top:12px; }
.crm-debt-guide .crm-actions { margin-top:22px; }
.crm-inventory-heading { background-color:#fffafd; background-image:linear-gradient(#fce7f3 1px,transparent 1px),linear-gradient(90deg,#fce7f3 1px,transparent 1px); background-size:24px 24px; border-left:0; border-bottom:4px solid #f472b6; }
.crm-inventory-heading>div:last-child { background:#fffafd; padding:3px 9px; border-radius:9px; }
.crm-inventory-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; padding:12px 18px; border:1px solid var(--line); border-radius:14px; background:white; }
.crm-inventory-summary>div { display:flex; align-items:center; gap:11px; }
.crm-inventory-summary strong { font-size:24px; color:var(--rose-dark); }
.crm-inventory-summary span { color:var(--muted); font-size:11px; }
#section-inventario .crm-inventory-form { background:#fffafd; border-top:4px solid #f472b6; }
.crm-finance-heading { background:#fff7ed; border-color:#fed7aa; border-left-color:#ea580c; }
.crm-finance-heading .crm-section-emblem { background:white; color:#c2410c; }
.crm-showcase-heading { background:linear-gradient(100deg,#fce7f3,white); border-left:0; border-top:4px solid var(--rose); }
.crm-logistics-heading { background:#f0fdfa; border-color:#99f6e4; border-left-color:#0d9488; }
.crm-logistics-heading .crm-section-emblem { background:white; color:#0f766e; }
.crm-activity-heading { border-left:0; border-bottom:4px solid #f472b6; }
.crm-activity-heading .crm-section-emblem { border-radius:50%; }
.crm-dialog { border:1px solid var(--line); border-radius:20px; padding:28px; width:calc(100% - 32px); max-width:490px; color:var(--ink); box-shadow:0 24px 90px #83184330; }
.crm-dialog::backdrop { background:#50072480; backdrop-filter:blur(3px); }
.crm-dialog h3 { font-family:'Playfair Display',Georgia,serif; font-size:26px; margin-bottom:12px; }
.crm-dialog label { font-size:12px; font-weight:600; display:block; margin-top:16px; }
.crm-dialog input,.crm-dialog select { width:100%; border:1px solid #dc95b8; border-radius:10px; padding:12px; }
.crm-dialog .crm-actions { margin-top:24px; }
.crm-dialog { max-height:calc(100dvh - 32px); overflow:auto; }
.crm-dialog textarea { width:100%; border:1px solid #dc95b8; border-radius:10px; padding:12px; resize:vertical; }
.crm-client-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.crm-client-fields>div { min-width:0; }
.crm-dialog .crm-error:not(:empty) { margin-top:14px; }
.crm-cancel-summary { margin:18px 0; padding:16px; border:1px solid var(--line); border-radius:14px; background:#fff7fb; }
.crm-cancel-summary>strong,.crm-cancel-summary>small { display:block; overflow-wrap:anywhere; }
.crm-cancel-summary>small { margin-top:4px; color:var(--muted); font-size:11px; }
.crm-cancel-summary ul { margin:12px 0; padding:0; list-style:none; }
.crm-cancel-summary li { display:flex; justify-content:space-between; align-items:start; gap:12px; padding:7px 0; font-size:12px; }
.crm-cancel-summary li span { min-width:0; overflow-wrap:anywhere; }
.crm-cancel-summary li strong { flex-shrink:0; }
.crm-cancel-totals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; border-top:1px solid var(--line); padding-top:12px; }
.crm-cancel-totals dt { font-size:10px; color:var(--muted); }
.crm-cancel-totals dd { margin:4px 0 0; font-size:15px; font-weight:600; overflow-wrap:anywhere; }
.crm-cancel-notice { padding:12px 14px; border-left:3px solid #be185d; border-radius:8px; background:#fce7f3; font-size:12px; line-height:1.7; color:#831843; }
.crm-cancel-notice p { margin-top:5px; }
.crm-cancel-review:not([hidden]) { margin-top:14px; padding:12px; border:1px solid #fda4af; border-radius:10px; background:#fff1f2; color:#9f1239; font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.crm-dialog .crm-btn-danger { background:#9f1239; border-color:#9f1239; color:white; }
.crm-dialog .crm-btn-danger:hover { background:#881337; }
.crm-dialog .crm-cancel-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.crm-cancel-actions .crm-btn { white-space:normal; justify-content:center; text-align:center; }
#crm-cancel-dialog textarea:focus-visible,#crm-cancel-dialog button:focus-visible { outline:3px solid #db2777; outline-offset:3px; }
#crm-cancel-dialog textarea[aria-invalid=true] { border-color:#be123c; }
#crm-cancel-dialog [aria-busy=true] { cursor:progress; }
#crm-cancel-dialog :disabled { opacity:.6; cursor:wait; }
.crm-export-ready { padding:16px; margin:18px 0; border-radius:12px; background:#ecfdf5; color:#065f46; font-size:13px; }
.crm-download { display:block; text-align:center; margin-top:18px; text-decoration:none; }
.qr-copy-row { display:flex; align-items:center; gap:12px; justify-content:space-between; margin-top:16px; padding-top:12px; border-top:1px solid var(--line); }
.qr-copy-row label { font-size:12px; font-weight:600; }
.qr-copy-row small { display:block; margin-top:4px; font-size:10px; font-weight:400; color:var(--muted); }
#app .qr-copy-row input { width:72px; min-height:42px; flex-shrink:0; padding:8px; text-align:center; border:1px solid #dc95b8; border-radius:9px; font-size:15px; }
#app .qr-copy-row input[aria-invalid=true] { border-color:#be123c; background:#fff1f2; }
.qr-card-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:12px; }
.qr-png-download { font-size:11px; font-weight:600; color:var(--rose-dark); padding:10px 0; }
.qr-print-summary { border-left:3px solid var(--rose); border-radius:8px; background:white; padding:12px 16px; }
.qr-print-summary strong { color:var(--rose-dark); font-size:14px; }
.qr-print-summary p { font-size:12px; color:var(--ink); margin:5px 0; }
.qr-print-summary small { font-size:11px; color:var(--muted); }
.qr-label-preview { display:flex; justify-content:center; padding-top:14px; }
.qr-label-preview img { width:auto; max-width:100%; height:430px; max-height:55dvh; object-fit:contain; }
#btn-qr-exportar:disabled { opacity:.5; cursor:not-allowed; }
.crm-error { color:#a5223e; font-size:12px; margin-top:10px; }
.crm-demo-banner { background:var(--petal); color:#9d174d; border-bottom:1px solid #f9a8d4; padding:9px 18px; font-size:11px; text-align:center; line-height:1.6; }
.crm-demo-banner b { font-weight:600; }
.crm-sale-product { display:flex; align-items:center; gap:8px; font-size:11px; color:var(--muted); margin-top:6px; }
.crm-sale-product .sale-product-photo { width:32px; height:38px; }

/* Venta enfocada: productos a la izquierda, clienta y pago a la derecha. */
.sale-view-switch { display:flex; gap:5px; width:fit-content; padding:4px; border:1px solid var(--line); border-radius:12px; background:white; }
.sale-view-switch button { padding:9px 18px; min-height:40px; border-radius:8px; font-size:12px; font-weight:600; color:var(--muted); }
.sale-view-switch button[aria-pressed="true"] { color:white; background:var(--rose); }
.crm-sales-heading>div:not(.sale-view-switch) { flex:1; min-width:0; }
.crm-sales-heading .sale-view-switch { margin-left:auto; flex-shrink:0; }
.sale-workspace { display:grid; grid-template-columns:minmax(0,1fr) 370px; gap:20px; align-items:start; }
.sale-products,.sale-checkout { background:white; border:1px solid var(--line); border-radius:16px; padding:22px; min-width:0; }
.sale-products { border-top:3px solid #f472b6; }
.sale-checkout { position:sticky; top:88px; background:#fffafd; scroll-margin-top:88px; }
.sale-next { display:none; margin-top:16px; }
.sale-step-heading { display:flex; align-items:center; gap:11px; margin-bottom:16px; }
.sale-step-heading>span { width:28px; height:28px; flex-shrink:0; border-radius:50%; display:grid; place-items:center; background:var(--rose); color:white; font-weight:600; font-size:12px; }
.sale-step-heading h3 { font-family:'Playfair Display',Georgia,serif; font-size:21px; line-height:1.25; margin:0; }
.sale-step-heading p { color:var(--muted); font-size:11px; margin-top:4px; }
.sale-label { display:block; color:var(--ink); font-size:12px; font-weight:500; margin:12px 0 6px; }
.sale-field { display:block; width:100%; border:1px solid #dc95b8; border-radius:10px; padding:10px 12px; font-size:13px; }
.sale-helper { font-size:11px; line-height:1.65; color:var(--muted); margin-top:8px; }
.sale-search { margin-top:0; margin-bottom:14px; }
.sale-text-button { min-height:36px; font-size:11px; color:var(--rose-dark); text-decoration:underline; text-underline-offset:3px; font-weight:500; }
.sale-product-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; max-height:360px; overflow:auto; padding:2px; }
.sale-product { display:flex; gap:11px; align-items:center; padding:13px; border:1px solid var(--line); border-radius:12px; background:#fffafd; text-align:left; min-width:0; transition:border-color .15s,background .15s; }
.sale-product:hover:not(:disabled) { border-color:var(--rose); background:var(--petal); }
.sale-product:disabled { opacity:.5; cursor:not-allowed; }
.sale-product-symbol { display:grid; place-items:center; width:34px; height:40px; flex-shrink:0; color:var(--rose); background:var(--petal); border-radius:10px; }
.sale-product-symbol svg { width:20px; height:20px; }
.sale-product-photo { position:relative; display:grid; place-items:center; width:48px; height:56px; flex-shrink:0; overflow:hidden; color:var(--rose); background:var(--petal); border:1px solid var(--line); border-radius:9px; }
.sale-product-photo svg { width:22px; height:22px; }
.sale-product-photo img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:white; }
.sale-cart-name { display:flex; align-items:center; gap:10px; min-width:0; }
.sale-cart-name>div { min-width:0; }
.sale-product-info { flex:1; min-width:0; }
.sale-product-info strong { display:block; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.sale-product-info small { display:block; font-size:10px; color:var(--muted); margin:4px 0; }
.sale-product-info b { font-size:13px; color:var(--rose-dark); }
.sale-product-add { width:25px; height:25px; border-radius:50%; color:var(--rose-dark); background:white; border:1px solid var(--line); display:grid; place-items:center; font-size:20px; flex-shrink:0; }
.sale-cart-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; border-top:1px solid var(--line); padding-top:18px; margin-top:18px; }
.sale-cart-heading h3 { font-size:14px; font-weight:600; }
.sale-products .crm-cart { margin:10px 0 0; }
.sale-cart-empty { text-align:center; padding:23px 14px; background:var(--canvas); border:1px dashed #f9a8d4; border-radius:11px; color:var(--rose-dark); font-size:13px; }
.sale-cart-empty small { display:block; margin-top:4px; font-size:11px; color:var(--muted); }
.sale-cart-item { display:grid; grid-template-columns:minmax(0,1fr) auto auto 26px; gap:8px 12px; align-items:center; padding:15px 0; border-bottom:1px solid var(--line); }
.sale-cart-item:last-child { border-bottom:0; }
.sale-cart-name strong { font-size:13px; display:block; overflow-wrap:anywhere; }
.sale-cart-name small { font-size:10px; display:block; margin-top:4px; color:var(--muted); }
.sale-quantity { display:flex; align-items:center; border:1px solid #dc95b8; border-radius:9px; overflow:hidden; }
.sale-quantity button { width:32px; min-height:36px; font-size:19px; color:var(--rose-dark); background:var(--canvas); }
.sale-quantity button:disabled { opacity:.4; }
#app .sale-quantity input[type=number] { width:44px; min-height:36px; text-align:center; border:0; font-size:13px; padding:0; appearance:textfield; }
.sale-quantity input::-webkit-inner-spin-button,.sale-quantity input::-webkit-outer-spin-button { appearance:none; margin:0; }
.sale-line-total { font-size:13px; white-space:nowrap; }
.sale-remove { min-height:36px; width:26px; font-size:24px; color:#be123c; }
.sale-price-edit { grid-column:1/-1; font-size:10px; color:var(--muted); }
.sale-price-edit summary { cursor:pointer; width:fit-content; }
.sale-price-edit label { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-top:8px; }
.sale-price-edit input { width:140px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; font-size:12px; }
.sale-payment-heading { padding-top:18px; margin-top:14px; border-top:1px solid var(--line); }
.sale-payment-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:0; padding:0; border:0; }
.sale-payment-options label { position:relative; cursor:pointer; --payment-ink:#065f46; --payment-line:#34d399; --payment-bg:#ecfdf5; --payment-active:#d1fae5; }
.sale-payment-options label:has(input[value="abono"]) { --payment-ink:#854d0e; --payment-line:#eab308; --payment-bg:#fffbeb; --payment-active:#fef3c7; }
.sale-payment-options label:has(input[value="no"]) { --payment-ink:#9f1239; --payment-line:#fb7185; --payment-bg:#fff1f2; --payment-active:#ffe4e6; }
.sale-payment-options input { position:absolute; opacity:0; width:1px; height:1px; }
.sale-payment-options label>span { display:flex; height:100%; flex-direction:column; justify-content:center; text-align:center; padding:10px 5px; border:1px solid var(--payment-line); border-radius:10px; background:var(--payment-bg); color:var(--payment-ink); }
.sale-payment-options strong { font-size:11px; line-height:1.4; font-weight:600; }
.sale-payment-options small { font-size:9px; line-height:1.4; margin-top:4px; color:var(--payment-ink); }
.sale-payment-options input:checked+span { background:var(--payment-active); border-color:var(--payment-ink); box-shadow:inset 0 0 0 1px var(--payment-ink); }
.sale-payment-options input:checked+span strong::before { content:'✓ '; }
.sale-payment-options input:focus-visible+span { outline:3px solid var(--rose-dark); outline-offset:3px; }
.sale-sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.sale-shipping { margin:18px 0; font-size:12px; color:var(--muted); }
.sale-shipping summary { cursor:pointer; padding:10px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); color:var(--ink); }
.sale-shipping summary>span { color:var(--muted); font-size:10px; margin-left:7px; }
.sale-shipping-check { display:flex; align-items:center; gap:8px; margin-top:12px; }
.sale-shipping-check input { accent-color:var(--rose); }
.sale-total { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:18px; }
.sale-total>span { font-size:12px; color:var(--muted); }
.sale-total>strong { font-size:26px; color:var(--rose-dark); letter-spacing:-.035em; }
.sale-balance { display:grid; gap:8px; margin:14px 0 18px; font-size:12px; }
.sale-balance>div { display:flex; justify-content:space-between; gap:10px; }
.sale-balance .has-debt { padding:9px 10px; border-radius:8px; background:#fff1d6; color:#854d0e; }
.sale-error { color:#a5223e; font-size:12px; line-height:1.65; margin:12px 0; }
.sale-checkout>p.sale-error:not(.hidden) { border:1px solid #fecdd3; border-radius:9px; padding:10px; background:#fff1f2; }
.sale-checkout .crm-btn:disabled { cursor:not-allowed; }
.sale-history .crm-panel-head { margin-bottom:12px; }
.sale-recovery { margin:12px 0 18px; font-size:11px; color:var(--muted); }
.sale-recovery summary { cursor:pointer; width:fit-content; }
.sale-recovery button { margin-top:8px; }
.sale-history th,.sale-history td { padding-right:14px; }
.sale-success:not(.hidden) { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; align-items:center; margin-bottom:16px; padding:14px 18px; border:1px solid #86efac; background:#f0fdf4; color:#166534; border-radius:12px; font-size:13px; }
.sale-success p { font-size:12px; margin-top:4px; }
.sale-success .crm-btn { border-color:#15803d; color:#166534; }
.sale-success .crm-btn:hover { background:#dcfce7; }
@media(min-width:1400px) {
  #app .crm-dashboard-kpis { grid-template-columns:repeat(6,minmax(0,1fr)); }
  #app .crm-dashboard-kpis .crm-kpi-value { font-size:22px; }
}
@media(min-width:1700px) { .sale-product-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(min-width:1024px) {
  #sidebar { position:sticky; top:0; height:100vh; }
  #app:has(>.crm-demo-banner) #sidebar { height:calc(100vh - 37px); }
  #app>div.flex>div.flex-1 { min-width:0; }
}
@media(max-width:1200px) {
  .crm-grid { grid-template-columns:1fr; }
  .sale-workspace { grid-template-columns:1fr; }
  .sale-checkout { position:static; }
  .sale-next { display:flex; }
  .crm-debt-layout { grid-template-columns:1fr; }
  .crm-debt-guide ol { display:flex; flex-wrap:wrap; gap:18px; padding-left:18px; }
  .crm-debt-guide li { flex:1; min-width:130px; }
  .crm-debt-guide li+li { margin-top:0; }
}
@media(max-width:900px) {
  .crm-clients { grid-template-columns:230px minmax(0,1fr); }
}
@media(max-width:760px) {
  #app main { padding:16px; }
  #app header { padding:12px 16px; }
  .crm-hero { align-items:flex-start; flex-direction:column; }
  .crm-welcome { padding:16px 18px; gap:12px; }
  .crm-welcome-actions { text-align:left; }
  .crm-welcome .crm-date { display:none; }
  .crm-clients { grid-template-columns:1fr; }
  .crm-clients>aside { max-height:270px; overflow:auto; }
  .crm-clients-heading { border-radius:28px 16px 16px 16px; padding:16px; }
  .crm-clients-heading .crm-section-emblem { width:52px; height:52px; }
  .crm-clients-intro { align-items:flex-start; gap:14px; }
  .crm-panel { padding:18px; }
  .crm-profile-stats { grid-template-columns:1fr; }
  .crm-row { flex-wrap:wrap; }
  .crm-hero h2 { font-size:25px; }
  .crm-panel-head { flex-wrap:wrap; }
  .crm-section-heading { padding:14px; align-items:flex-start; gap:12px; }
  .crm-section-heading.crm-sales-heading { padding:0; }
  .crm-sales-heading { flex-wrap:wrap; }
  .crm-sales-heading .sale-view-switch { width:100%; margin-left:0; }
  .crm-section-heading h2 { font-size:23px; }
  .crm-section-emblem { width:44px; height:44px; border-radius:12px; }
  .crm-section-emblem svg { width:24px; height:24px; }
  .crm-debt-heading { flex-direction:column; align-items:stretch; gap:0; }
  .crm-debt-intro { padding:16px; align-items:flex-start; gap:12px; }
  .crm-debt-intro h2 { font-size:28px; }
  .crm-debt-total { min-width:0; padding:16px 20px; }
  .crm-inventory-summary { gap:12px; padding:16px; }
  .crm-inventory-summary>div { flex-direction:column; align-items:flex-start; gap:2px; }
}
@media(max-width:640px) {
  #section-ventas { padding-bottom:64px; }
  #app .crm-dashboard-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  #app .crm-dashboard-kpis>div { min-height:120px; padding:13px; }
  #app .crm-dashboard-kpis .crm-kpi-value { font-size:clamp(18px,4.8vw,24px); }
  .crm-dashboard-kpis>div>p:first-of-type { font-size:9px; }
  .crm-kpi-icon { right:10px; top:10px; width:23px; height:23px; }
  .sale-products,.sale-checkout { padding:16px; }
  .sale-step-heading h3 { font-size:20px; }
  .sale-product { padding:10px; gap:6px; align-items:flex-start; }
  .sale-product-photo { width:34px; height:42px; }
  .sale-product { flex-wrap:wrap; }
  .sale-product-info { flex-basis:calc(100% - 42px); }
  .sale-product-add { display:none; }
  .crm-client-fields { grid-template-columns:1fr; gap:0; }
  .crm-dialog { padding:20px; }
  .sale-product-add { width:22px; height:22px; font-size:18px; }
  .sale-product-info strong { font-size:11px; }
  .sale-product-info small { font-size:9px; }
  .sale-product-grid { gap:8px; }
  .sale-cart-item { grid-template-columns:minmax(0,1fr) auto 26px; }
  .sale-cart-name { grid-column:1/3; }
  .sale-quantity { grid-row:2; grid-column:1; width:fit-content; }
  .sale-line-total { grid-row:2; grid-column:2; }
  .sale-remove { grid-row:1; grid-column:3; }
  .sale-quantity button { min-height:40px; width:36px; }
  .sale-view-switch { width:100%; }
  .sale-view-switch button { flex:1; padding:9px 12px; }
}
@media(max-width:480px) {
  .crm-today { gap:16px; }
  .crm-today-title { width:100%; }
  .crm-clients-intro .crm-section-emblem { display:none; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; scroll-behavior:auto!important; transition:none!important; }
}
.qr-module-fold{background:#fff;border:1px solid #fbcfe8;border-radius:16px;overflow:hidden}
.qr-module-fold>summary{cursor:pointer;padding:18px 22px;font-weight:700;color:#9d174d;min-height:56px;background:#fdf2f8}
.qr-module-fold>summary span{font-weight:400;font-size:12px;margin-left:12px;color:#831843}
.qr-module-fold>summary:focus-visible{outline:3px solid #be185d;outline-offset:-4px}
.qr-module-body{padding:22px}
.qr-view-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:16px 0}
.sample-label-preview{margin:14px 0;background:white;border:1px solid #fbcfe8;border-radius:8px;padding:8px;min-height:90px;display:grid;place-items:center;color:#9d174d;font-size:12px}
.sample-label-preview canvas{display:block;width:100%;max-width:384px;height:auto}
#sample-list input[type=checkbox]{width:18px;height:18px;accent-color:#db2777}
.thermal-selected{border-color:#f472b6!important;box-shadow:0 0 0 2px #fbcfe8}
#thermal-list{margin-top:16px}#thermal-list input[type=checkbox]{width:18px;height:18px;accent-color:#db2777}
@media(max-width:640px){.qr-module-body{padding:16px}.qr-module-fold>summary span{display:block;margin-left:0;margin-top:4px}}
