.wa-shell { display:grid; gap:18px; padding:22px; background:#f5f7fb; }
.wa-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:16px; border:1px solid #e2e8f0; border-radius:16px; background:#fff; box-shadow:0 8px 24px rgba(15,23,42,.04); }
.wa-filter { display:grid; gap:6px; min-width:130px; }
.wa-filter.grow { flex:1 1 210px; }
.wa-filter label { color:#64748b; font-size:11px; font-weight:800; letter-spacing:.055em; text-transform:uppercase; }
.wa-filter input,.wa-filter select { height:40px; padding:0 11px; border:1px solid #dbe3ee; border-radius:9px; background:#fff; color:#172033; font:inherit; font-size:13px; }
.wa-filter input:focus,.wa-filter select:focus { outline:3px solid rgba(79,70,229,.12); border-color:#818cf8; }
.wa-actions { display:flex; gap:8px; margin-left:auto; }
.wa-source-strip { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.wa-source-label { margin-right:4px; color:#64748b; font-size:12px; font-weight:700; }
.wa-source { display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid #dbe3ee; border-radius:999px; background:#fff; color:#475569; font-size:12px; font-weight:700; }
.wa-source::before { content:""; width:7px; height:7px; border-radius:50%; background:#94a3b8; }
.wa-source.active,.wa-source.used { border-color:#a7f3d0; background:#ecfdf5; color:#047857; }
.wa-source.active::before,.wa-source.used::before { background:#10b981; box-shadow:0 0 0 3px rgba(16,185,129,.13); }
.wa-source.configured_not_used::before,.wa-source.future_reader_selected::before { background:#f59e0b; }
.wa-source small { color:inherit; font-weight:600; opacity:.82; }
.wa-kpis { display:grid; grid-template-columns:repeat(5,minmax(145px,1fr)); gap:12px; }
.wa-kpi { position:relative; min-height:126px; padding:17px; overflow:hidden; border:1px solid #e2e8f0; border-radius:16px; background:#fff; box-shadow:0 8px 24px rgba(15,23,42,.045); }
.wa-kpi::after { content:""; position:absolute; width:76px; height:76px; right:-25px; bottom:-34px; border-radius:50%; background:var(--kpi-glow,#e0e7ff); opacity:.7; }
.wa-kpi-label { color:#64748b; font-size:11px; font-weight:800; letter-spacing:.045em; text-transform:uppercase; }
.wa-kpi-value { margin-top:9px; color:#15233a; font-size:29px; font-weight:850; line-height:1; letter-spacing:-.035em; }
.wa-kpi-note { margin-top:9px; color:#64748b; font-size:12px; line-height:1.35; }
.wa-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(310px,.75fr); gap:14px; }
.wa-card { min-width:0; border:1px solid #e2e8f0; border-radius:16px; background:#fff; box-shadow:0 8px 24px rgba(15,23,42,.04); }
.wa-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:17px 18px 12px; }
.wa-card-head h3 { margin:0; color:#172033; font-size:15px; font-weight:850; }
.wa-card-head p { margin:4px 0 0; color:#64748b; font-size:12px; }
.wa-chart-legend { display:flex; gap:13px; color:#64748b; font-size:11px; }
.wa-chart-legend span::before { content:""; display:inline-block; width:8px; height:8px; margin-right:5px; border-radius:50%; background:var(--legend); }
.wa-chart { height:286px; padding:4px 14px 14px; }
.wa-chart svg { display:block; width:100%; height:100%; overflow:visible; }
.wa-chart text { fill:#8290a5; font-size:10px; }
.wa-empty { display:grid; place-items:center; min-height:180px; padding:24px; color:#64748b; text-align:center; }
.wa-funnel { display:grid; gap:10px; padding:4px 18px 18px; }
.wa-funnel-row { display:grid; grid-template-columns:92px minmax(0,1fr) 50px; align-items:center; gap:9px; }
.wa-funnel-label { color:#475569; font-size:12px; font-weight:700; }
.wa-funnel-track { height:27px; overflow:hidden; border-radius:7px; background:#eef2f7; }
.wa-funnel-fill { display:flex; align-items:center; height:100%; min-width:3px; padding-left:8px; border-radius:7px; background:linear-gradient(90deg,#4f46e5,#818cf8); color:#fff; font-size:10px; font-weight:800; transition:width .35s ease; }
.wa-funnel-value { color:#172033; font-size:12px; font-weight:850; text-align:right; }
.wa-table-wrap { overflow:auto; max-height:440px; border-top:1px solid #edf1f6; }
.wa-table { width:100%; border-collapse:collapse; font-size:12px; }
.wa-table th { position:sticky; top:0; z-index:1; padding:10px 12px; border-bottom:1px solid #dbe3ee; background:#f8fafc; color:#64748b; font-size:10px; font-weight:850; letter-spacing:.04em; text-align:right; text-transform:uppercase; white-space:nowrap; }
.wa-table th:first-child,.wa-table td:first-child { text-align:left; }
.wa-table td { padding:11px 12px; border-bottom:1px solid #edf1f6; color:#334155; text-align:right; white-space:nowrap; }
.wa-table tr:hover td { background:#fafbff; }
.wa-table-name { display:block; max-width:250px; overflow:hidden; color:#172033; font-weight:800; text-overflow:ellipsis; }
.wa-mode { display:inline-flex; margin-top:3px; padding:3px 6px; border-radius:999px; background:#eef2ff; color:#4f46e5; font-size:9px; font-weight:800; text-transform:uppercase; }
.wa-lower { display:grid; grid-template-columns:1.2fr .8fr; gap:14px; }
.wa-acquisition { display:grid; gap:10px; padding:4px 18px 18px; }
.wa-source-row { display:grid; grid-template-columns:minmax(100px,1fr) 2fr 52px; align-items:center; gap:10px; }
.wa-source-name { overflow:hidden; color:#475569; font-size:12px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.wa-source-bar { height:9px; border-radius:999px; background:#eef2f7; }
.wa-source-bar i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#06b6d4,#3b82f6); }
.wa-source-count { color:#172033; font-size:12px; font-weight:800; text-align:right; }
.wa-ai { display:grid; grid-template-rows:auto 1fr auto; min-height:430px; overflow:hidden; background:linear-gradient(145deg,#111827,#18243b); border-color:#26344e; color:#e5edf8; }
.wa-ai .wa-card-head h3 { color:#fff; }
.wa-ai .wa-card-head p { color:#9fb0c8; }
.wa-ai-badge { padding:5px 8px; border:1px solid #394967; border-radius:999px; color:#a7f3d0; font-size:10px; font-weight:800; }
.wa-ai-messages { display:flex; flex-direction:column; gap:10px; max-height:360px; padding:8px 18px 16px; overflow:auto; }
.wa-ai-message { max-width:92%; padding:11px 13px; border-radius:13px; font-size:12px; line-height:1.55; white-space:pre-wrap; }
.wa-ai-message.assistant { align-self:flex-start; background:#23314a; color:#dbe7f6; }
.wa-ai-message.user { align-self:flex-end; background:#4f46e5; color:#fff; }
.wa-ai-message.error { background:#491f2b; color:#fecdd3; }
.wa-ai-suggestions { display:flex; flex-wrap:wrap; gap:6px; padding:0 18px 10px; }
.wa-ai-suggestions button { padding:6px 8px; border:1px solid #3c4c68; border-radius:999px; background:transparent; color:#b9c8dc; font:inherit; font-size:10px; cursor:pointer; }
.wa-ai-form { display:grid; grid-template-columns:1fr auto; gap:8px; padding:12px 14px; border-top:1px solid #2d3b55; background:#101827; }
.wa-ai-form textarea { min-height:42px; max-height:100px; resize:vertical; padding:10px 11px; border:1px solid #394967; border-radius:10px; background:#18243a; color:#fff; font:inherit; font-size:12px; }
.wa-ai-form button { align-self:end; height:42px; padding:0 15px; border:0; border-radius:10px; background:#818cf8; color:#fff; font-weight:800; cursor:pointer; }
.wa-ai-form button:disabled { opacity:.55; cursor:wait; }
.wa-loading { padding:70px 20px; color:#64748b; text-align:center; }
.wa-loading::before { content:""; display:block; width:28px; height:28px; margin:0 auto 12px; border:3px solid #e2e8f0; border-top-color:#4f46e5; border-radius:50%; animation:wa-spin .8s linear infinite; }
@keyframes wa-spin { to { transform:rotate(360deg); } }
@media(max-width:1200px) { .wa-kpis{grid-template-columns:repeat(3,1fr)} .wa-grid,.wa-lower{grid-template-columns:1fr} }
@media(max-width:720px) { .wa-shell{padding:12px} .wa-kpis{grid-template-columns:repeat(2,1fr)} .wa-toolbar{align-items:stretch} .wa-filter{min-width:calc(50% - 8px)} .wa-actions{width:100%;margin-left:0} .wa-actions button{flex:1} .wa-grid{grid-template-columns:1fr} }
