/* ===== Painel (app) e Admin ===== */
body.app{background:var(--bg-soft)}
.shell{display:grid;grid-template-columns:240px 1fr;min-height:100vh}
@media(max-width:900px){.shell{grid-template-columns:1fr}.sidebar{display:none}}
.sidebar{background:var(--navy);padding:24px 16px;display:flex;flex-direction:column;gap:4px}
.sidebar .logo{color:#fff;font-size:14px;margin-bottom:24px}
.sidebar .logo img{width:38px;height:38px}
.side-item{display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:8px;font-size:13px;font-weight:500;color:var(--side-text)}
.side-item:hover{color:#fff}
.side-item.active{background:var(--indigo);color:#fff;font-weight:600}
.main{display:flex;flex-direction:column;min-width:0}
.topbar{background:#fff;border-bottom:1px solid var(--border);padding:18px 32px;display:flex;justify-content:space-between;align-items:center}
.topbar h1{font-size:19px}
.topbar .right{display:flex;align-items:center;gap:16px;font-size:14px;font-weight:600}
.topbar .avatar{width:34px;height:34px;border-radius:99px;background:var(--indigo-soft);color:var(--indigo);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600}
.body{padding:24px 32px;display:flex;flex-direction:column;gap:20px}

.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
@media(max-width:900px){.stats{grid-template-columns:1fr 1fr}}
.stat{background:#fff;border:1px solid var(--border);border-radius:12px;padding:18px 20px;display:flex;flex-direction:column;gap:6px}
.stat .l{font-size:12.5px;color:var(--muted);font-weight:500}
.stat .v{font-size:24px;font-weight:700}
.stat .n{font-size:12px;font-weight:500}

.alert{border-radius:10px;padding:12px 16px;font-size:13.5px;font-weight:500;display:flex;gap:10px;align-items:center}
.alert-warn{background:var(--amber-soft);color:#8c6606;border:1px solid #f5d98c}
.banner-dark{background:var(--navy);color:#fff;border-radius:12px;padding:18px 22px;font-size:14.5px;font-weight:600;line-height:1.5}

.panel{background:#fff;border:1px solid var(--border);border-radius:12px;overflow:hidden}
.panel-head{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid var(--border)}
.panel-head b{font-size:14.5px}
.panel-head a{font-size:12.5px;font-weight:600;color:var(--indigo);cursor:pointer}
.list-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 18px;border-bottom:1px solid var(--border)}
.list-row:last-child{border-bottom:0}
.list-row .t b{display:block;font-size:13.5px;font-weight:600}
.list-row .t span{font-size:12px;color:var(--muted)}
.cols{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;align-items:start}
.cols-2{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
@media(max-width:900px){.cols,.cols-2{grid-template-columns:1fr}}

.table{width:100%;border-collapse:collapse;font-size:12.5px}
.table th{background:#f4f6fa;color:var(--muted);font-size:11px;font-weight:600;text-align:left;padding:12px 14px;letter-spacing:.04em}
.table td{padding:13px 14px;border-top:1px solid var(--border);color:var(--slate);vertical-align:middle}
.table td:first-child{font-weight:600;color:var(--navy)}
.table-wrap{overflow-x:auto}

.filters{display:flex;gap:10px;flex-wrap:wrap}
.chip{padding:8px 14px;border:1px solid var(--border);border-radius:8px;background:#fff;font-size:13px;font-weight:500;color:var(--slate)}
.tabs{display:flex;gap:8px;flex-wrap:wrap}
.tab{padding:8px 16px;border-radius:99px;border:1px solid var(--border);background:#fff;font-size:13px;font-weight:600;color:var(--slate)}
.tab.active{background:var(--navy);border-color:var(--navy);color:#fff}
.search{flex:1;min-width:180px;border:1px solid var(--border);border-radius:8px;padding:8px 14px;font:inherit;font-size:13px;background:#fff;color:var(--muted)}

.progress{height:10px;background:#e5e9f0;border-radius:5px;overflow:hidden}
.progress i{display:block;height:100%;border-radius:5px;background:var(--amber)}

/* agenda semanal */
.week{display:grid;grid-template-columns:repeat(5,1fr);background:#fff;border:1px solid var(--border);border-radius:12px;overflow:hidden}
@media(max-width:900px){.week{grid-template-columns:1fr}}
.day-col{padding:14px 12px;border-left:1px solid var(--border);display:flex;flex-direction:column;gap:10px;min-height:340px}
.day-col:first-child{border-left:0}
.day-col .dh{font-size:12px;font-weight:600;color:var(--muted)}
.apt{border-radius:8px;padding:8px 10px;display:flex;flex-direction:column;gap:2px}
.apt .h{font-size:11.5px;font-weight:700}
.apt .t{font-size:12px;font-weight:600;color:var(--navy);line-height:1.3}
.apt .p{font-size:11px;color:var(--slate)}

/* recados */
.recado{background:#fff;border:1px solid var(--border);border-radius:12px;padding:16px 20px;display:flex;flex-direction:column;gap:10px}
.recado-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.recado-head .who{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:14.5px;font-weight:600}
.recado-head .who span{font-size:12.5px;color:var(--muted);font-weight:400}
.recado .msg{font-size:13.5px;line-height:1.5}
.recado .ia{font-size:12.5px;color:var(--muted);font-weight:500}
.recado .acts{display:flex;gap:8px;flex-wrap:wrap}

/* chat de teste */
.chat{display:flex;flex-direction:column}
.chat-log{padding:18px;display:flex;flex-direction:column;gap:12px}
.bubble-wrap{display:flex;flex-direction:column;gap:3px}
.bubble-wrap.me{align-items:flex-end}
.bubble{max-width:80%;padding:10px 14px;border-radius:12px;font-size:13px;line-height:1.45;background:#eef1f6}
.bubble-wrap.me .bubble{background:var(--indigo);color:#fff}
.bubble-wrap .who{font-size:10.5px;color:var(--muted);font-weight:500}
.intent{margin:0 18px 16px;background:var(--indigo-soft);border-radius:8px;padding:10px 12px;font-size:11px;color:var(--slate)}
.intent b{display:block;font-size:11.5px;color:var(--indigo)}
.chat-input{display:flex;gap:8px;padding:0 18px 18px}
.chat-input input{flex:1;border:1px solid var(--border);border-radius:8px;padding:9px 12px;font:inherit;font-size:13px}

/* charts */
.bars{display:flex;flex-direction:column;gap:10px}
.bar-row .lr{display:flex;justify-content:space-between;font-size:12.5px;margin-bottom:4px}
.bar-row .lr b{font-weight:700}
.track{height:8px;background:#edf0f6;border-radius:4px;overflow:hidden}
.track i{display:block;height:100%;border-radius:4px;background:var(--indigo)}
.colchart{display:flex;gap:8px;align-items:flex-end;height:110px}
.colchart .c{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;justify-content:flex-end;height:100%}
.colchart .c i{width:100%;max-width:26px;border-radius:5px;background:#c9cfff}
.colchart .c.hot i{background:var(--indigo)}
.colchart .c span{font-size:10.5px;color:var(--muted);font-weight:500}
.funnel{display:flex;flex-direction:column;gap:8px}
.funnel .f-row{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:9px 12px;color:#fff;font-size:12.5px;font-weight:600}

/* canais / serviços */
.kv{display:flex;justify-content:space-between;gap:8px;font-size:12.5px;padding:3px 0}
.kv span:first-child{color:var(--slate)}
.kv span:last-child{font-weight:600;text-align:right}
.qr{width:96px;height:96px;border-radius:8px;background:#eef1f6;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:38px;color:var(--slate);flex:none}
.svc{background:#fff;border:1px solid var(--border);border-radius:12px;padding:18px 22px;display:flex;flex-direction:column;gap:8px}
.svc-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.svc-head .n{font-size:15.5px;font-weight:600}
.svc-head .m{font-size:12.5px;color:var(--muted)}
.svc p{font-size:12.5px;color:var(--slate)}
.svc .meta{font-size:12px;color:var(--muted)}
.tip{background:var(--indigo-soft);color:var(--indigo);border-radius:10px;padding:12px 16px;font-size:12.5px;font-weight:500}
