:root{color-scheme:light;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;--bg: #edf1ef;--surface: #fff;--surface-muted: #f6f8f7;--line: #d6dfda;--line-soft: #e8eeeb;--text: #17211f;--muted: #65736e;--accent: #17685f;--accent-strong: #0f544d;--danger: #8a2617;--warning: #704911;--success: #1b643f;color:#17211f;background:var(--bg);font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;letter-spacing:0}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:var(--bg)}button,input,select,textarea{font:inherit;letter-spacing:0}button{border:0}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid rgba(21,111,100,.38);outline-offset:2px}.authShell{display:grid;min-height:100vh;place-items:center;padding:24px;background:var(--bg)}.authPanel{display:grid;gap:18px;width:min(420px,100%);padding:22px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:0 18px 42px #1d2d271f}.authBrand{padding:0}.authPanel h1{margin:4px 0 8px;color:#1c2a25;font-size:28px}.authFacts{display:grid;gap:6px;padding:10px;border:1px solid #dde6e1;border-radius:8px;color:#4f5f59;background:#f8faf8;font-size:12px;font-weight:700}.appShell{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;display:grid;grid-template-rows:auto 1fr auto;gap:10px;height:100vh;padding:16px 12px;border-right:1px solid #d5ddd8;background:#fbfcfb}.brand{display:flex;align-items:center;gap:12px;padding:6px 8px 18px}.brandMark{display:grid;width:38px;height:38px;place-items:center;border-radius:8px;color:#fff;background:var(--accent);font-weight:800}.brand strong,.brand span{display:block}.brand span{margin-top:2px;color:#66736e;font-size:12px}.navList{display:grid;align-content:start;gap:3px}.navSection{display:block;margin:12px 8px 5px;color:#78847f;font-size:11px;font-weight:800;text-transform:uppercase}.navItem{display:flex;align-items:center;gap:10px;width:100%;min-height:38px;padding:8px 10px;border-radius:8px;color:#47544f;background:transparent;cursor:pointer;text-align:left}.navItem:hover,.navItem.active{color:#0c3f39;background:#e4efea}.navItem.active{box-shadow:inset 3px 0 0 var(--accent);font-weight:700}.sidebarContext{display:grid;gap:3px;padding:10px;border:1px solid var(--line);border-radius:8px;background:#fff}.sidebarContext span{color:var(--muted);font-size:11px}.sidebarContext strong{color:var(--text);font-size:13px}.main{min-width:0;padding:20px 22px 36px}.topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}.topbarActions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.pageSubtitle{max-width:760px;margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.4}.eyebrow{margin:0 0 4px;color:#687772;font-size:12px;font-weight:700;text-transform:uppercase}h1,h2,h3,p{margin-top:0}h1{margin-bottom:0;font-size:28px;line-height:1.15}h2{margin-bottom:0;font-size:18px}h3{font-size:15px}.statusPill{display:inline-flex;align-items:center;max-width:420px;min-height:34px;gap:8px;padding:8px 11px;border:1px solid #d8e1dc;border-radius:8px;color:#44524d;background:#fff;font-size:13px}.pulse{width:8px;height:8px;border-radius:999px;background:#2f9b6f}.metricGrid,.summaryGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.metric{min-height:88px;padding:13px;border:1px solid var(--line);border-left:4px solid #8a9892;border-radius:8px;background:var(--surface)}.metric span,.metric small{display:block;color:#65736e;font-size:12px}.metric strong{display:block;margin:8px 0 2px;color:#14231f;font-size:22px;line-height:1.05}.metric-success{border-left-color:var(--success)}.metric-warning{border-left-color:#c0832c}.metric-danger{border-left-color:var(--danger)}.contentGrid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:14px;align-items:start}.dashboardGrid{grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr)}.customerGrid{grid-template-columns:300px minmax(0,1fr)}.accountantGrid{grid-template-columns:minmax(0,1fr) 360px}.settingsGrid{grid-template-columns:minmax(0,1fr) 320px}.wide{grid-row:span 2}.panel{min-width:0;padding:13px;border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:0 1px 2px #121f1b08}.panelHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.panelTitle{display:flex;align-items:center;gap:8px;color:#123c37}.panelTitle svg{color:#156f64}.taskList,.stackedRows,.noteList,.timeline,.reviewGrid{display:grid;gap:9px}.taskItem,.reviewItem{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:12px;border:1px solid #e1e7e3;border-left:4px solid #7e8b85;border-radius:8px;background:#fbfcfb}.taskActions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.queueSummary,.tableSummary{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}.queueSummary span,.tableSummary span{min-height:26px;padding:5px 8px;border:1px solid #dde6e1;border-radius:8px;color:#4f5f59;background:#f8faf8;font-size:12px;font-weight:700}.taskMetaRow{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:9px}.mutedText{color:#697773;font-size:12px}.priority-alta{border-left-color:#bd4c3b}.priority-media{border-left-color:#c0832c}.priority-baja{border-left-color:#548267}.taskItem h3,.reviewItem h3{margin:8px 0 5px}.taskItem p,.reviewItem p,.timelineItem p{margin-bottom:0;color:#4d5a55;font-size:13px;line-height:1.45}.rowGap{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.priorityBadge,.statusBadge,.confidence,.stateText{display:inline-flex;align-items:center;min-height:24px;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}.statusBadge{color:#36515f;background:#e4eef2}.priorityBadge.alta{color:#7a261c;background:#fae3de}.priorityBadge.media{color:#704911;background:#f7ead2}.priorityBadge.baja{color:#26583b;background:#def0e5}.statusBadge.vencido{color:#822617;background:#ffe3dc}.statusBadge.pendiente{color:#6b4a08;background:#fff1cd}.statusBadge.listo-para-enviar,.statusBadge.revisar{color:#633c93;background:#efe5ff}.statusBadge.falta-comprobante{color:#8a3c16;background:#ffe9d7}.statusBadge.aprobado{color:#1b643f;background:#dff3e7}.statusBadge.sin-riesgo,.statusBadge.manual,.statusBadge.archivo,.statusBadge.email,.statusBadge.drive,.statusBadge.whatsapp{color:#36515f;background:#e4eef2}.statusBadge.riesgo-alto{color:#822617;background:#ffe3dc}.statusBadge.riesgo-medio{color:#704911;background:#f7ead2}.statusBadge.riesgo-bajo{color:#26583b;background:#def0e5}.statusBadge.cobranza,.statusBadge.documento,.statusBadge.contador,.statusBadge.tarea,.confidence{color:#36515f;background:#e4eef2}.actionButton,.primaryButton,.smallButton,.ghostButton,.dangerButton,.iconButton,.linkButton,.customerButton{display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:8px;cursor:pointer}.actionButton,.primaryButton{min-height:36px;padding:9px 12px;color:#fff;background:#156f64;font-weight:700}.actionButton:hover,.primaryButton:hover{background:#0f5c53}.smallButton,.ghostButton{min-height:32px;padding:7px 10px;border:1px solid #ced9d4;color:#1d544d;background:#fff;font-weight:700}.tableActions{display:flex;flex-wrap:wrap;gap:7px}.smallButton:disabled,.primaryButton:disabled{cursor:not-allowed;opacity:.45}.ghostButton:hover,.smallButton:hover{border-color:#aebdb7;background:#f7faf8}.dangerButton{min-height:32px;padding:7px 10px;border:1px solid #f1c5bd;color:#8a2617;background:#fff4f1;font-weight:700}.iconButton{width:34px;height:34px;color:#4e5a56;background:#eef2ef}.linkButton{color:#125e55;background:transparent;font-weight:700;padding:0;text-align:left}.full,.fullWidth{width:100%}.buttonGroup{display:flex;flex-wrap:wrap;gap:6px}.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:12px}.searchBox{display:inline-flex;align-items:center;min-width:min(320px,100%);min-height:34px;gap:8px;padding:7px 10px;border:1px solid #ced9d4;border-radius:8px;color:#52615c;background:#fff}.searchBox input{width:100%;min-width:0;border:0;outline:0;color:#1e2a26;background:transparent}.compactSearch{width:100%;min-width:0;margin-bottom:10px}.actionCell{display:flex;flex-wrap:wrap;gap:6px}.promiseActions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}.compactButton{min-height:28px;padding:5px 8px;font-size:12px}.tableWrap{width:100%;overflow-x:auto}table{width:100%;min-width:860px;border-collapse:separate;border-spacing:0}th,td{padding:9px 10px;border-bottom:1px solid #e7ece9;text-align:left;vertical-align:top;font-size:13px}th{position:sticky;top:0;z-index:1;color:#65736e;font-size:12px;font-weight:800;background:#f4f7f5}.numericCell,.moneyDue,.moneyOk{text-align:right;font-variant-numeric:tabular-nums}tbody tr:hover{background:#f9fbfa}.attentionRow{background:#fffaf8}.settledRow{color:#5c6964;background:#fbfcfb}td small{display:block;max-width:360px;margin-top:4px;color:#697773;line-height:1.35}.compact table{min-width:520px}.moneyDue{color:#8a2617;font-weight:800}.moneyOk{color:#1b643f;font-weight:800}.subtleGap{margin-top:7px}.compactRow{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:54px;padding:9px 10px;border:1px solid #e6ece8;border-radius:8px;background:#fbfcfb}.compactRow strong,.compactRow span{display:block}.compactRow span{margin-top:3px;color:#697773;font-size:12px}.alignRight{text-align:right}.muted{opacity:.8}.stateText.approved,.stateText.sent{color:#1b643f}.stateText.rejected{color:#822617}.customerList{position:sticky;top:18px}.customerButton{display:grid;width:100%;justify-items:start;min-height:56px;padding:10px;border:1px solid #e2e9e5;color:#26332f;background:#fbfcfb}.customerButton.active{border-color:#9bc7bc;background:#e8f3ef}.customerButton span{color:#697773;font-size:12px}.customerHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:12px;margin-bottom:14px;border:1px solid #e6ece8;border-radius:8px;background:#fbfcfb}.customerHeader h2{margin:4px 0;font-size:24px}.customerHeader p:last-child{margin:0;color:#5c6964;font-size:13px}.splitColumns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.sectionTitle{margin:16px 0 9px;color:#273832}.timelineItem,.noteItem,.aiNote,.adapterItem{padding:10px;border:1px solid #e4eae7;border-radius:8px;background:#fbfcfb}.timelineItem strong{font-size:13px}.timelineItem.outbound{border-color:#b7d8ce;background:#f0f8f5}.timelineItem.inbound{border-color:#e2e0d6}.whatsappInbox{display:grid;grid-template-columns:360px minmax(0,1fr);min-height:690px;overflow:hidden;border:1px solid var(--line);border-radius:8px;background:var(--surface)}.waListPane{display:grid;grid-template-rows:auto auto auto auto minmax(0,1fr);min-width:0;border-right:1px solid var(--line);background:#fbfcfb}.waPaneHeader,.waThreadHeader,.waComposerBar{display:flex;align-items:center;gap:10px;min-height:58px;padding:10px 12px;border-bottom:1px solid var(--line-soft);background:#f6f8f7}.waPaneHeader{justify-content:space-between}.waPaneHeader h2,.waThreadHeader h2{margin:0}.waStats,.waFilters{display:flex;flex-wrap:wrap;gap:6px;padding:8px 10px;border-bottom:1px solid var(--line-soft)}.waStats span{padding:4px 7px;border:1px solid #dfe7e3;border-radius:999px;color:var(--muted);background:#fff;font-size:11px;font-weight:800}.waConversationList{overflow:auto}.waConversation{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;width:100%;min-height:68px;padding:9px 10px;border-bottom:1px solid var(--line-soft);color:var(--text);background:transparent;text-align:left;cursor:pointer}.waConversation:hover,.waConversation.active{background:#eef7f3}.waAvatar{display:grid;width:38px;height:38px;place-items:center;border-radius:999px;color:#fff;background:var(--accent);font-size:12px;font-weight:900}.waAvatar.large{width:42px;height:42px}.waConversationBody{min-width:0}.waConversationTop,.waConversationBottom,.waBubbleMeta,.waProviderMeta{display:flex;align-items:center;gap:8px}.waConversationTop{justify-content:space-between}.waConversationTop strong,.waConversationBottom span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.waConversationTop span,.waConversationBottom span{color:var(--muted);font-size:12px}.waConversationBottom{justify-content:space-between;margin-top:5px}.waUnread{display:inline-grid;min-width:20px;height:20px;place-items:center;border-radius:999px;color:#fff;background:var(--accent);font-size:11px;font-weight:900}.intentPill{display:inline-flex;max-width:112px;align-items:center;justify-content:center;padding:3px 7px;border:1px solid #bed7cf;border-radius:999px;color:#10574f;background:#e7f4ef;font-size:11px;font-weight:900;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.waThreadPane{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;min-width:0;background:#f3f5f2}.waThreadHeader{justify-content:space-between}.waThreadHeader>div:nth-child(2){flex:1;min-width:0}.waThreadHeader span{color:var(--muted);font-size:12px}.waThreadActions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.waOpsBar{display:flex;flex-wrap:wrap;gap:8px;padding:8px 12px;border-bottom:1px solid var(--line-soft);background:#fff}.waOpsBar span{color:var(--muted);font-size:12px;font-weight:700}.waMessageThread{display:grid;align-content:start;gap:9px;overflow:auto;padding:16px 18px}.waBubble{max-width:min(680px,78%);padding:9px 10px;border:1px solid #dde6e1;border-radius:8px;background:#fff;box-shadow:0 1px 1px #121f1b0a}.waBubble.inbound{justify-self:start}.waBubble.outbound{justify-self:end;border-color:#c5ded6;background:#e8f5ef}.waBubble p{margin:0;color:#1f2f2a;font-size:13px;line-height:1.45}.waIntentCard,.intentSummary{display:grid;gap:5px;margin-top:8px;padding:8px;border:1px solid #d4e1dc;border-radius:8px;background:#f8fbf9;color:#2e3c37;font-size:12px}.waIntentCard>div:first-child{display:flex;justify-content:space-between;gap:10px}.waIntentCard strong,.intentSummary strong{color:#123c37}.waIntentCard span,.waIntentCard small,.intentSummary span{color:var(--muted)}.compactActions{margin-top:2px}.waBubbleMeta,.waProviderMeta{justify-content:flex-end;margin-top:7px;color:var(--muted);font-size:11px}.waProviderMeta{justify-content:flex-start;flex-wrap:wrap;padding-top:7px;border-top:1px solid rgba(96,112,106,.18);overflow-wrap:anywhere}.waProviderMeta strong{color:var(--danger);font-weight:800}.waComposerBar{justify-content:flex-end;border-top:1px solid var(--line-soft);border-bottom:0}.inlineNotice{padding:10px 12px;border:1px solid #d8e2dd;border-radius:8px;background:#f7faf8;color:#33413b;font-size:13px;line-height:1.45}.bodyCopy{color:#4d5a55;font-size:13px;line-height:1.5}.aiNote{display:flex;align-items:flex-start;gap:8px;color:#3d514b;background:#eef7f3}.inlineSelect{min-width:150px;min-height:30px;padding:4px 8px;border:1px solid #d5ddd8;border-radius:8px;color:#2d3935;background:#fff}.segmented{display:inline-flex;overflow:hidden;border:1px solid #ced9d4;border-radius:8px;background:#fff}.segmented button{min-height:32px;padding:7px 10px;color:#52615c;background:transparent;cursor:pointer}.segmented button.active{color:#fff;background:#156f64;font-weight:800}.reviewItem{align-items:stretch}.reviewActions{display:flex;min-width:126px;flex-direction:column;gap:7px}.draftPreview{margin:10px 0 0;padding:10px;overflow-x:auto;border:1px solid #dce5e0;border-radius:8px;color:#25342f;background:#f6f8f7;font-family:inherit;font-size:13px;line-height:1.45;white-space:pre-wrap}.compactEvidence{margin-top:10px}.adapterGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.adapterItem{display:grid;gap:7px}.adapterItem span{color:#697773;font-size:13px}.settingsForm{display:grid;gap:9px}.settingsReadiness{grid-column:1 / -1}.readinessGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.readinessGrid>div{display:grid;align-content:start;gap:7px;min-height:104px;padding:10px;border:1px solid var(--line-soft);border-radius:8px;background:var(--surface-muted)}.readinessGrid strong,.readinessGrid span{display:block}.readinessGrid strong{color:#23332e;font-size:13px}.readinessGrid span:not(.statusBadge){color:var(--muted);font-size:12px;line-height:1.35}.settingsGroupTitle{grid-column:1 / -1;display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:4px 2px 0;color:#2f403a}.settingsGroupTitle strong{font-size:13px;text-transform:uppercase}.settingsGroupTitle span{color:#697773;font-size:12px}.twoColumnForm{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.checkRow{display:flex;align-items:center;gap:9px;min-height:36px;padding:8px 10px;border:1px solid #e4eae7;border-radius:8px;background:#fbfcfb;color:#293833;font-size:13px;font-weight:700}.checkRow input{width:16px;height:16px}.errorBox{display:grid;gap:5px;margin-top:10px;padding:10px;border:1px solid #f1c5bd;border-radius:8px;color:#8a2617;background:#fff4f1;font-size:13px}.emptyState{display:grid;min-height:120px;place-items:center;padding:18px;border:1px dashed #cad6d0;border-radius:8px;color:#5c6964;text-align:center}.emptyState strong,.emptyState span{display:block}.draftPanel{position:fixed;top:0;right:0;z-index:10;display:grid;grid-template-rows:auto auto 1fr auto;gap:12px;width:min(460px,100vw);height:100vh;padding:18px;border-left:1px solid #d1dbd6;background:#fff;box-shadow:-18px 0 42px #1d2d272e}.draftHeader{display:flex;justify-content:space-between;gap:12px}.fieldLabel{color:#44524d;font-size:13px;font-weight:800}textarea{width:100%;min-height:250px;resize:vertical;padding:12px;border:1px solid #cfdad4;border-radius:8px;color:#1e2a26;line-height:1.5}.shortTextarea{min-height:120px}.codeTextarea{min-height:180px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:12px}.numberInput{width:100%;min-height:40px;padding:9px 10px;border:1px solid #cfdad4;border-radius:8px;color:#1e2a26}.evidenceBox{display:grid;gap:5px;padding:10px;border-radius:8px;color:#3c4b45;background:#eef3f1;font-size:13px}.segmentedControl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:4px;border:1px solid #d4ded9;border-radius:8px;background:#f3f6f4}.segmentedControl button{min-height:34px;border:0;border-radius:6px;color:#52615b;background:transparent;font-weight:800;cursor:pointer}.segmentedControl button.active{color:#103f38;background:#fff;box-shadow:0 1px 2px #121f1b14}.templateEditor{display:grid;gap:10px;padding:10px;border:1px solid #dce5e0;border-radius:8px;background:#fbfcfb}.adapterItem.compact{padding:8px}.matchList{display:grid;gap:8px;overflow:auto}.matchItem{display:grid;gap:4px;width:100%;padding:10px;border:1px solid #d5ded9;border-radius:8px;color:#23312c;background:#fff;text-align:left;cursor:pointer}.matchItem.selected{border-color:#156f64;background:#eef7f4}.matchItem span{color:#60706a;font-size:13px}@media(max-width:1120px){.metricGrid,.summaryGrid,.readinessGrid,.contentGrid,.dashboardGrid,.customerGrid,.accountantGrid,.settingsGrid,.splitColumns,.adapterGrid{grid-template-columns:1fr 1fr}.wide{grid-row:auto;grid-column:1 / -1}.customerList{position:static}.whatsappInbox{grid-template-columns:330px minmax(0,1fr)}}@media(max-width:820px){.appShell{grid-template-columns:1fr}.sidebar{position:static;height:auto;border-right:0;border-bottom:1px solid #d5ddd8}.navList{grid-template-columns:repeat(2,minmax(0,1fr))}.main{padding:16px}.topbar,.customerHeader{display:grid}.topbarActions{justify-content:flex-start}.metricGrid,.summaryGrid,.readinessGrid,.contentGrid,.dashboardGrid,.customerGrid,.accountantGrid,.settingsGrid,.splitColumns,.twoColumnForm,.adapterGrid,.taskItem,.reviewItem{grid-template-columns:1fr}.taskActions{justify-content:flex-start}.reviewActions{min-width:0;flex-direction:row;flex-wrap:wrap}.settingsGroupTitle{display:grid}.whatsappInbox{grid-template-columns:1fr;min-height:auto}.waListPane{border-right:0;border-bottom:1px solid var(--line)}.waConversationList{max-height:360px}.waThreadHeader,.waComposerBar{align-items:flex-start;flex-wrap:wrap}.waThreadActions,.waComposerBar{justify-content:flex-start}.waMessageThread{min-height:360px;padding:12px}.waBubble{max-width:92%}}
