@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700&display=swap');

:root {
  --ink: #15211d;
  --ink-soft: #5c6863;
  --forest: #12372b;
  --forest-2: #1d4e3e;
  --sage: #9cad8f;
  --sage-soft: #e8eee5;
  --cream: #f6f4ee;
  --surface: #fffefa;
  --line: #e6e5de;
  --orange: #d8794b;
  --orange-soft: #fae9df;
  --yellow: #e7b957;
  --blue: #668b8c;
  --red: #c8655b;
  --shadow: 0 8px 28px rgba(28, 48, 40, 0.06);
}

.bot-badge { color: #8a4a46; }

* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "DM Sans", sans-serif; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }

.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; background: var(--surface); }
.auth-screen[hidden], .app-shell[hidden] { display: none; }
.auth-brand-panel { position: relative; overflow: hidden; background: var(--forest); color: white; display: grid; place-items: center; padding: 60px; }
.auth-brand-content { width: min(500px, 100%); position: relative; z-index: 2; }
.brand.large { padding: 0 0 80px; }.brand.large .brand-mark { width: 42px; height: 42px; transform: scale(1.18); }.brand.large strong { font-size: 1.8rem; }.brand.large small { font-size: .68rem; }
.auth-eyebrow { color: #c7d5cb; }.auth-brand-content h1 { max-width: 480px; font: 700 3.3rem/1.05 "Manrope"; letter-spacing: -.06em; margin: 16px 0 20px; }.auth-brand-content > p { color: #b8c9c0; font-size: 1rem; max-width: 390px; line-height: 1.6; }
.auth-proof { display: flex; align-items: center; gap: 13px; margin-top: 55px; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.12); max-width: 390px; }.auth-proof > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #9ad0a9; }.auth-proof strong,.auth-proof small { display:block; }.auth-proof strong { font-size:.78rem; }.auth-proof small { color:#91a99d; margin-top:4px; font-size:.67rem; }
.auth-orbit { position:absolute; border:1px solid rgba(255,255,255,.07); border-radius:50%; }.orbit-one { width:600px;height:600px;right:-350px;bottom:-180px; }.orbit-two { width:320px;height:320px;right:-110px;bottom:-20px; }.orbit-two::after { content:"";position:absolute;width:14px;height:14px;background:var(--orange);border-radius:50%;left:40px;top:30px;box-shadow:0 0 0 8px rgba(216,121,75,.12); }
.auth-form-panel { display:grid;place-items:center;padding:45px;background:#fbfaf6; }.login-card { width:min(390px,100%); }.login-card h2 { font:700 1.9rem "Manrope";letter-spacing:-.04em;margin:9px 0 6px; }.login-card > p { color:#79837f;font-size:.78rem;margin:0 0 30px; }.login-card .field { margin-top:17px; }.login-card .field input { padding:12px; background:white; }.login-button { margin-top:22px; padding:13px; }.login-button span { float:right; margin:0; }.login-error { min-height:18px; color:#a64f47; font-size:.65rem; margin-top:9px; }.first-access { margin-top:22px;padding:12px;border:1px dashed #d6d4cb;border-radius:8px;text-align:center; }.first-access strong,.first-access span { display:block; }.first-access strong { color:#68736e;font-size:.62rem;text-transform:uppercase;letter-spacing:.08em; }.first-access span { margin-top:5px;color:#8a938f;font-size:.65rem; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 238px; background: var(--forest); color: #eef5ee; display: flex; flex-direction: column; padding: 27px 18px 18px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 28px; }
.brand-mark { width: 33px; height: 33px; position: relative; transform: rotate(-4deg); }
.brand-mark span { position: absolute; width: 12px; height: 28px; background: #d7dfca; border-radius: 100% 15% 100% 15%; transform: rotate(32deg); }
.brand-mark span:last-child { left: 14px; top: 5px; transform: rotate(-28deg); background: var(--orange); }
.brand strong { display: block; font: 700 1.45rem/1 "Manrope"; letter-spacing: -.05em; }
.brand small { display: block; color: #9eb3a9; margin-top: 5px; font-size: .63rem; text-transform: uppercase; letter-spacing: .14em; }
.studio-brand { min-width: 0; }
.studio-brand > div:last-child { min-width: 0; }
.studio-brand strong, .studio-brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-logo { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; overflow: hidden; background: rgba(255,255,255,.12); color: #f5f3e8; font: 700 .72rem "Manrope"; letter-spacing: -.02em; }
.studio-logo img { width: 100%; height: 100%; object-fit: contain; background: white; }
.brand.large .studio-logo { width: 48px; height: 48px; flex-basis: 48px; border-radius: 13px; }
.nav { display: grid; gap: 6px; }
.nav-item { border: 0; background: transparent; color: #aec0b7; display: grid; grid-template-columns: 25px 1fr auto; align-items: center; width: 100%; padding: 11px 12px; border-radius: 9px; text-align: left; cursor: pointer; transition: .18s ease; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: rgba(236, 241, 231, .13); box-shadow: inset 2px 0 #d8dfcd; }
.nav-icon { font-size: 1.15rem; opacity: .9; }
.nav-count { min-width: 23px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.1); font-size: .7rem; }
.nav-count.accent { background: var(--orange); color: white; }
.nav-section-label { color: #729084; letter-spacing: .13em; font-size: .64rem; font-weight: 700; padding: 25px 12px 8px; }
.sidebar-card { margin-top: auto; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.055); padding: 15px; border-radius: 12px; }
.sidebar-card-icon { color: var(--yellow); margin-bottom: 8px; }
.sidebar-card strong { font-size: .83rem; }
.sidebar-card p { color: #9eb3a9; font-size: .72rem; line-height: 1.45; margin: 5px 0 12px; }
.agent-pulse { display: flex; align-items: center; gap: 7px; font-size: .68rem; color: #b9c8c0; }
.agent-pulse i, .preview-status i { width: 7px; height: 7px; border-radius: 50%; background: #72c68f; box-shadow: 0 0 0 4px rgba(114,198,143,.12); }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 14px 5px 0; border-top: 1px solid rgba(255,255,255,.1); }
.powered-by { color: #688579; font-size: .52rem; letter-spacing: .12em; text-align: center; text-transform: uppercase; margin-top: 12px; }
.logout-button { color:#91a79c; }.logout-button:hover { color:white; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: #d7dfca; color: var(--forest); display: grid; place-items: center; font-weight: 700; font-size: .72rem; }
.user-meta { flex: 1; min-width: 0; }
.user-meta strong, .user-meta span { display: block; }
.user-meta strong { font-size: .75rem; }
.user-meta span { color: #91a79c; font-size: .66rem; margin-top: 3px; }

.main { margin-left: 238px; min-height: 100vh; }
.topbar { height: 74px; background: rgba(255,254,250,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 34px; position: sticky; top: 0; z-index: 10; }
.topbar-clinic { display: flex; flex-direction: column; gap: 3px; }
.topbar-clinic > strong { font-size: .82rem; }
.topbar-clinic.topbar-identity { flex-direction: row; align-items: center; gap: 10px; }
.topbar-identity > div:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }
.topbar-identity #tenantName { font-size: .82rem; }
.topbar-studio-logo { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; background: #e7eee9; color: var(--forest); font: 700 .68rem "Manrope"; }
.topbar-studio-logo img { width: 100%; height: 100%; object-fit: contain; background: white; }
.eyebrow { color: #8c9792; font-weight: 700; font-size: .61rem; letter-spacing: .14em; }
.eyebrow.warm { color: var(--orange); }
.topbar select { appearance: none; border: 0; background: transparent; font-weight: 700; padding: 0 23px 0 0; background-image: linear-gradient(45deg, transparent 50%, #77807c 50%), linear-gradient(135deg, #77807c 50%, transparent 50%); background-position: calc(100% - 8px) 8px, calc(100% - 3px) 8px; background-size: 5px 5px; background-repeat: no-repeat; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 13px; }
.plan-pill { padding: 6px 9px; border-radius: 14px; background: #eeeae1; color: #746b59; font-size: .61rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.plan-pill.pro { background: #e6efe7; color: #37634a; }
.whatsapp-pill { display: flex; align-items: center; gap: 8px; background: #edf4eb; color: #356047; border: 1px solid #dbe9d7; padding: 7px 11px; border-radius: 18px; font-size: .72rem; font-weight: 600; }
.whatsapp-pill i { width: 7px; height: 7px; background: #55a86d; border-radius: 50%; }
.whatsapp-pill.offline { color: #916352; background: #f7ece6; border-color: #efded5; }
.whatsapp-pill.offline i { background: var(--orange); }
.icon-button { border: 0; background: transparent; cursor: pointer; padding: 6px; }
.notification { position: relative; font-size: 1.15rem; }
.notification b { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); right: 5px; top: 5px; }
.primary-button, .outline-button { border-radius: 8px; padding: 10px 15px; font-weight: 700; font-size: .78rem; cursor: pointer; transition: .18s; }
.primary-button { border: 1px solid var(--forest); background: var(--forest); color: white; box-shadow: 0 3px 8px rgba(18,55,43,.12); }
.primary-button:hover { background: var(--forest-2); transform: translateY(-1px); }
.primary-button span { margin-right: 7px; }
.outline-button { border: 1px solid var(--line); background: var(--surface); }
.mobile-menu { display: none; }

.view { display: none; padding: 34px; max-width: 1500px; margin: 0 auto; }
.view.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } }
.page-heading { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; margin-bottom: 26px; }
.page-heading.compact { align-items: center; }
.page-heading h1 { font: 700 1.82rem/1.15 "Manrope"; letter-spacing: -.045em; margin: 7px 0 5px; }
.page-heading h1 span { font-size: 1.3rem; }
.page-heading p { color: var(--ink-soft); margin: 0; font-size: .83rem; }
.date-control { border: 1px solid var(--line); background: var(--surface); padding: 10px 12px; border-radius: 8px; display: flex; align-items: center; gap: 9px; font-size: .75rem; }
.date-control span { color: var(--orange); }.date-control small { color: #7e8984; margin-left: 6px; }
.dashboard-period-control { display: flex; align-items: end; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; box-shadow: var(--shadow); }
.dashboard-period-control label { display: grid; gap: 4px; }.dashboard-period-control label > span { color: #89928e; font-size: .57rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.dashboard-period-control select, .dashboard-period-control input { border: 0; outline: 0; background: #f5f5f0; color: var(--ink); border-radius: 6px; padding: 7px 9px; font-size: .7rem; }
.custom-period { display: flex; gap: 7px; }.custom-period[hidden] { display: none; }
.heading-actions { display: flex; gap: 10px; }
.search-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 11px; }
.search-box input { border: 0; outline: 0; background: transparent; width: 190px; font-size: .78rem; }

.metrics-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin-bottom: 15px; }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; width: 70px; height: 70px; border-radius: 50%; background: var(--tint); right: -28px; top: -30px; opacity: .7; }
.metric-top { display: flex; justify-content: space-between; align-items: center; color: var(--ink-soft); font-size: .73rem; }
.metric-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--tint); color: var(--color); font-size: .9rem; }
.metric-value { font: 700 1.75rem "Manrope"; letter-spacing: -.04em; margin: 12px 0 6px; }
.metric-foot { font-size: .68rem; color: #89918d; }.metric-foot strong { color: #438162; margin-right: 3px; }
.conversation-service-time { display: block; margin-top: 4px; color: #7f8b85; font-size: .6rem; }.conversation-service-time.waiting { color: #b45743; font-weight: 700; }
.conversion-event-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }.conversion-event-grid label { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); font-size: .72rem; background: #fafaf7; }.conversion-event-grid input { accent-color: var(--forest); }
.agency-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-bottom: 15px; }.agency-form { display: grid; gap: 11px; }.company-list-panel { overflow: hidden; }.company-list { display: grid; }.company-row { display: grid; grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(100px, .7fr)); align-items: center; gap: 15px; padding: 16px 20px; border-top: 1px solid var(--line); }.company-row h3 { margin: 0 0 3px; font: 700 .86rem "Manrope"; }.company-row p, .company-row small { margin: 0; color: #89928e; font-size: .67rem; }.company-row strong { font-size: .75rem; }.company-status { display: inline-flex; align-items: center; gap: 5px; font-size: .67rem; color: #7e8984; }.company-status i { width: 7px; height: 7px; border-radius: 50%; background: #c7735d; }.company-status.online i { background: #478765; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px,.8fr); gap: 15px; margin-bottom: 15px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; }
.panel-header h2, .section-heading h2 { font: 700 .95rem "Manrope"; margin: 0 0 4px; letter-spacing: -.02em; }
.panel-header p, .section-heading p { color: #89928e; margin: 0; font-size: .7rem; }
.text-button { background: none; border: 0; color: var(--orange); font-size: .7rem; font-weight: 700; cursor: pointer; }
.funnel-chart { padding: 7px 24px 10px; height: 205px; display: flex; align-items: end; gap: 9px; border-bottom: 1px solid #efeee8; background: repeating-linear-gradient(to top, transparent 0, transparent 49px, #f0efe9 50px); }
.funnel-bar-wrap { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 7px; }
.funnel-bar { width: 58%; min-width: 26px; max-width: 48px; height: var(--height); background: var(--bar); border-radius: 7px 7px 2px 2px; transition: .3s; }
.funnel-number { font: 700 .75rem "Manrope"; }
.funnel-label { color: #7c8782; font-size: .63rem; white-space: nowrap; }
.funnel-legend { padding: 12px 20px; display: flex; justify-content: space-between; color: #7e8984; font-size: .66rem; }
.funnel-legend strong { color: var(--ink); }
.activity-list { padding: 0 19px; }
.activity-item { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; padding: 11px 0; border-top: 1px solid #efeee9; align-items: center; }
.activity-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--tint); color: var(--color); display: grid; place-items: center; font-size: .72rem; }
.activity-item p { margin: 0; font-size: .71rem; line-height: 1.35; }.activity-item strong { font-weight: 700; }.activity-item time { color: #939b97; font-size: .62rem; }
.panel-footer-button { border: 0; border-top: 1px solid #efeee9; background: transparent; padding: 12px; width: 100%; color: var(--forest-2); font-weight: 700; font-size: .68rem; cursor: pointer; }
.attention-panel { box-shadow: none; }
.attention-count { background: var(--orange-soft); color: #a95636; padding: 5px 9px; border-radius: 12px; font-size: .65rem; font-weight: 700; }
.attention-list { border-top: 1px solid #efeee9; }
.attention-row { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 20px; }
.lead-avatar { width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; background: var(--avatar); color: var(--forest); font-weight: 700; font-size: .7rem; }
.attention-row h4 { margin: 0 0 3px; font-size: .76rem; }.attention-row p { margin: 0; color: #7f8985; font-size: .68rem; }.attention-row time { color: #969e9a; font-size: .63rem; }

.kanban { display: grid; grid-template-columns: repeat(8, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 15px; min-height: 590px; cursor: grab; scrollbar-color: #a8b4aa transparent; }
.kanban.is-panning { cursor: grabbing; user-select: none; }
.kanban-column { background: #efeee9; border-radius: 11px; padding: 10px; min-height: 520px; }
.column-header { display: flex; align-items: center; justify-content: space-between; padding: 5px 5px 13px; }
.column-title { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: .73rem; text-transform: uppercase; letter-spacing: .04em; }
.column-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--column); }
.column-count { background: white; border: 1px solid var(--line); min-width: 22px; height: 20px; display: grid; place-items: center; border-radius: 10px; font-size: .65rem; }
.kanban-cards { display: grid; gap: 9px; align-content: start; min-height: 450px; }
.lead-card { background: var(--surface); border: 1px solid #e3e1da; border-radius: 9px; padding: 13px; cursor: grab; box-shadow: 0 3px 12px rgba(24,45,37,.04); }
.lead-card:hover { border-color: #c9d2c7; transform: translateY(-1px); }.lead-card.dragging { opacity: .45; }
.lead-card-header { display: flex; align-items: center; gap: 9px; }.lead-card h3 { margin: 0; font-size: .75rem; }.lead-card .source { color: #8a938f; font-size: .61rem; margin-top: 3px; }
.lead-card-message { color: #596560; font-size: .68rem; line-height: 1.42; margin: 11px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lead-tags { display: flex; flex-wrap: wrap; gap: 5px; }.tag { background: #f0f3ed; color: #52685e; padding: 4px 6px; border-radius: 5px; font-size: .58rem; }
.lead-card-footer { margin-top: 11px; padding-top: 9px; border-top: 1px solid #efeee9; display: flex; justify-content: space-between; color: #929a96; font-size: .59rem; }
.lead-commercial { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }.lead-commercial > span { min-width: 0; padding: 7px; background: #f5f5f0; border-radius: 6px; }.lead-commercial small, .lead-commercial strong { display: block; }.lead-commercial small { color: #929a96; font-size: .49rem; font-weight: 800; letter-spacing: .05em; }.lead-commercial strong { margin-top: 3px; color: var(--forest); font-size: .6rem; line-height: 1.25; overflow-wrap: anywhere; }
.card-edit-button { border: 0; background: transparent; color: var(--orange); padding: 0; font-size: .59rem; font-weight: 800; cursor: pointer; }.card-edit-button:hover { text-decoration: underline; }
.drop-active { outline: 2px dashed var(--orange); outline-offset: -4px; }

.inbox-view { padding-bottom: 20px; }.inbox-title { margin-bottom: 16px; }
.inbox-layout { height: calc(100vh - 190px); min-height: 570px; display: grid; grid-template-columns: 310px 1fr; overflow: hidden; }
.conversation-list-panel { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.conversation-search { margin: 16px; }.conversation-search input { width: 100%; }.conversation-tabs { display: flex; padding: 0 16px 10px; gap: 16px; border-bottom: 1px solid var(--line); }.conversation-tabs button { border: 0; background: none; color: #87908c; padding: 6px 0; font-size: .69rem; cursor: pointer; }.conversation-tabs button.active { color: var(--forest); border-bottom: 2px solid var(--forest); font-weight: 700; }
.conversation-list { overflow-y: auto; }.conversation-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 9px; padding: 13px 15px; border-bottom: 1px solid #efeee9; cursor: pointer; }.conversation-item:hover, .conversation-item.active { background: #f3f4ef; }.conversation-item h4 { margin: 1px 0 4px; font-size: .75rem; }.conversation-item p { margin: 0; font-size: .65rem; color: #737e79; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }.conversation-item time { color: #9ba29f; font-size: .58rem; }.human-badge { color: var(--orange); font-size: .56rem; font-weight: 700; margin-top: 5px; }
.chat-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: #f4f3ed; }
.chat-empty { margin: auto; text-align: center; color: #8c9591; }.chat-empty div { width: 50px; height: 50px; display: grid; place-items: center; margin: auto; border-radius: 50%; background: #e4e8e0; font-size: 1.5rem; }.chat-empty h3 { color: var(--ink); margin-bottom: 4px; }.chat-empty p { font-size: .73rem; }
.chat-header { background: var(--surface); padding: 13px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }.chat-header-meta { flex: 1; }.chat-header h3 { margin: 0; font-size: .8rem; }.chat-header p { margin: 3px 0 0; font-size: .62rem; color: #84908a; }.stage-badge { background: var(--sage-soft); color: #496355; padding: 5px 8px; border-radius: 5px; font-size: .6rem; font-weight: 700; }
.conversation-mode { padding: 5px 7px; border-radius: 5px; font-size: .55rem; font-weight: 800; letter-spacing: .04em; }.conversation-mode.ai { background: #dfeee2; color: #37704c; }.conversation-mode.human { background: #f1e8dc; color: #9b623e; }.mode-button { border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; font-size: .6rem; font-weight: 750; cursor: pointer; background: white; color: var(--forest); }.mode-button.activate { background: var(--forest); border-color: var(--forest); color: white; }.mode-button:hover { filter: brightness(.97); }
.delete-conversation-button { border: 1px solid #ead2cc; border-radius: 7px; padding: 7px 9px; font-size: .58rem; font-weight: 750; cursor: pointer; background: #fffaf8; color: #a65349; white-space: nowrap; }.delete-conversation-button:hover { background: #f9ebe7; }.delete-conversation-button:disabled { opacity: .55; cursor: wait; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 9px; }.message { max-width: 70%; padding: 10px 12px; border-radius: 10px; font-size: .72rem; line-height: 1.5; box-shadow: 0 2px 5px rgba(30,40,35,.03); }.message.lead { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 3px; }.message.agent, .message.human { background: #dfe9dc; color: #263d32; align-self: flex-end; border-bottom-right-radius: 3px; }.message.human { background: #e7e2d7; }.message time { display: block; font-size: .55rem; color: #84908a; text-align: right; margin-top: 4px; }
.chat-composer { background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px; }.demo-notice { color: #7f8985; font-size: .59rem; margin-bottom: 7px; }.composer-row { display: flex; gap: 8px; }.composer-row input { flex: 1; border: 1px solid var(--line); background: #f9f8f3; padding: 10px 12px; border-radius: 8px; outline: 0; }.composer-row input:focus { border-color: var(--sage); }.send-button { width: 39px; border: 0; background: var(--forest); color: white; border-radius: 8px; cursor: pointer; }

.appointments-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 15px; }.calendar-card { min-height: 440px; padding: 20px; }.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }.calendar-head h2 { font: 700 1rem "Manrope"; }.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; }.calendar-grid span { aspect-ratio: 1.3; display: grid; place-items: center; border-radius: 7px; font-size: .7rem; }.calendar-grid .day-name { color: #89928e; font-size: .59rem; font-weight: 700; }.calendar-grid .muted { color: #c1c5c3; }.calendar-grid .today { background: var(--forest); color: white; }.calendar-grid .event-day { border: 1px solid var(--orange); color: var(--orange); font-weight: 700; }.appointment-list { padding: 0 20px 20px; }.appointment-item { border-top: 1px solid var(--line); padding: 14px 0; display: grid; grid-template-columns: 44px 1fr; gap: 10px; }.appointment-date { background: var(--orange-soft); color: var(--orange); border-radius: 8px; text-align: center; padding: 6px 3px; }.appointment-date strong, .appointment-date span { display: block; }.appointment-date strong { font-size: 1rem; }.appointment-date span { font-size: .55rem; text-transform: uppercase; }.appointment-item h4 { margin: 2px 0 4px; font-size: .75rem; }.appointment-item p { margin: 0; font-size: .64rem; color: #7e8984; }
.integration-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; }.integration-card { padding: 19px; }.integration-logo { width: 42px; height: 42px; border-radius: 10px; background: var(--tint); color: var(--color); display: grid; place-items: center; font-weight: 700; margin-bottom: 18px; }.integration-card h3 { margin: 0 0 6px; font: 700 .9rem "Manrope"; }.integration-card p { color: #77827d; font-size: .69rem; line-height: 1.5; min-height: 43px; }.integration-status { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }.integration-status span { font-size: .64rem; font-weight: 700; }.integration-status .connected { color: #4d8764; }.integration-status button { border: 0; background: none; color: var(--orange); font-size: .65rem; font-weight: 700; cursor: pointer; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr .7fr; gap: 15px; align-items: start; }.settings-form { padding: 21px; }.section-heading { display: flex; gap: 11px; margin-bottom: 21px; }.section-heading > span { width: 28px; height: 28px; border-radius: 50%; background: var(--sage-soft); color: var(--forest); display: grid; place-items: center; font-size: .61rem; font-weight: 700; }.field { display: grid; gap: 7px; margin-top: 15px; }.field > span { font-size: .68rem; font-weight: 700; }.field input, .field textarea, .field select { border: 1px solid var(--line); background: #fbfaf6; border-radius: 7px; padding: 10px; outline: 0; resize: vertical; font-size: .73rem; }.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--sage); }.field small { color: #969d9a; font-size: .59rem; }.toggle-field { display: flex; justify-content: space-between; align-items: center; margin-top: 21px; cursor: pointer; }.toggle-field strong, .toggle-field span { display: block; }.toggle-field strong { font-size: .72rem; }.toggle-field span { color: #818c87; font-size: .62rem; margin-top: 3px; }.toggle-field input { display: none; }.toggle-field i { width: 38px; height: 21px; border-radius: 12px; background: #d4d7d2; position: relative; transition: .2s; }.toggle-field i::after { content:""; position:absolute; width: 17px; height: 17px; background:white; border-radius:50%; left:2px; top:2px; transition:.2s; box-shadow:0 1px 3px #999; }.toggle-field input:checked + i { background: var(--forest); }.toggle-field input:checked + i::after { transform: translateX(17px); }.preview-card { padding: 20px; background: var(--forest); color: white; }.preview-bubble { margin: 22px 0; background: #eef2e9; color: var(--forest); border-radius: 12px 12px 12px 3px; padding: 13px; font-size: .7rem; line-height: 1.5; }.preview-status { color: #a6baaf; font-size: .61rem; display: flex; align-items: center; gap: 8px; }
.identity-editor { display: grid; grid-template-columns: 126px 1fr; gap: 22px; align-items: start; }
.company-row { grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(100px, .7fr)) auto; }.company-actions { display: flex; gap: 6px; }.company-actions button { white-space: nowrap; }
.password-field { display: flex; gap: 7px; }.password-field input { flex: 1; min-width: 0; }.password-toggle { border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; background: #fff; color: var(--forest); font-size: .62rem; font-weight: 750; cursor: pointer; }.danger-button { border: 1px solid #d8a8a0; color: #943f35; background: #fff8f6; border-radius: 8px; padding: 11px; font-weight: 750; cursor: pointer; margin-top: 8px; }.tracking-status { margin-top: 15px; border-radius: 8px; padding: 10px 11px; background: #f1f3ed; color: #64726a; font-size: .65rem; line-height: 1.45; }.tracking-status.ready { background: #e6f0e7; color: #326044; }
.identity-preview { width: 126px; height: 126px; border: 1px dashed #cfd4ca; border-radius: 18px; background: #f6f7f2; color: var(--forest); display: grid; place-items: center; overflow: hidden; font: 700 1.55rem "Manrope"; }
.identity-preview img { width: 100%; height: 100%; object-fit: contain; background: white; }
.identity-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.identity-fields .logo-upload { grid-column: 1 / -1; }
.logo-upload input { padding: 8px; }
.remove-logo { grid-column: 1 / -1; justify-self: start; margin-top: 8px; padding: 0; color: var(--orange); }
.plan-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plan-option { display: block; cursor: pointer; position: relative; }
.plan-option input { position: absolute; opacity: 0; pointer-events: none; }
.plan-option > span { min-height: 92px; display: block; border: 1px solid var(--line); border-radius: 11px; background: #faf9f5; padding: 17px 18px; transition: .18s; }
.plan-option strong, .plan-option small { display: block; }.plan-option strong { font: 700 .86rem "Manrope"; }.plan-option small { color: #7b8580; font-size: .64rem; line-height: 1.45; margin-top: 7px; }
.plan-option.featured > span { background: #f2f6ef; }
.plan-option input:checked + span { border-color: var(--forest); box-shadow: 0 0 0 2px rgba(18,55,43,.1); }
.plan-option input:checked + span::after { content: "ATIVO"; position: absolute; right: 13px; top: 12px; color: var(--orange); font-size: .53rem; font-weight: 900; letter-spacing: .08em; }
.plan-summary { margin-top: 14px; padding: 11px 13px; border-radius: 8px; background: #f1f3ed; color: #66736c; font-size: .64rem; line-height: 1.5; }
.notification-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: end; }
.notification-group-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; }
.notification-group-row .field { margin-top: 15px; }.notification-group-row .outline-button { margin-bottom: 1px; white-space: nowrap; }
.loss-reason { background: #f6e7e4; color: #7d403b; border-radius: 8px; padding: 9px; font-size: .64rem; line-height: 1.45; }
.loss-reason strong { display: block; font-size: .52rem; letter-spacing: .08em; margin-bottom: 3px; }
.calendar-setting-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #f8f8f5; }
.calendar-setting-box div { display: grid; gap: 4px; }
.calendar-setting-box strong { font-size: .75rem; }
.calendar-setting-box span { color: #7f8884; font-size: .64rem; }
.calendar-setup-note { margin: 14px 0; padding: 14px; border-radius: 10px; background: #f5eee2; color: #62543c; font-size: .7rem; line-height: 1.5; }
.calendar-setup-note p { margin: 6px 0; }
.calendar-setup-note code { display: block; overflow-wrap: anywhere; background: #fffaf1; border: 1px solid #eadac0; border-radius: 6px; padding: 8px; user-select: all; }
.pro-automation .settings-note { margin-top: 17px; }.pro-automation.plan-disabled { opacity: .62; }.pro-automation.plan-disabled::after { content: "Disponível no plano Pro"; display: block; margin-top: 12px; color: var(--orange); font-size: .61rem; font-weight: 800; }
.schedule-waiting { margin-top: 9px; padding: 8px 9px; border-radius: 7px; background: #fff2dc; color: #966b26; font-size: .58rem; font-weight: 800; line-height: 1.35; }
.openai-live-status { display: flex; gap: 10px; align-items: center; background: #f2f3ef; border: 1px solid var(--line); border-radius: 9px; padding: 11px; margin: 16px 0 4px; }.openai-live-status > i { width: 9px; height: 9px; border-radius: 50%; background: #a7aea9; }.openai-live-status strong, .openai-live-status span { display: block; }.openai-live-status strong { font-size: .68rem; }.openai-live-status span { color: #7e8984; font-size: .59rem; margin-top: 3px; }.openai-live-status.connected > i { background: #4f9667; box-shadow: 0 0 0 4px #dceade; }.openai-live-status.connected { background: #eef5ef; }

.toast { position: fixed; z-index: 50; right: 25px; bottom: 25px; background: var(--forest); color: white; border-radius: 8px; padding: 11px 15px; box-shadow: 0 10px 30px rgba(20,40,32,.25); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .25s; font-size: .72rem; }.toast.show { transform: translateY(0); opacity: 1; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(11,26,20,.55); z-index: 60; display: grid; place-items: center; padding: 20px; }.modal-backdrop[hidden] { display: none; }.modal { width: min(430px,100%); background: var(--surface); padding: 26px; border-radius: 13px; position: relative; box-shadow: 0 20px 80px rgba(0,0,0,.2); }.modal h2 { font: 700 1.35rem "Manrope"; margin: 8px 0 4px; }.modal > p { color: #79837f; font-size: .72rem; }.modal-close { position: absolute; right: 15px; top: 12px; border: 0; background: none; font-size: 1.4rem; cursor: pointer; }.primary-button.full { width: 100%; margin-top: 20px; }
.whatsapp-modal { width:min(470px,100%); }.whatsapp-live-status { margin:18px 0 13px;display:flex;align-items:center;gap:11px;padding:11px 13px;background:#f1f3ee;border:1px solid var(--line);border-radius:9px; }.whatsapp-live-status i { width:9px;height:9px;border-radius:50%;background:#9ba39f;box-shadow:0 0 0 5px rgba(120,130,125,.1); }.whatsapp-live-status.connected i { background:#55a86d;box-shadow:0 0 0 5px rgba(85,168,109,.12); }.whatsapp-live-status.waiting i { background:var(--orange);box-shadow:0 0 0 5px rgba(216,121,75,.12); }.whatsapp-live-status.error i { background:var(--red); }.whatsapp-live-status strong,.whatsapp-live-status span { display:block; }.whatsapp-live-status strong { font-size:.72rem; }.whatsapp-live-status span { color:#7e8883;font-size:.62rem;margin-top:3px; }
.qr-frame { min-height:270px;border:1px dashed #d4d5ce;border-radius:11px;background:#faf9f5;display:grid;place-items:center;padding:18px; }.qr-frame img { width:min(260px,100%);height:auto;border-radius:6px;image-rendering:pixelated; }.qr-placeholder { text-align:center;color:#89928e; }.qr-placeholder[hidden] { display:none; }.qr-placeholder > span { display:grid;place-items:center;width:52px;height:52px;margin:0 auto 12px;border-radius:12px;background:#e8ece5;color:var(--forest);font-size:1.5rem; }.qr-placeholder strong,.qr-placeholder small { display:block; }.qr-placeholder strong { color:#66716c;font-size:.72rem; }.qr-placeholder small { margin-top:5px;font-size:.61rem; }.whatsapp-modal-error { min-height:18px;color:#a64f47;font-size:.64rem;margin-top:9px; }.whatsapp-modal-actions { display:flex;justify-content:flex-end;gap:9px;margin-top:5px; }.whatsapp-modal-actions button:disabled { opacity:.5;cursor:not-allowed; }.qr-safety { margin:15px 0 0!important;padding-top:13px;border-top:1px solid var(--line);font-size:.59rem!important;line-height:1.45;color:#8b938f!important; }
.pairing-code-panel { text-align:center;max-width:330px; }.pairing-code-panel[hidden] { display:none; }.pairing-code-panel small { display:block;color:var(--orange);font-size:.59rem;font-weight:800;letter-spacing:.12em; }.pairing-code-panel strong { display:block;margin:11px 0 9px;color:var(--forest);font-size:2rem;letter-spacing:.2em; }.pairing-code-panel p { margin:0!important;color:#77817c!important;font-size:.65rem!important;line-height:1.5; }.whatsapp-alternative { margin:4px 0 12px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:#faf9f5; }.whatsapp-alternative summary { cursor:pointer;color:var(--forest);font-size:.68rem;font-weight:750; }.whatsapp-alternative p { margin:9px 0 8px!important;color:#7f8884!important;font-size:.61rem!important; }.whatsapp-alternative > div { display:flex;gap:8px; }.whatsapp-alternative input { min-width:0;flex:1;border:1px solid var(--line);border-radius:7px;background:#fff;padding:9px 10px;color:var(--text);font:inherit;font-size:.7rem; }.whatsapp-alternative button { white-space:nowrap; }
.empty-state { padding: 35px; text-align: center; color: #87918c; font-size: .72rem; }

.settings-grid { grid-template-columns: 1fr 1fr; }
.settings-form.wide, .settings-note.wide { grid-column: 1 / -1; }
.master-training-settings textarea { min-height: 520px; line-height: 1.55; }
.settings-note { padding: 16px 18px; background: #edf2eb; border: 1px solid #dce5da; border-radius: 9px; color: #53675d; font-size: .67rem; line-height: 1.55; }
.settings-note strong { color: var(--forest); }
.lead-edit-modal { width: min(720px,100%); max-height: calc(100vh - 36px); overflow-y: auto; }.form-grid { display: grid; gap: 0 13px; }.form-grid.two { grid-template-columns: 1fr 1fr; }.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }.form-grid .full-row { grid-column: 1 / -1; }.modal-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }.modal-section h3 { margin: 0 0 4px; font: 700 .85rem "Manrope"; }.modal-section p { margin: 0; color: #86908b; font-size: .64rem; }.field-help { display: block; margin-top: 8px; color: #929a96; font-size: .58rem; }.primary-button:disabled { opacity: .6; cursor: wait; transform: none; }

@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid, .appointments-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr 1fr; }.preview-card { grid-column: 1 / -1; }
  .integration-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 780px) {
  .auth-screen { grid-template-columns:1fr; }.auth-brand-panel { display:none; }.auth-form-panel { min-height:100vh;padding:28px; }
  .sidebar { transform: translateX(-100%); transition: .25s; }.sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }.mobile-menu { display: block; margin-right: 10px; }.topbar { padding: 0 14px; }.topbar-actions .primary-button, .whatsapp-pill span { display: none; }.whatsapp-pill { padding: 9px; }
  .view { padding: 22px 15px; }.page-heading { align-items: flex-start; flex-direction: column; }.date-control { align-self: stretch; justify-content: center; }
  .dashboard-period-control { align-items: stretch; flex-direction: column; width: 100%; }.custom-period { display: grid; grid-template-columns: 1fr 1fr; }.form-grid.two, .form-grid.three { grid-template-columns: 1fr; }.form-grid .full-row { grid-column: auto; }
  .metrics-grid, .integration-grid, .settings-grid { grid-template-columns: 1fr; }.preview-card { grid-column: auto; }
  .identity-editor { grid-template-columns: 1fr; }.identity-preview { width: 96px; height: 96px; }.identity-fields { grid-template-columns: 1fr; }.identity-fields .logo-upload { grid-column: auto; }
  .plan-selector, .notification-settings { grid-template-columns: 1fr; }.notification-group-row { grid-template-columns: 1fr; }.notification-group-row .outline-button { justify-self: start; }
  .dashboard-grid { display: block; }.activity-panel, .attention-panel { margin-top: 15px; }.funnel-label { transform: rotate(-35deg); margin-bottom: 7px; }
  .inbox-layout { grid-template-columns: 1fr; height: auto; }.conversation-list-panel { max-height: 330px; border-right: 0; border-bottom: 1px solid var(--line); }.chat-panel { min-height: 550px; }.chat-header { flex-wrap: wrap; }.delete-conversation-button { margin-left: auto; }
  .attention-row { grid-template-columns: 36px 1fr auto; }.attention-row time { display: none; }
}
@media (max-width: 780px) { .conversion-event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 780px) { .agency-grid { grid-template-columns: 1fr; }.company-row { grid-template-columns: 1fr 1fr; gap: 8px; } }

.learning-head { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.learning-head p { margin:0; color:#75807b; font-size:.68rem; line-height:1.55; max-width:680px; }
.learning-summary { margin-top:16px; padding:10px 12px; border-radius:8px; background:var(--sage-soft); color:var(--forest); font-size:.65rem; font-weight:700; }
.learning-candidates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.learning-candidate { border:1px solid var(--line); border-radius:10px; padding:13px; background:#fbfaf6; }
.learning-candidate-head,.learning-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.learning-candidate-head strong { font-size:.72rem; }.learning-candidate-head time { color:#929a96; font-size:.57rem; }
.learning-candidate p { margin:11px 0 0; font-size:.67rem; line-height:1.5; color:#4f5d56; }
.learning-candidate p small { display:block; margin-bottom:4px; color:#959d99; font-size:.52rem; font-weight:800; letter-spacing:.08em; }
.learning-candidate .owner-example { padding:9px; border-radius:7px; background:#edf2e8; color:#2d493a; }
.learning-actions { margin-top:12px; justify-content:flex-end; }.learning-actions .text-button { color:#8a7770; }
.training-corrections { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.training-correction-card { border:1px solid var(--line); border-radius:10px; padding:13px; background:#fbfaf6; }
.training-correction-card p { margin:10px 0 0; font-size:.67rem; line-height:1.5; color:#4f5d56; }
.training-correction-card p small { display:block; margin-bottom:4px; color:#959d99; font-size:.52rem; font-weight:800; letter-spacing:.08em; }
.training-kind-label { margin-right:auto; color:#75807b; font-size:.58rem; font-weight:700; }
.message-training-button { display:block; margin:7px 0 0 auto; border:0; background:transparent; color:#587163; font-size:.55rem; font-weight:750; cursor:pointer; padding:2px 0; opacity:.72; }
.message-training-button:hover { opacity:1; text-decoration:underline; }
.training-modal { max-height:calc(100vh - 32px); overflow-y:auto; }
.empty-state.compact { padding:20px; font-size:.66rem; }
@media (max-width: 780px) { .learning-head { align-items:flex-start; flex-direction:column; }.learning-candidates { grid-template-columns:1fr; } }
@media (max-width: 780px) { .training-corrections { grid-template-columns:1fr; } }
