.card { background: #fff; border-radius: 1rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05); border: 1px solid #e2e8f0; }
.pill { border-radius: 9999px; padding: .3rem .65rem; font-weight: 600; white-space: nowrap; }
.tab-btn { padding: .4rem .8rem; border-radius: .6rem; color: #cbd5e1; font-weight: 600; transition: all .15s; }
.tab-btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.tab-btn.active { background: #fff; color: #0f172a; }
.icon-btn { width: 2.25rem; height: 2.25rem; border-radius: 9999px; display: grid; place-items: center; background: #f1f5f9; transition: background .15s; flex-shrink: 0; }
.icon-btn:hover { background: #e2e8f0; }
.icon-btn.on { background: #fee2e2; animation: pulse 1.2s infinite; }
.btn-sm { font-size: .75rem; font-weight: 600; padding: .35rem .7rem; border-radius: .5rem; background: #f1f5f9; transition: background .15s; }
.btn-sm:hover { background: #e2e8f0; }
.map-ctl { font-size: .75rem; background: #fff; border: 1px solid #cbd5e1; border-radius: .5rem; padding: .3rem .5rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); display: inline-flex; align-items: center; gap: .3rem; }
.inp { display: block; width: 100%; margin-top: .2rem; border: 1px solid #cbd5e1; border-radius: .5rem; padding: .45rem .6rem; font-size: .85rem; }
.dot { width: .65rem; height: .65rem; border-radius: 9999px; display: inline-block; }
.chat { background: #efeae2 url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23d6cfc4'/%3E%3C/svg%3E"); }
.bubble { max-width: 85%; padding: .5rem .7rem; border-radius: .8rem; font-size: .83rem; line-height: 1.3rem; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { margin-left: auto; background: #d9fdd3; border-top-right-radius: .2rem; }
.bubble.bot { background: #fff; border-top-left-radius: .2rem; }
.bubble .meta { font-size: .65rem; color: #64748b; margin-top: .2rem; text-align: right; }
.chip { font-size: .7rem; padding: .25rem .55rem; border-radius: 9999px; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; cursor: pointer; white-space: nowrap; }
.chip:hover { background: #d1fae5; }
.agent { border: 1px solid #e2e8f0; border-radius: .8rem; padding: .55rem .75rem; display: grid; grid-template-columns: 2rem 1fr auto; gap: .6rem; align-items: center; background: #f8fafc; transition: all .3s; }
.agent .ic { width: 2rem; height: 2rem; border-radius: .6rem; display: grid; place-items: center; background: #e2e8f0; font-size: 1rem; }
.agent.running { border-color: #f59e0b; background: #fffbeb; }
.agent.running .ic { animation: pulse 0.8s infinite; background: #fde68a; }
.agent.done { border-color: #a7f3d0; background: #f0fdf4; }
.agent.done .ic { background: #bbf7d0; }
.agent .ms { font-family: ui-monospace, monospace; font-size: .7rem; color: #64748b; }
.badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .68rem; font-weight: 700; padding: .12rem .45rem; border-radius: .4rem; color: #fff; white-space: nowrap; }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; margin: 0 1px; animation: blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
.factor-bar { height: .4rem; border-radius: 9999px; background: linear-gradient(90deg, #f97316, #dc2626); }
.kpi { padding: .8rem 1rem; }
.kpi .v { font-size: 1.6rem; font-weight: 800; color: #0f172a; line-height: 2rem; }
.kpi .l { font-size: .7rem; color: #64748b; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.kpi .s { font-size: .7rem; color: #94a3b8; }
#tbl tr { border-top: 1px solid #f1f5f9; cursor: pointer; }
#tbl tr:hover { background: #f8fafc; }
#tbl td { padding: .4rem .3rem; white-space: nowrap; }
.hot-pulse { animation: hot 2s infinite; }
.toast { background: #0f172a; color: #fff; padding: .6rem 1rem; border-radius: .7rem; font-size: .8rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); animation: rise .25s ease-out; }
.logo-pulse { box-shadow: 0 0 0 0 rgba(249, 115, 22, .6); animation: ring 2.4s infinite; }
.leaflet-popup-content { font-size: .78rem; margin: .6rem .8rem; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .55); } 70% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); } 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); } }
@keyframes hot { 0%, 100% { opacity: .9; } 50% { opacity: .35; } }
.new-row { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: #fef3c7; } to { background: transparent; } }

.leaflet-tile-pane { filter: grayscale(.75) contrast(1.05) brightness(1.04); }
