/* Portal interno M3M (v0.50): visual da "Central de Operações" enviado pela Dra. Sara em 05/10/2026.
   Barra lateral preta com dourado, conteúdo claro, títulos serifados, cartões brancos. As telas antigas do piloto
   continuam com o conteúdo delas; este arquivo troca a moldura e ajusta os componentes ao novo padrão. */
@font-face{font-family:"M3M Serif";src:url("/static/NotoSerif-SemiBold.ttf") format("truetype");font-weight:600;font-display:swap}
:root{--m3m-side:#171717;--m3m-side2:#1c1c1c;--m3m-gold:#c6a35b;--m3m-gold-d:#a8853f;--m3m-gold-l:#e6d2a4;--m3m-bg:#fcfcfb;
  --m3m-card:#fff;--m3m-line:#ebe6dc;--m3m-ink:#1d2433;--m3m-muted:#6b7586;--m3m-blue:#5d6f93;--m3m-green:#2e9e5b;
  --m3m-blue-dot:#2f80ed;--m3m-amber:#d99a17;--m3m-grey:#9aa1ad;--m3m-serif:"M3M Serif",Georgia,"Times New Roman",serif;
  --m3m-sans:"Segoe UI",Roboto,Arial,sans-serif}
html,body.m3m-body{margin:0;background:var(--m3m-bg);color:var(--m3m-ink);font-family:var(--m3m-sans)}
body.m3m-body .version-flag{display:none}
.m3m-app{display:grid;grid-template-columns:232px 1fr;min-height:100vh}

/* barra lateral */
.m3m-side{background:var(--m3m-side);color:#e9e3d6;display:flex;flex-direction:column;padding:18px 14px 22px;position:sticky;top:0;height:100vh;overflow-y:auto;box-sizing:border-box}
.m3m-brand{display:block;text-align:center;margin:4px 0 18px}
.m3m-brand img{width:130px;max-width:100%;height:auto}
.m3m-caption{font-size:10.5px;letter-spacing:.14em;color:var(--m3m-gold);font-weight:700;margin:6px 8px 10px}
.m3m-nav a,.m3m-more summary{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:9px;color:#e9e3d6;text-decoration:none;font-size:14.5px;border:1px solid transparent;cursor:pointer}
.m3m-nav a svg,.m3m-more summary svg{width:20px;height:20px;flex:none;color:var(--m3m-gold)}
.m3m-nav a:hover,.m3m-more summary:hover{background:var(--m3m-side2)}
.m3m-nav a.on{border-color:var(--m3m-gold);color:#fff;background:rgba(198,163,91,.08)}
.m3m-nav .count{margin-left:auto;background:var(--m3m-gold);color:#141414;border-radius:999px;padding:0 7px;font-size:11px;font-weight:700}
.m3m-more{margin-top:10px}
.m3m-more summary{list-style:none;font-weight:600}
.m3m-more summary::-webkit-details-marker{display:none}
.m3m-more summary .chev{margin-left:auto;width:14px;height:14px;transition:transform .2s}
.m3m-more[open] summary .chev{transform:rotate(180deg)}
.m3m-more a{font-size:13px;padding:7px 12px 7px 16px}
.m3m-more a svg{width:17px;height:17px}

/* área principal */
.m3m-main{padding:22px 34px 18px;min-width:0;display:flex;flex-direction:column}
.m3m-top{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:18px}
.m3m-kicker{font-size:11px;letter-spacing:.14em;color:var(--m3m-gold-d);font-weight:700;text-transform:uppercase}
.m3m-kicker::before{content:"+ ";font-weight:400}
.m3m-top h1{font-family:var(--m3m-serif);font-weight:600;font-size:32px;line-height:1.15;margin:4px 0 4px;color:var(--m3m-ink)}
.m3m-top p.m3m-sub{margin:0;color:var(--m3m-blue);font-size:14px}
.m3m-tools{display:flex;align-items:center;gap:16px;flex:none}
.m3m-search{display:flex;align-items:center;gap:8px;border:1px solid var(--m3m-gold);border-radius:9px;padding:7px 10px;background:#fff;width:300px}
.m3m-search svg{width:16px;height:16px;color:var(--m3m-gold-d);flex:none}
.m3m-search input{border:0;outline:0;flex:1;font:inherit;font-size:13px;background:transparent;min-width:0}
.m3m-search kbd{font-family:inherit;font-size:11px;background:#f1efea;border:1px solid #e3ded3;border-radius:5px;padding:1px 6px;color:#5b6475}
.m3m-bell{position:relative;color:var(--m3m-gold-d);display:inline-flex}
.m3m-bell svg{width:22px;height:22px}
.m3m-bell i{position:absolute;top:-1px;right:-1px;width:8px;height:8px;border-radius:50%;background:#e5484d;display:none}
.m3m-bell.has i{display:block}
.m3m-user{position:relative}
.m3m-user summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none}
.m3m-user summary::-webkit-details-marker{display:none}
.m3m-avatar{width:38px;height:38px;border-radius:50%;background:#efe7d6;color:#7a5c22;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;flex:none}
.m3m-user b{display:block;font-family:var(--m3m-serif);font-size:15px;color:var(--m3m-ink)}
.m3m-user small{display:block;color:var(--m3m-gold-d);font-size:12px}
.m3m-user .chev{width:14px;height:14px;color:#6b7586}
.m3m-user-menu{position:absolute;right:0;top:46px;background:#fff;border:1px solid var(--m3m-line);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.08);min-width:210px;z-index:30;padding:6px}
.m3m-user-menu a{display:block;padding:9px 12px;border-radius:7px;color:var(--m3m-ink);text-decoration:none;font-size:14px}
.m3m-user-menu a:hover{background:#f5f2ea}
.m3m-foot{margin-top:auto;padding-top:36px;text-align:center}
.m3m-foot img{width:140px;max-width:100%;height:auto;display:inline-block}

/* cartões e números (Central de Operações) */
.m3m-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
.m3m-kpi{background:var(--m3m-card);border:1px solid var(--m3m-line);border-radius:12px;padding:16px 18px;display:flex;gap:14px;align-items:flex-start;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.m3m-kpi .ic{width:44px;height:44px;border-radius:50%;border:1.5px solid var(--m3m-gold);color:var(--m3m-gold-d);display:flex;align-items:center;justify-content:center;flex:none}
.m3m-kpi .ic svg{width:22px;height:22px}
.m3m-kpi span.lbl{display:block;white-space:nowrap;font-size:11px;letter-spacing:.05em;font-weight:700;color:#2c3646;text-transform:uppercase}
.m3m-kpi .num{display:flex;align-items:baseline;gap:10px;margin:2px 0}
.m3m-kpi .num b{font-family:var(--m3m-serif);font-size:32px;font-weight:600;color:var(--m3m-ink);line-height:1.1}
.m3m-kpi .trend{font-size:13px;color:var(--m3m-green);font-weight:600}
.m3m-kpi .trend.down{color:#c2410c}
.m3m-kpi small{color:var(--m3m-muted);font-size:12.5px}
.m3m-card{background:var(--m3m-card);border:1px solid var(--m3m-line);border-radius:12px;padding:18px 20px;margin-bottom:16px;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.m3m-card-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.m3m-card-head .t{display:flex;gap:14px;align-items:center}
.m3m-card-head .ic{width:44px;height:44px;border-radius:50%;border:1.5px solid var(--m3m-gold);color:var(--m3m-gold-d);display:flex;align-items:center;justify-content:center}
.m3m-card-head .ic svg{width:22px;height:22px}
.m3m-card-head h2{font-family:var(--m3m-serif);font-weight:600;font-size:22px;margin:0;color:var(--m3m-ink)}
.m3m-card-head p{margin:2px 0 0;color:var(--m3m-blue);font-size:13.5px}
.m3m-link{color:var(--m3m-gold-d);font-weight:600;text-decoration:none;font-size:14px;white-space:nowrap}
.m3m-link::after{content:" →"}
.m3m-table{width:100%;border-collapse:collapse;font-size:13.5px}
.m3m-table th{background:#f3f1ec;color:#5b6475;text-transform:uppercase;letter-spacing:.05em;font-size:11px;text-align:left;padding:9px 12px;font-weight:700}
.m3m-table td{padding:11px 12px;border-bottom:1px solid #f0ece4;vertical-align:middle}
.m3m-table tr:last-child td{border-bottom:0}
.m3m-table a{color:inherit;text-decoration:none}
.m3m-ini{width:30px;height:30px;border-radius:50%;background:#eef0f4;color:#5d6f93;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;margin-right:10px;vertical-align:middle}
.m3m-msg{color:var(--m3m-blue)}
.m3m-pill{display:inline-block;background:#f1efea;border:1px solid #e6e1d6;border-radius:6px;padding:2px 9px;font-size:12px;color:#3b4252}
.m3m-st{display:inline-flex;align-items:center;gap:8px;font-size:13px}
.m3m-st::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--m3m-grey)}
.m3m-st.respondido::before{background:var(--m3m-green)}.m3m-st.em_atendimento::before{background:var(--m3m-blue-dot)}
.m3m-st.pendente::before{background:var(--m3m-amber)}.m3m-st.encerrado::before{background:var(--m3m-grey)}
.m3m-empty{color:var(--m3m-muted);padding:18px 4px}
.m3m-note{background:#fbf7ee;border:1px solid #eadcbc;border-radius:10px;padding:12px 14px;color:#5b4a26;font-size:13.5px;margin-bottom:14px}

/* telas antigas do piloto dentro da moldura nova: mesmo padrão de cartões, letras e cores */
.m3m-page{min-width:0}
.m3m-page .inbox-head,.m3m-page .chat-head{background:transparent;border:0;padding:0;margin:0 0 14px;box-shadow:none;display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.m3m-page .inbox-head:empty{display:none}
.m3m-page .inbox-card,.m3m-page .explorer-card,.m3m-page .role-card,.m3m-page .team-board,.m3m-page .recent-history-card,
.m3m-page .portal-client-search-card,.m3m-page .portal-real-processes,.m3m-page .auto-worker-card,.m3m-page .first-sweep-card,
.m3m-page .api-guide,.m3m-page .api-card,.m3m-page .sync-card,.m3m-page section.card{background:#fff!important;border:1px solid var(--m3m-line)!important;border-radius:12px!important;box-shadow:0 1px 2px rgba(0,0,0,.03)!important}
.m3m-page h2{font-family:var(--m3m-serif);font-weight:600;color:var(--m3m-ink)}
.m3m-page .metric-card,.m3m-page .portal-client-metrics>div,.m3m-page .portal-quality-strip>div,.m3m-page .portal-profile-grid>div,
.m3m-page .mini-stats>div,.m3m-page .agent-card{background:#fff!important;border:1px solid var(--m3m-line)!important;border-radius:12px!important;box-shadow:0 1px 2px rgba(0,0,0,.03)!important;color:var(--m3m-ink)!important}
.m3m-page .metric-card b,.m3m-page .portal-client-metrics b,.m3m-page .portal-quality-strip b{font-family:var(--m3m-serif);color:var(--m3m-ink)!important}
.m3m-page .metric-card span,.m3m-page .portal-client-metrics span{text-transform:uppercase;letter-spacing:.05em;font-size:11.5px;font-weight:700;color:#2c3646!important}
.m3m-page .api-eyebrow,.m3m-page .role-card-head span,.m3m-page .team-board-head span,.m3m-page .recent-head span{color:var(--m3m-gold-d)!important;letter-spacing:.12em}
.m3m-page a.soft-button,.m3m-page button.soft-button,.m3m-page .word-button,.m3m-page .test-button{border:1px solid var(--m3m-gold)!important;color:var(--m3m-gold-d)!important;background:#fff!important;border-radius:9px!important}
.m3m-page button[type=submit],.m3m-page .take-form button,.m3m-page .confirm-close,.m3m-page form button:not(.soft-button):not(.modal-x):not(.cancel-modal){background:var(--m3m-ink);color:#fff;border:0;border-radius:9px}
.m3m-page .filters a.active,.m3m-page .filters a.on{background:var(--m3m-ink)!important;color:#fff!important}
.m3m-page input,.m3m-page select,.m3m-page textarea{border-radius:8px}
.m3m-page .status.respondido{background:#e8f5ee!important;color:#1f7a45!important}
.m3m-page .status.em_atendimento{background:#e8f0fd!important;color:#1f5fbf!important}
.m3m-page .status.pendente{background:#fdf3dc!important;color:#8a5a00!important}
.m3m-page .status.encerrado{background:#eef0f3!important;color:#4b5563!important}

@media(max-width:1100px){.m3m-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.m3m-search{width:220px}}
@media(max-width:800px){.m3m-app{grid-template-columns:1fr}.m3m-side{position:static;height:auto}.m3m-top{flex-direction:column}.m3m-kpis{grid-template-columns:1fr}}

/* abas de Configurações e cartão do cliente no atendimento */
.m3m-subtabs{display:flex;gap:8px;flex-wrap:wrap;margin:-4px 0 14px}
.m3m-subtabs a{border:1px solid var(--m3m-line);background:#fff;border-radius:999px;padding:6px 14px;font-size:13px;color:var(--m3m-ink);text-decoration:none}
.m3m-subtabs a:hover{border-color:var(--m3m-gold)}
.m3m-ticket-person .person-card{display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:#fff;border:1px solid var(--m3m-line);border-radius:12px;padding:12px 16px;margin-bottom:14px;color:var(--m3m-ink)}
.m3m-ticket-person .person-card h3{margin:0;font-family:var(--m3m-serif);font-weight:600}
.m3m-ticket-person .person-card p{margin:0;color:var(--m3m-muted);font-size:13px}
.m3m-ticket-person .person-card hr{display:none}
.m3m-ticket-person .large-avatar{width:40px;height:40px;border-radius:50%;background:#efe7d6;color:#7a5c22;display:flex;align-items:center;justify-content:center;font-weight:700}
.m3m-page.chat-main{display:flex;flex-direction:column}
