:root {
  --bg: #080a0c;
  --surface: #0e1114;
  --surface-2: #14181c;
  --surface-3: #1a1f24;
  --border: #242a30;
  --border-soft: #1b2025;
  --text: #f4f7f1;
  --muted: #8b959f;
  --muted-2: #606a73;
  --lime: #8ce619;
  --lime-soft: rgba(140, 230, 25, 0.12);
  --amber: #f4b740;
  --red: #ff6b6b;
  --blue: #5d9cff;
  --purple: #aa7cff;
  --sidebar: 248px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { min-width: 1180px; }
button, input, textarea { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 22px 16px 16px; background: #0b0d0f; border-right: 1px solid var(--border-soft); display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 22px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--lime); color: #0a0c08; display: grid; place-items: center; font-weight: 950; font-size: 19px; transform: rotate(-3deg); box-shadow: 0 0 28px rgba(140,230,25,.18); }
.brand strong { font-size: 13px; letter-spacing: .08em; display: block; }
.brand span { display: block; color: var(--muted-2); font-size: 10px; margin-top: 3px; }
.workspace-switcher { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; display: flex; align-items: center; padding: 10px; gap: 9px; margin-bottom: 18px; }
.workspace-avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg,#1b52c2,#36c8e8); font-weight: 800; }
.workspace-switcher div:nth-child(2) { min-width: 0; flex: 1; }
.workspace-switcher strong { display: block; font-size: 12px; }
.workspace-switcher span { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9px; margin-top: 2px; }
.workspace-switcher button { border: 0; background: none; color: var(--muted); cursor: pointer; }
.main-nav { display: grid; gap: 4px; }
.nav-item { border: 0; background: transparent; border-radius: 9px; color: #8c959d; padding: 10px 11px; display: flex; align-items: center; gap: 11px; text-align: left; font-size: 12px; cursor: pointer; transition: .18s ease; }
.nav-item:hover { color: var(--text); background: #111519; }
.nav-item.active { color: #f6f9f2; background: #192016; box-shadow: inset 2px 0 var(--lime); }
.nav-item > span { width: 18px; color: #68727a; font-size: 16px; text-align: center; }
.nav-item.active > span { color: var(--lime); }
.nav-item b { margin-left: auto; min-width: 20px; height: 18px; border-radius: 9px; padding: 0 5px; background: #222a30; display: grid; place-items: center; font-size: 9px; color: #b8c0c6; }
.nav-item b.warn { color: #201704; background: var(--amber); }
.sidebar-bottom { margin-top: auto; }
.usage { border: 1px solid var(--border-soft); border-radius: 10px; padding: 11px; margin-bottom: 12px; }
.usage > div:first-child { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); }
.usage strong { color: var(--text); }
.usage-bar { height: 4px; background: #252b30; border-radius: 4px; margin: 8px 0 7px; overflow: hidden; }
.usage-bar i { display: block; width: 68%; height: 100%; background: var(--lime); border-radius: inherit; }
.usage small { display: block; color: var(--muted-2); font-size: 8px; }
.profile { width: 100%; border: 0; background: transparent; padding: 7px; display: flex; align-items: center; gap: 9px; cursor: pointer; text-align: left; }
.profile-avatar { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: #2d343b; font-size: 9px; font-weight: 800; }
.profile > span:nth-child(2) { flex: 1; }
.profile strong, .profile small { display: block; }
.profile strong { font-size: 10px; }
.profile small { font-size: 8px; color: var(--muted); margin-top: 2px; }
.profile i { font-style: normal; color: var(--muted-2); letter-spacing: 1px; }

.main-area { grid-column: 2; min-height: 100vh; }
.topbar { min-height: 82px; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-soft); background: rgba(8,10,12,.92); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(16px); }
.eyebrow { margin: 0 0 4px; color: var(--lime); font-size: 8px; letter-spacing: .16em; font-weight: 800; }
.topbar h1 { margin: 0; font-size: 21px; letter-spacing: -.03em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.channel-health { height: 34px; border: 1px solid var(--border); border-radius: 9px; padding: 0 12px; display: flex; align-items: center; gap: 7px; color: #b2bbc2; font-size: 10px; }
.channel-health i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(140,230,25,.09); }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface); border-radius: 9px; cursor: pointer; position: relative; }
.notification b { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--red); top: 7px; right: 7px; border: 1px solid var(--surface); }
.primary-button, .secondary-button { border-radius: 9px; min-height: 36px; padding: 0 14px; cursor: pointer; font-weight: 750; font-size: 10px; transition: .18s ease; }
.primary-button { background: var(--lime); color: #0a0c08; border: 1px solid var(--lime); box-shadow: 0 5px 18px rgba(140,230,25,.1); }
.primary-button:hover { background: #9df229; transform: translateY(-1px); }
.secondary-button { background: #161b1f; color: #d9e0e4; border: 1px solid var(--border); }
.secondary-button:hover { border-color: #3b454d; background: #1c2227; }
.wide { width: 100%; }
.text-button, .row-action { border: 0; background: transparent; color: var(--lime); font-size: 9px; cursor: pointer; }

.view { display: none; padding: 24px 28px 40px; }
.view.active { display: block; animation: enter .22s ease; }
.inbox-view.active { padding: 0; }
@keyframes enter { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.welcome-row, .section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.welcome-row h2, .section-heading h2 { font-size: 19px; letter-spacing: -.03em; margin: 0 0 5px; }
.welcome-row p, .section-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.period-control, .filter-pills { display: flex; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 9px; padding: 3px; }
.period-control button, .filter-pills button { border: 0; background: transparent; color: var(--muted); padding: 6px 10px; border-radius: 6px; font-size: 9px; cursor: pointer; }
.period-control button.active, .filter-pills button.active { background: #262d32; color: var(--text); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 12px; }
.metric-card { position: relative; min-height: 132px; padding: 17px; background: linear-gradient(145deg,#101417,#0d1012); border: 1px solid var(--border-soft); border-radius: 13px; overflow: hidden; }
.metric-card.accent { border-color: rgba(140,230,25,.23); }
.metric-card.accent::after { content:""; position: absolute; width: 100px; height: 100px; border-radius: 50%; background: var(--lime); opacity: .05; filter: blur(25px); right: -20px; top: -28px; }
.metric-icon { position: absolute; right: 15px; top: 15px; color: #56616a; width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.metric-card.accent .metric-icon { color: var(--lime); border-color: rgba(140,230,25,.22); background: var(--lime-soft); }
.metric-card.warning .metric-icon { color: var(--amber); background: rgba(244,183,64,.08); border-color: rgba(244,183,64,.2); }
.metric-card > small, .panel-header small { color: var(--muted-2); font-size: 8px; letter-spacing: .12em; font-weight: 800; }
.metric-card > strong { display: block; font-size: 29px; letter-spacing: -.04em; margin: 13px 0 6px; }
.metric-card p { margin: 0; font-size: 8.5px; color: var(--muted); }
.metric-card p b { color: var(--lime); }
.metric-card.warning p b { color: var(--amber); }
.dashboard-grid { display: grid; grid-template-columns: 1.55fr .65fr; gap: 12px; }
.panel { background: linear-gradient(145deg,#101316,#0d1012); border: 1px solid var(--border-soft); border-radius: 13px; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 17px; }
.panel-header h3 { margin: 4px 0 0; font-size: 13px; }
.legend { display: flex; gap: 12px; color: var(--muted); font-size: 8px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 7px; height: 7px; border-radius: 50%; background: #66727b; }
.legend i.lime { background: var(--lime); }
.performance-panel { min-height: 310px; }
.chart { display: flex; padding: 5px 18px 15px 13px; height: 245px; }
.chart-y { width: 30px; display: flex; flex-direction: column; justify-content: space-between; color: var(--muted-2); font-size: 7px; padding-bottom: 18px; }
.chart-area { flex: 1; position: relative; }
.grid-lines { position: absolute; inset: 0 0 18px; display: flex; flex-direction: column; justify-content: space-between; }
.grid-lines i { display: block; border-top: 1px dashed #20262b; }
.chart svg { position: absolute; inset: 0 0 18px; width: 100%; height: calc(100% - 18px); overflow: visible; }
.area { fill: url(#areaLime); }
.line-main, .line-secondary { fill: none; vector-effect: non-scaling-stroke; }
.line-main { stroke: var(--lime); stroke-width: 2; }
.line-secondary { stroke: #6b7780; stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart-x { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; color: var(--muted-2); font-size: 6.5px; }
.ai-health { padding-bottom: 15px; }
.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 7px; font-size: 7px; font-weight: 850; letter-spacing: .07em; }
.status.live { background: var(--lime-soft); color: var(--lime); }
.status.live::before { content:""; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); margin-right: 5px; }
.status.pending { background: rgba(244,183,64,.11); color: var(--amber); }
.status.danger { background: rgba(255,107,107,.1); color: var(--red); }
.status.draft { background: #22282d; color: #8e99a1; }
.agent-orb { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%,#a9fa47,var(--lime) 45%,#4a8505); color: #132000; font-size: 27px; margin: 3px auto 14px; box-shadow: 0 0 36px rgba(140,230,25,.14); position: relative; }
.agent-orb i { position: absolute; width: 9px; height: 9px; background: var(--lime); border: 2px solid var(--surface); border-radius: 50%; right: -2px; bottom: 3px; }
.health-stat { display: flex; justify-content: space-between; font-size: 8.5px; padding: 8px 17px; border-top: 1px solid var(--border-soft); color: var(--muted); }
.health-stat strong { color: var(--text); font-size: 9px; }
.ai-health .wide { width: calc(100% - 34px); margin: 12px 17px 0; }
.queue-panel, .source-panel { min-height: 235px; }
.queue-item { margin: 0 17px; display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.queue-avatar { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; background: #252c31; color: #d8dfe3; font-size: 8px; font-weight: 800; }
.queue-item.urgent .queue-avatar { background: rgba(255,107,107,.11); color: var(--red); }
.queue-item > div { flex: 1; }
.queue-item strong { display: block; font-size: 9px; }
.queue-item p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.queue-item time { color: var(--muted-2); font-size: 7.5px; }
.queue-item.urgent time { color: var(--red); }
.donut-wrap { display: flex; align-items: center; justify-content: space-around; padding: 6px 18px 20px; }
.donut { width: 116px; height: 116px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle,#101316 53%,transparent 54%), conic-gradient(var(--lime) 0 46%,#5d9cff 46% 74%,#aa7cff 74% 92%,#30373d 92%); }
.donut strong { font-size: 20px; }
.donut span { color: var(--muted); font-size: 8px; margin-top: 2px; }
.donut-wrap ul { list-style: none; margin: 0; padding: 0; min-width: 150px; }
.donut-wrap li { display: flex; align-items: center; gap: 7px; padding: 7px 0; font-size: 8.5px; color: var(--muted); }
.donut-wrap li i { width: 7px; height: 7px; border-radius: 50%; }
.donut-wrap li i.meta { background: var(--lime); }.donut-wrap li i.google { background: var(--blue); }.donut-wrap li i.organic { background: var(--purple); }.donut-wrap li i.other { background: #30373d; }
.donut-wrap li span { flex: 1; }.donut-wrap li strong { color: var(--text); }

/* Inbox */
.inbox-shell { height: calc(100vh - 82px); display: grid; grid-template-columns: 265px minmax(420px,1fr) 330px; }
.conversation-list, .context-panel { background: #0d1012; }
.conversation-list { border-right: 1px solid var(--border-soft); overflow-y: auto; }
.context-panel { border-left: 1px solid var(--border-soft); overflow-y: auto; }
.list-toolbar { display: flex; gap: 7px; padding: 12px 11px 8px; }
.list-toolbar label, .flow-list label, .table-toolbar label { height: 34px; flex: 1; display: flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: #111518; border-radius: 8px; padding: 0 9px; color: var(--muted-2); }
.list-toolbar input, .flow-list input, .table-toolbar input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 9px; }
.list-toolbar button, .chat-actions button { border: 1px solid var(--border); background: #111518; border-radius: 8px; min-width: 34px; cursor: pointer; }
.list-tabs { display: flex; padding: 0 11px 9px; gap: 3px; border-bottom: 1px solid var(--border-soft); }
.list-tabs button { border: 0; background: transparent; color: var(--muted); padding: 6px 8px; font-size: 8px; cursor: pointer; border-radius: 6px; }
.list-tabs button.active { color: var(--text); background: #20262b; }
.list-tabs b { margin-left: 3px; color: var(--lime); }
.conversation { position: relative; display: flex; gap: 9px; padding: 12px 10px; border-bottom: 1px solid #171b1e; cursor: pointer; transition: .15s; }
.conversation:hover { background: #111518; }
.conversation.active { background: #172014; box-shadow: inset 2px 0 var(--lime); }
.contact-avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 8px; font-weight: 850; position: relative; }
.contact-avatar i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); border: 2px solid #0d1012; right: -1px; bottom: 1px; }
.pink { background: #382632; color: #ffafd3; }.blue { background: #1d2e44; color: #82b9ff; }.violet { background: #302747; color: #c4a6ff; }.amber { background: #3d2d18; color: #ffc86b; }.green { background: #1e392d; color: #84e6b2; }
.conversation-copy { min-width: 0; flex: 1; }
.conversation-copy > div { display: flex; justify-content: space-between; }
.conversation-copy strong { font-size: 9px; }
.conversation-copy time { color: var(--muted-2); font-size: 7px; }
.conversation-copy p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 4px 0 6px; color: var(--muted); font-size: 8px; }
.mini-tag { display: inline-block; padding: 3px 5px; border-radius: 4px; font-size: 6px; font-weight: 850; letter-spacing: .08em; }
.mini-tag.recipe { color: var(--amber); background: rgba(244,183,64,.09); }.mini-tag.human { color: var(--blue); background: rgba(93,156,255,.1); }.mini-tag.ai { color: var(--lime); background: var(--lime-soft); }.mini-tag.done { color: #707a82; background: #20252a; }
.unread { position: absolute; right: 10px; bottom: 11px; width: 16px; height: 16px; border-radius: 50%; background: var(--lime); color: #111; display: grid; place-items: center; font-size: 7px; }
.chat-column { display: flex; min-width: 0; flex-direction: column; background: #0a0c0e; }
.chat-header { height: 58px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; padding: 0 14px; }
.person-title { display: flex; align-items: center; gap: 9px; }
.person-title strong, .person-title span { display: block; }.person-title strong { font-size: 10px; }.person-title span { color: var(--muted); font-size: 7.5px; margin-top: 2px; }
.chat-actions { display: flex; gap: 7px; align-items: center; }
.ai-status { background: #20252a; color: #88929a; }
.chat-actions button { height: 32px; color: var(--muted); }
.chat-context { height: 31px; border-bottom: 1px solid var(--border-soft); padding: 0 14px; display: flex; align-items: center; gap: 16px; color: var(--muted-2); font-size: 7px; }
.chat-context b { color: #aab3ba; font-weight: 650; }
.messages { flex: 1; overflow-y: auto; padding: 18px 11%; background-image: radial-gradient(circle at 50% 0,rgba(140,230,25,.025),transparent 40%); }
.day-divider { display: flex; justify-content: center; margin-bottom: 17px; }
.day-divider span { color: var(--muted-2); background: #161a1d; border: 1px solid var(--border-soft); border-radius: 10px; padding: 4px 8px; font-size: 6.5px; letter-spacing: .1em; }
.message { width: fit-content; max-width: 78%; border: 1px solid var(--border-soft); padding: 8px 10px 6px; border-radius: 3px 12px 12px 12px; background: #15191c; margin: 0 0 8px; }
.message.outgoing { margin-left: auto; border-radius: 12px 3px 12px 12px; background: #182115; border-color: #26331e; }
.message p { font-size: 9px; line-height: 1.55; margin: 0; color: #d8dee2; }
.message time { display: block; color: var(--muted-2); font-size: 6.5px; margin-top: 4px; text-align: right; }
.message small { display: block; color: var(--lime); font-size: 6px; letter-spacing: .08em; margin-bottom: 4px; }
.recipe-image { width: 185px; height: 104px; border-radius: 7px; background: linear-gradient(145deg,#f2eee3,#d9d1c1); color: #31485a; padding: 10px; margin-bottom: 7px; overflow: hidden; }
.recipe-image span { display: block; font-size: 8px; font-weight: 900; letter-spacing: .12em; border-bottom: 2px solid #2a73a7; padding-bottom: 5px; }
.recipe-image i { display: block; width: 75%; height: 3px; background: #9b978e; margin-top: 7px; opacity: .6; }.recipe-image i:nth-of-type(2) { width: 86%; }.recipe-image i:nth-of-type(3) { width: 59%; }.recipe-image i:nth-of-type(4) { width: 70%; }
.recipe-image b { display: block; margin-top: 8px; font-size: 7px; font-family: Georgia,serif; }
.system-message { width: fit-content; margin: 11px auto; color: #9aa4ab; border: 1px solid #242a2f; background: #111518; padding: 6px 10px; border-radius: 999px; font-size: 7px; }.system-message span { color: var(--lime); margin-right: 4px; }
.composer { padding: 8px 12px 11px; border-top: 1px solid var(--border-soft); background: #0d1012; }
.reply-mode { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; color: var(--blue); font-size: 7px; }
.reply-mode button { border: 0; background: none; color: var(--lime); font-size: 7px; cursor: pointer; }
.composer form { display: flex; align-items: end; gap: 7px; border: 1px solid var(--border); background: #13171a; border-radius: 10px; padding: 6px; }
.composer form > button { width: 30px; height: 30px; flex: 0 0 auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.composer textarea { flex: 1; resize: none; max-height: 80px; background: transparent; color: var(--text); border: 0; outline: 0; padding: 7px 2px; font-size: 9px; }
.composer .send-button { background: var(--lime); color: #101309; border-radius: 8px; }
.context-tabs { height: 44px; border-bottom: 1px solid var(--border-soft); display: flex; padding: 0 13px; }
.context-tabs button { border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; padding: 0 10px; font-size: 8px; cursor: pointer; }
.context-tabs button.active { color: var(--text); border-bottom-color: var(--lime); }
.recipe-title { display: flex; align-items: start; justify-content: space-between; padding: 15px 16px 11px; }
.recipe-title small { font-size: 7px; color: var(--lime); letter-spacing: .09em; }.recipe-title h3 { margin: 4px 0 0; font-size: 12px; }
.confidence { margin: 0 16px 13px; border: 1px solid var(--border-soft); border-radius: 9px; padding: 10px; }
.confidence > span { font-size: 7.5px; color: var(--muted); }.confidence > strong { float: right; font-size: 9px; }
.confidence > div { clear: both; margin-top: 8px; height: 4px; border-radius: 3px; background: #252b2f; overflow: hidden; }.confidence i { display: block; height: 100%; background: var(--lime); }
.recipe-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 13px; }
.recipe-fields label:first-child { grid-column: 1 / -1; }
.recipe-fields span { display: block; font-size: 7px; color: var(--muted); margin-bottom: 4px; }.recipe-fields input, .formula-item input { width: 100%; border: 1px solid var(--border); background: #13171a; color: var(--text); border-radius: 7px; padding: 7px; outline: 0; font-size: 8px; }
.items-header { border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); padding: 8px 16px; display: flex; justify-content: space-between; color: var(--muted-2); font-size: 7px; letter-spacing: .08em; }.items-header b { color: var(--muted); }
.formula-item { padding: 9px 16px; border-bottom: 1px solid var(--border-soft); }.formula-item > div { display: flex; justify-content: space-between; align-items: center; }.formula-item strong { font-size: 8.5px; }.formula-item p { margin: 4px 0 0; font-size: 7.5px; color: var(--muted); }.formula-item.alert { background: rgba(244,183,64,.045); border-left: 2px solid var(--amber); }.formula-item.alert small { display: block; color: var(--amber); font-size: 6.5px; margin-top: 4px; }.formula-item.alert input { width: 58px; padding: 3px 5px; border-color: rgba(244,183,64,.45); color: var(--amber); }
.confidence-chip { color: var(--lime); font-size: 7px; }.confidence-chip.low { color: var(--amber); }
.estimate { margin: 12px 16px; padding: 11px; border: 1px solid rgba(140,230,25,.18); background: var(--lime-soft); border-radius: 9px; }.estimate span,.estimate small { display: block; font-size: 7px; color: #9fae94; }.estimate strong { display: block; color: var(--lime); font-size: 20px; margin: 5px 0 3px; }
.context-actions { padding: 0 16px; display: grid; grid-template-columns: 1fr 1.35fr; gap: 7px; }.approval-note { text-align: center; margin: 8px 16px 16px; color: var(--muted-2); font-size: 6.5px; }

/* Tables and sections */
.section-heading { align-items: center; }.section-heading > div:last-child { display: flex; gap: 8px; }
.table-panel { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 13px; overflow: hidden; }
.table-panel table { width: 100%; border-collapse: collapse; }
.table-panel th { text-align: left; padding: 11px 14px; color: var(--muted-2); font-size: 7px; letter-spacing: .08em; background: #0c0f11; border-bottom: 1px solid var(--border); }
.table-panel td { padding: 13px 14px; border-bottom: 1px solid var(--border-soft); color: #aeb7bd; font-size: 9px; }.table-panel tr:last-child td { border-bottom: 0; }.table-panel td strong,.table-panel td small { display: block; }.table-panel td strong { color: var(--text); font-size: 9px; }.table-panel td small { color: var(--muted-2); margin-top: 3px; font-size: 7px; }
.table-panel td.late { color: var(--red); }.score { font-weight: 800; }.score.high { color: var(--lime); }.score.medium { color: var(--amber); }.score.low { color: var(--red); }
.table-toolbar { display: flex; gap: 8px; padding: 11px; border-bottom: 1px solid var(--border-soft); }.table-toolbar label { max-width: 360px; }.table-toolbar button { border: 1px solid var(--border); background: #111518; color: var(--muted); border-radius: 8px; padding: 0 10px; font-size: 8px; }
.channel-dot { display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; font-size: 7px; font-weight: 900; margin-right: 3px; }.channel-dot.whatsapp { color: #6df3a5; background: rgba(44,211,112,.12); }.channel-dot.instagram { color: #d58cff; background: rgba(190,96,255,.1); }.channel-dot.web { color: var(--blue); background: rgba(93,156,255,.1); }
.tag { display: inline-block; background: #20262b; color: #9fa8af; padding: 4px 6px; border-radius: 5px; margin-right: 3px; font-size: 7px; }

/* CRM */
.crm-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }.crm-summary article { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 11px; padding: 13px; }.crm-summary small,.crm-summary strong,.crm-summary span { display: block; }.crm-summary small { color: var(--muted-2); font-size: 6.5px; letter-spacing: .09em; }.crm-summary strong { margin: 8px 0 4px; font-size: 18px; }.crm-summary span { color: var(--muted); font-size: 7px; }
.kanban { display: grid; grid-template-columns: repeat(4,minmax(220px,1fr)); gap: 10px; overflow-x: auto; align-items: start; }.kanban-column { background: #0d1012; border: 1px solid var(--border-soft); border-radius: 11px; padding: 9px; min-height: 440px; }.kanban-column > header { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px; color: var(--muted); font-size: 7px; letter-spacing: .08em; font-weight: 800; }.kanban-column > header b { min-width: 19px; height: 18px; display: grid; place-items: center; border-radius: 9px; background: #23292e; color: #abb3b9; font-size: 7px; }
.lead-card { background: #15191c; border: 1px solid #242b30; border-radius: 9px; padding: 10px; margin-bottom: 8px; box-shadow: 0 5px 15px rgba(0,0,0,.12); }.lead-card:hover { border-color: #39434a; }.lead-card > div { display: flex; align-items: center; justify-content: space-between; gap: 5px; }.lead-card strong { font-size: 8.5px; }.source { font-size: 5.5px; font-weight: 900; letter-spacing: .07em; border-radius: 4px; padding: 3px 4px; }.google-source { color: #82b9ff; background: rgba(93,156,255,.1); }.meta-source { color: #af8cff; background: rgba(170,124,255,.1); }.organic-source { color: #a7b0b7; background: #242a2f; }.lead-card p { margin: 9px 0 4px; color: #cad1d5; font-size: 7.5px; }.lead-card small { color: var(--muted-2); font-size: 6.5px; }.lead-card footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border-soft); padding-top: 8px; margin-top: 10px; }.lead-card footer span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #2a3136; color: #bcc4c9; font-size: 6px; font-weight: 800; }.lead-card footer b { font-size: 8px; }.lead-card.alert-card { border-left: 2px solid var(--amber); }.lead-card.won-card { border-left: 2px solid var(--lime); background: linear-gradient(110deg,rgba(140,230,25,.035),#15191c); }

/* Flow builder */
.flow-layout { display: grid; grid-template-columns: 250px 1fr; gap: 12px; height: calc(100vh - 180px); min-height: 520px; }
.flow-list { padding: 12px; }.flow-list label { margin-bottom: 10px; }.flow-card { width: 100%; display: flex; align-items: center; gap: 9px; border: 1px solid transparent; background: transparent; color: var(--text); border-radius: 9px; padding: 9px; text-align: left; cursor: pointer; }.flow-card.active { background: #192016; border-color: rgba(140,230,25,.16); }.flow-card > span { flex: 1; }.flow-card strong,.flow-card small { display: block; }.flow-card strong { font-size: 8.5px; }.flow-card small { color: var(--muted); font-size: 6.5px; margin-top: 3px; }.flow-card > b { color: var(--muted-2); font-size: 8px; }
.flow-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--lime); background: var(--lime-soft); font-style: normal; }.flow-icon.purple { color: var(--purple); background: rgba(170,124,255,.1); }.flow-icon.blue { color: var(--blue); background: rgba(93,156,255,.1); }
.flow-canvas { position: relative; overflow: hidden; background-color: #0b0e10; background-image: radial-gradient(#293036 1px, transparent 1px); background-size: 18px 18px; }
.canvas-toolbar { height: 45px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; background: rgba(15,18,21,.95); border-bottom: 1px solid var(--border-soft); font-size: 7.5px; color: var(--muted); }.canvas-toolbar > span { display: flex; align-items: center; gap: 6px; }.canvas-toolbar > span i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }.canvas-toolbar div { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }.canvas-toolbar button,.canvas-toolbar b { min-width: 28px; height: 27px; border: 0; border-right: 1px solid var(--border); background: #15191c; color: var(--muted); display: grid; place-items: center; }.canvas-toolbar b { font-size: 7px; }
.node { position: absolute; width: 175px; min-height: 78px; padding: 12px; background: #161a1e; border: 1px solid #323a40; border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,.18); z-index: 2; }.node small,.node strong,.node span { display: block; }.node small { font-size: 6px; color: var(--muted-2); letter-spacing: .1em; }.node strong { font-size: 9px; margin: 8px 0 4px; }.node span { color: var(--muted); font-size: 7px; }.node.trigger { border-top: 2px solid var(--blue); }.node.condition { border-top: 2px solid var(--amber); }.node.ai-node { border-top: 2px solid var(--lime); }.node.action { border-top: 2px solid var(--purple); }.node.message-node { border-top: 2px solid #5cb2ff; }
.port { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #313a40; border: 2px solid #0b0e10; top: 34px; }.port.in { left: -6px; }.port.out { right: -6px; }.connector { position: absolute; height: 2px; background: #4a555d; transform-origin: left center; z-index: 1; }.c1 { left: 220px; top: 183px; width: 60px; }.c2 { left: 455px; top: 183px; width: 103px; transform: rotate(-43deg); }.c3 { left: 690px; top: 108px; width: 55px; }.c4 { left: 455px; top: 183px; width: 105px; transform: rotate(43deg); }.branch-label { position: absolute; z-index: 3; font-size: 6px; font-weight: 800; }.branch-label.yes { left: 485px; top: 135px; color: var(--lime); }.branch-label.no { left: 485px; top: 229px; color: var(--red); }.floating-add { position: absolute; right: 17px; bottom: 17px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--lime); color: #101309; font-size: 20px; cursor: pointer; box-shadow: 0 8px 25px rgba(140,230,25,.2); }

/* Agents, campaigns, integrations */
.agent-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.agent-card,.new-agent-card,.campaign-card,.integration-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 13px; }
.agent-card { padding: 17px; }.agent-card.featured { border-color: rgba(140,230,25,.2); background: linear-gradient(145deg,rgba(140,230,25,.045),#0e1114 45%); }.agent-top { display: flex; justify-content: space-between; }.agent-symbol { width: 39px; height: 39px; border-radius: 11px; display: grid; place-items: center; color: #142000; background: var(--lime); font-size: 18px; }.agent-symbol.purple { background: var(--purple); color: #1b102c; }.agent-card h3 { margin: 17px 0 7px; font-size: 14px; }.agent-card > p,.new-agent-card p { color: var(--muted); font-size: 8.5px; line-height: 1.55; min-height: 40px; }.agent-tags { display: flex; gap: 5px; flex-wrap: wrap; margin: 14px 0; }.agent-tags span { color: #9da7ae; background: #20262a; border-radius: 5px; padding: 4px 6px; font-size: 7px; }.agent-metrics { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); padding: 12px 0; margin-bottom: 14px; }.agent-metrics span { text-align: center; color: var(--muted); font-size: 6.5px; border-right: 1px solid var(--border-soft); }.agent-metrics span:last-child { border: 0; }.agent-metrics strong { display: block; color: var(--text); font-size: 11px; margin-bottom: 3px; }.new-agent-card { min-height: 310px; color: var(--muted); border-style: dashed; display: grid; place-content: center; text-align: center; cursor: pointer; }.new-agent-card > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); margin: 0 auto 12px; font-size: 20px; }.new-agent-card strong { color: var(--text); }.new-agent-card p { min-height: auto; }
.campaign-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }.campaign-card { padding: 16px; }.campaign-head { display: flex; align-items: center; gap: 10px; }.campaign-channel { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; }.meta-bg { background: #2368f0; }.google-bg { background: linear-gradient(135deg,#4285f4,#34a853); }.flow-bg { color: #1e1400; background: var(--amber); }.campaign-head > div { flex: 1; }.campaign-head small { color: var(--muted-2); font-size: 6px; letter-spacing: .09em; }.campaign-head h3 { margin: 4px 0 0; font-size: 10px; }.campaign-numbers { display: grid; grid-template-columns: repeat(3,1fr); margin: 20px 0; }.campaign-numbers span { color: var(--muted); font-size: 6.5px; border-right: 1px solid var(--border-soft); padding-left: 10px; }.campaign-numbers span:first-child { padding-left: 0; }.campaign-numbers span:last-child { border: 0; }.campaign-numbers strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }.campaign-footer { border-top: 1px solid var(--border-soft); padding-top: 12px; display: flex; justify-content: space-between; color: var(--muted); font-size: 7px; }.campaign-footer button { border: 0; background: transparent; color: var(--lime); font-size: 7px; cursor: pointer; }
.integration-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.integration-card { display: flex; align-items: center; gap: 13px; padding: 16px; }.integration-card.connected { border-color: rgba(140,230,25,.14); }.integration-logo { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 10px; font-weight: 900; background: #20262a; }.integration-logo.green { color: #6df3a5; background: rgba(44,211,112,.12); }.integration-logo.red { color: #ff8f8f; background: rgba(255,75,75,.1); }.integration-logo.purple { color: #d49bff; background: rgba(190,96,255,.1); }.integration-logo.blue { color: var(--blue); background: rgba(93,156,255,.1); }.integration-card > div { flex: 1; }.integration-card h3 { margin: 0 0 4px; font-size: 10px; }.integration-card p { margin: 0 0 7px; color: var(--muted); font-size: 8px; }.integration-card div > span { color: var(--lime); font-size: 7px; }.integration-card:not(.connected) div > span { color: var(--muted-2); }.integration-card button { border: 1px solid var(--border); background: #171c20; border-radius: 8px; color: #b9c1c7; padding: 7px 10px; font-size: 7px; cursor: pointer; }

.toast { position: fixed; right: 24px; bottom: 22px; z-index: 100; display: flex; align-items: center; gap: 9px; background: #172015; border: 1px solid rgba(140,230,25,.25); border-radius: 10px; padding: 10px 14px; box-shadow: 0 15px 35px rgba(0,0,0,.35); transform: translateY(90px); opacity: 0; transition: .25s ease; }.toast.show { transform: none; opacity: 1; }.toast span { color: var(--lime); }.toast p { margin: 0; font-size: 9px; }

@media (max-width: 1280px) {
  :root { --sidebar: 220px; }
  .inbox-shell { grid-template-columns: 235px minmax(390px,1fr) 305px; }
  .messages { padding-left: 7%; padding-right: 7%; }
}

/* Identidade clara inspirada no sistema LockCar */
:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #edf3f9;
  --border: #dce6ee;
  --border-soft: #e8f0f6;
  --text: #142438;
  --muted: #64748b;
  --muted-2: #7d8895;
  --lime: #00d5ff;
  --lime-soft: rgba(0, 213, 255, .11);
  --amber: #d97706;
  --red: #dc2626;
  --blue: #2563eb;
  --purple: #7c3aed;
  --sidebar: 244px;
  font-family: "DM Sans", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html, body { background: var(--bg); color: var(--text); }
body { font-size: 15px; }
h1, h2, h3, .metric-card > strong, .crm-summary strong, .campaign-numbers strong { font-family: Inter, "DM Sans", sans-serif; }

.sidebar {
  padding: 24px 16px 18px;
  background: #0a0a0a;
  border-right-color: #1e1e1e;
}
.brand { padding: 0 10px 24px; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--lime);
  color: #0e2034;
  font-size: 22px;
  box-shadow: 0 0 24px rgba(0, 213, 255, .18);
}
.brand strong { color: #fff; font-size: 15px; letter-spacing: .07em; }
.brand span { color: #8b95a1; font-size: 12px; margin-top: 4px; }
.workspace-switcher { padding: 11px; background: #151719; border-color: #282c30; border-radius: 10px; }
.workspace-switcher strong { color: #fff; font-size: 14px; }
.workspace-switcher span { color: #8b95a1; font-size: 11px; }
.workspace-switcher button { color: #a8b0b7; font-size: 16px; }
.workspace-avatar { width: 36px; height: 36px; background: #153e70; color: #fff; font-size: 14px; }
.main-nav { gap: 4px; }
.nav-item { padding: 12px; border-radius: 7px; color: #eef2f5; font-size: 14px; font-weight: 500; }
.nav-item:hover { color: var(--lime); background: rgba(0, 213, 255, .06); }
.nav-item.active { color: var(--lime); background: rgba(0, 213, 255, .08); box-shadow: none; font-weight: 700; }
.nav-item > span { width: 22px; color: #a6afb7; font-size: 18px; }
.nav-item.active > span { color: var(--lime); }
.nav-item b { min-width: 23px; height: 21px; background: #262b2f; color: #cbd2d8; font-size: 11px; }
.nav-item b.warn { color: #4a2a00; background: #fbbf24; }
.usage { padding: 12px; border-color: #262b2f; }
.usage > div:first-child { color: #a3adb6; font-size: 11px; }
.usage strong { color: #fff; }
.usage-bar { height: 6px; background: #2b3034; }
.usage small { color: #7f8992; font-size: 10px; }
.profile { padding: 9px 7px; }
.profile-avatar { width: 36px; height: 36px; background: rgba(0, 213, 255, .12); color: var(--lime); font-size: 11px; }
.profile strong { color: #fff; font-size: 13px; }
.profile small { color: #8b95a1; font-size: 11px; }

.main-area { background: var(--bg); }
.topbar {
  min-height: 88px;
  padding: 18px 32px;
  background: rgba(255, 255, 255, .96);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 3px rgba(18, 36, 58, .04);
}
.eyebrow { color: #00798f; font-size: 11px; letter-spacing: .11em; }
.topbar h1 { color: #182a40; font-size: 27px; font-weight: 750; }
.channel-health { height: 39px; color: #516277; border-color: var(--border); background: #fff; font-size: 13px; }
.channel-health i { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .1); }
.icon-button { width: 39px; height: 39px; color: #516277; background: #fff; border-color: var(--border); font-size: 16px; }
.notification b { border-color: #fff; }
.primary-button, .secondary-button { min-height: 40px; padding: 0 16px; border-radius: 8px; font-size: 13px; }
.primary-button { background: var(--lime); color: #0e2034; border-color: var(--lime); box-shadow: none; }
.primary-button:hover { background: #00bfe6; }
.secondary-button { background: #e9f1f8; color: #25374c; border-color: #dae4ec; }
.secondary-button:hover { background: #dde9f4; border-color: #cbd9e4; }
.text-button, .row-action { color: #153e70; font-size: 12px; font-weight: 700; }

.view { padding: 30px 32px 44px; }
.welcome-row, .section-heading { margin-bottom: 24px; }
.welcome-row h2, .section-heading h2 { color: #182c45; font-size: 25px; }
.welcome-row p, .section-heading p { color: #6e7a87; font-size: 14px; }
.period-control, .filter-pills { padding: 4px; background: #fff; border-color: var(--border); }
.period-control button, .filter-pills button { padding: 8px 13px; color: #5d6a78; font-size: 12px; font-weight: 600; }
.period-control button.active, .filter-pills button.active { color: #153e70; background: #e5eff9; }

.metric-grid { gap: 14px; margin-bottom: 14px; }
.metric-card {
  min-height: 150px;
  padding: 20px;
  background: #fff;
  border-color: var(--border);
  border-top: 3px solid #3b82f6;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(18, 36, 58, .04);
}
.metric-card:nth-child(2) { border-top-color: #8b5cf6; }
.metric-card:nth-child(3) { border-top-color: #f59e0b; }
.metric-card:nth-child(4) { border-top-color: #10b981; }
.metric-card.accent { border-color: var(--border); border-top-color: #3b82f6; }
.metric-card.accent::after { background: #3b82f6; opacity: .035; }
.metric-icon { width: 34px; height: 34px; color: #3b82f6; background: #eff6ff; border-color: #dbeafe; font-size: 16px; }
.metric-card.accent .metric-icon { color: #3b82f6; background: #eff6ff; border-color: #dbeafe; }
.metric-card.warning .metric-icon { color: #d97706; background: #fffbeb; border-color: #fde68a; }
.metric-card > small, .panel-header small { color: #7d8895; font-size: 11px; letter-spacing: .08em; }
.metric-card > strong { margin: 15px 0 7px; color: #17304e; font-size: 34px; }
.metric-card p { color: #6e7a87; font-size: 12px; }
.metric-card p b { color: #1d4ed8; }

.dashboard-grid { gap: 14px; }
.panel, .table-panel, .agent-card, .new-agent-card, .campaign-card, .integration-card {
  background: #fff;
  border-color: var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(18, 36, 58, .04);
}
.panel-header { padding: 19px 20px; }
.panel-header h3 { color: #182c45; font-size: 17px; }
.legend { color: #6e7a87; font-size: 11px; }
.legend i { background: #94a3b8; }
.grid-lines i { border-color: #e8f0f6; }
.chart-y, .chart-x { color: #7d8895; font-size: 10px; }
.line-secondary { stroke: #94a3b8; }
.status { padding: 6px 9px; font-size: 10px; }
.status.live { color: #047857; background: #ecfdf5; }
.status.live::before { background: #10b981; }
.status.draft { color: #64748b; background: #eef2f6; }
.agent-orb { background: radial-gradient(circle at 30% 25%, #72eaff, #00d5ff 48%, #0089a5); color: #0e2034; box-shadow: 0 8px 28px rgba(0, 213, 255, .18); }
.health-stat { padding: 11px 20px; color: #64748b; font-size: 13px; }
.health-stat strong { color: #182c45; font-size: 13px; }
.queue-item { margin: 0 20px; padding: 14px 0; }
.queue-avatar { width: 36px; height: 36px; background: #d5e4f3; color: #1f508c; font-size: 11px; }
.queue-item strong { color: #182c45; font-size: 13px; }
.queue-item p { color: #6e7a87; font-size: 12px; }
.queue-item time { color: #7d8895; font-size: 11px; }
.donut { background: radial-gradient(circle, #fff 53%, transparent 54%), conic-gradient(var(--lime) 0 46%, #3b82f6 46% 74%, #8b5cf6 74% 92%, #dce6ee 92%); }
.donut strong { color: #182c45; font-size: 22px; }
.donut span, .donut-wrap li { color: #64748b; font-size: 12px; }

/* Atendimento */
.inbox-shell { height: calc(100vh - 88px); grid-template-columns: 280px minmax(400px, 1fr) 350px; }
.conversation-list, .context-panel, .chat-column, .composer { background: #fff; }
.list-toolbar label, .flow-list label, .table-toolbar label { height: 40px; background: #fff; border-color: var(--border); color: #7d8895; }
.list-toolbar input, .flow-list input, .table-toolbar input { color: #25374c; font-size: 13px; }
.list-toolbar button, .chat-actions button { background: #fff; border-color: var(--border); color: #516277; }
.list-tabs { border-color: var(--border-soft); }
.list-tabs button { color: #64748b; font-size: 12px; }
.list-tabs button.active { color: #153e70; background: #e5eff9; }
.list-tabs b { color: #00798f; }
.conversation { padding: 14px 12px; border-color: #edf3f9; }
.conversation:hover { background: #f9fbfd; }
.conversation.active { background: #eaf7fb; box-shadow: inset 3px 0 var(--lime); }
.contact-avatar { width: 40px; height: 40px; font-size: 11px; }
.contact-avatar i { border-color: #fff; background: #10b981; }
.pink { background: #fce7f3; color: #be185d; }
.blue { background: #dbeafe; color: #1d4ed8; }
.violet { background: #ede9fe; color: #7c3aed; }
.amber { background: #fef3c7; color: #b45309; }
.green { background: #d1fae5; color: #047857; }
.conversation-copy strong { color: #182c45; font-size: 13px; }
.conversation-copy time { color: #7d8895; font-size: 10px; }
.conversation-copy p { color: #64748b; font-size: 12px; }
.mini-tag { padding: 4px 6px; font-size: 9px; }
.mini-tag.done { color: #64748b; background: #eef2f6; }
.unread { width: 19px; height: 19px; color: #0e2034; font-size: 10px; }
.chat-header { height: 66px; border-color: var(--border-soft); }
.person-title strong { color: #182c45; font-size: 14px; }
.person-title span { color: #64748b; font-size: 11px; }
.ai-status { color: #516277; background: #eef2f6; }
.chat-context { height: 38px; color: #7d8895; border-color: var(--border-soft); font-size: 11px; }
.chat-context b { color: #405670; }
.messages { background: #f7fafc; background-image: radial-gradient(circle at 50% 0, rgba(0, 213, 255, .045), transparent 42%); }
.day-divider span { color: #64748b; background: #fff; border-color: var(--border); font-size: 9px; }
.message { padding: 10px 12px 8px; background: #fff; border-color: #dce6ee; box-shadow: 0 1px 2px rgba(18, 36, 58, .04); }
.message.outgoing { background: #dfeef8; border-color: #c9ddeb; }
.message p { color: #25374c; font-size: 13px; line-height: 1.55; }
.message time { color: #7d8895; font-size: 10px; }
.message small { color: #00798f; font-size: 9px; }
.system-message { color: #516277; border-color: #dce6ee; background: #eef5fa; font-size: 10px; }
.system-message span { color: #00798f; }
.reply-mode, .reply-mode button { font-size: 11px; }
.reply-mode button { color: #153e70; font-weight: 700; }
.composer form { background: #fff; border-color: #cbd9e4; }
.composer textarea { color: #25374c; font-size: 13px; }
.composer .send-button { color: #0e2034; }
.context-tabs button { color: #64748b; font-size: 11px; }
.context-tabs button.active { color: #153e70; }
.recipe-title small { color: #00798f; font-size: 10px; }
.recipe-title h3 { color: #182c45; font-size: 16px; }
.confidence { background: #fafcfe; border-color: var(--border-soft); }
.confidence > span { color: #64748b; font-size: 11px; }
.confidence > strong { color: #182c45; font-size: 13px; }
.confidence > div { background: #e2e8f0; }
.recipe-fields span { color: #64748b; font-size: 10px; }
.recipe-fields input, .formula-item input { background: #fff; border-color: #d0dde9; color: #192d45; font-size: 12px; }
.items-header { color: #7d8895; font-size: 10px; }
.formula-item strong { color: #25374c; font-size: 12px; }
.formula-item p { color: #64748b; font-size: 11px; }
.formula-item.alert { background: #fffbeb; }
.formula-item.alert small { font-size: 10px; }
.confidence-chip { color: #047857; font-size: 10px; }
.estimate { border-color: #bae6f0; background: #effbfe; }
.estimate span, .estimate small { color: #52717b; font-size: 10px; }
.estimate strong { color: #00798f; font-size: 23px; }
.approval-note { color: #7d8895; font-size: 10px; }

/* Tabelas e CRM */
.table-panel th { padding: 13px 16px; color: #7d8895; background: #fafcfe; font-size: 11px; }
.table-panel td { padding: 15px 16px; color: #43556a; font-size: 13px; }
.table-panel td strong { color: #182c45; font-size: 13px; }
.table-panel td small { color: #7d8895; font-size: 11px; }
.table-toolbar button { background: #fff; color: #516277; font-size: 12px; }
.channel-dot { width: 25px; height: 25px; font-size: 10px; }
.tag { color: #516277; background: #e9f1f8; font-size: 10px; }
.crm-summary article { padding: 16px; background: #fff; border-color: var(--border); }
.crm-summary small { color: #7d8895; font-size: 10px; }
.crm-summary strong { color: #17304e; font-size: 23px; }
.crm-summary span { color: #64748b; font-size: 11px; }
.kanban-column { padding: 11px; background: #f4f9fd; border-color: #dce6ee; }
.kanban-column > header { color: #516277; font-size: 10px; }
.kanban-column > header b { color: #153e70; background: #dce9f5; font-size: 10px; }
.lead-card { padding: 12px; background: #fff; border-color: #dee9f2; box-shadow: 0 1px 2px rgba(18, 36, 58, .04); }
.lead-card:hover { border-color: #b9ccdc; }
.lead-card strong { color: #182c45; font-size: 12px; }
.source { font-size: 8px; }
.lead-card p { color: #43556a; font-size: 11px; }
.lead-card small { color: #7d8895; font-size: 10px; }
.lead-card footer span { color: #1f508c; background: #d5e4f3; font-size: 9px; }
.lead-card footer b { color: #25374c; font-size: 11px; }
.lead-card.won-card { background: linear-gradient(110deg, rgba(16, 185, 129, .05), #fff); }

/* Fluxos, agentes, campanhas e integrações */
.flow-card.active { background: #eaf7fb; border-color: #bae6f0; }
.flow-card strong { color: #182c45; font-size: 12px; }
.flow-card small { color: #64748b; font-size: 10px; }
.flow-card > b { color: #7d8895; font-size: 11px; }
.flow-canvas { background-color: #f7fafc; background-image: radial-gradient(#cbd9e4 1px, transparent 1px); }
.canvas-toolbar { background: rgba(255, 255, 255, .96); color: #64748b; font-size: 11px; }
.canvas-toolbar button, .canvas-toolbar b { background: #fff; color: #516277; }
.canvas-toolbar b { font-size: 10px; }
.node { background: #fff; border-color: #cbd9e4; box-shadow: 0 8px 22px rgba(18, 36, 58, .08); }
.node small { color: #7d8895; font-size: 9px; }
.node strong { color: #182c45; font-size: 12px; }
.node span { color: #64748b; font-size: 10px; }
.port { background: #94a3b8; border-color: #f7fafc; }
.connector { background: #94a3b8; }
.branch-label { font-size: 9px; }
.floating-add { color: #0e2034; box-shadow: 0 8px 22px rgba(0, 213, 255, .22); }
.agent-card.featured { border-color: #bae6f0; background: linear-gradient(145deg, rgba(0, 213, 255, .055), #fff 48%); }
.agent-symbol { color: #0e2034; }
.agent-card h3 { color: #182c45; font-size: 18px; }
.agent-card > p, .new-agent-card p { color: #64748b; font-size: 12px; }
.agent-tags span { color: #516277; background: #e9f1f8; font-size: 10px; }
.agent-metrics span { color: #64748b; font-size: 10px; }
.agent-metrics strong { color: #182c45; font-size: 14px; }
.campaign-head small { color: #7d8895; font-size: 9px; }
.campaign-head h3 { color: #182c45; font-size: 14px; }
.campaign-numbers span { color: #64748b; font-size: 10px; }
.campaign-numbers strong { color: #182c45; font-size: 19px; }
.campaign-footer, .campaign-footer button { font-size: 10px; }
.campaign-footer { color: #64748b; }
.campaign-footer button { color: #153e70; font-weight: 700; }
.integration-logo { background: #eef2f6; font-size: 12px; }
.integration-card h3 { color: #182c45; font-size: 14px; }
.integration-card p { color: #64748b; font-size: 12px; }
.integration-card div > span { color: #047857; font-size: 10px; }
.integration-card button { background: #e9f1f8; border-color: #dae4ec; color: #25374c; font-size: 11px; }
.toast { color: #182c45; background: #fff; border-color: #bae6f0; box-shadow: 0 15px 35px rgba(18, 36, 58, .16); }
.toast span { color: #00798f; }
.toast p { font-size: 13px; }

@media (max-width: 1280px) {
  :root { --sidebar: 220px; }
  .inbox-shell { grid-template-columns: 245px minmax(390px, 1fr) 320px; }
}

/* Camada de acessibilidade e prioridade para o atendimento diário */
:root { --sidebar: 264px; }

body {
  font-size: 16px;
  line-height: 1.45;
}

button,
input,
textarea {
  line-height: 1.35;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 213, 255, .34);
  outline-offset: 2px;
}

.sidebar { padding: 20px 15px 16px; }
.brand { padding-bottom: 18px; }
.brand strong { font-size: 16px; }
.brand span { font-size: 13px; }
.workspace-switcher { min-height: 60px; margin-bottom: 12px; }
.workspace-switcher strong { font-size: 15px; }
.workspace-switcher span { font-size: 12px; }
.main-nav { gap: 3px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.nav-section-label {
  display: block;
  padding: 13px 12px 6px;
  color: #79838c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
}
.nav-section-label:first-child { padding-top: 4px; }
.nav-item { min-height: 46px; padding: 11px 12px; font-size: 15px; }
.nav-item > span { width: 24px; font-size: 19px; }
.nav-item b { min-width: 24px; height: 22px; font-size: 12px; }
.usage > div:first-child { font-size: 12px; }
.usage small { font-size: 11px; }
.profile strong { font-size: 14px; }
.profile small { font-size: 12px; }

.topbar { min-height: 80px; padding: 12px 28px; }
.eyebrow { font-size: 11px; }
.topbar h1 { font-size: 28px; }
.channel-health { height: 44px; font-size: 14px; }
.icon-button { width: 44px; height: 44px; }
.primary-button,
.secondary-button { min-height: 44px; padding: 0 18px; font-size: 14px; }
.text-button,
.row-action { min-height: 38px; font-size: 13px; }

.view { padding: 28px 30px 42px; }
.welcome-row h2,
.section-heading h2 { font-size: 27px; }
.welcome-row p,
.section-heading p { font-size: 15px; }
.period-control button,
.filter-pills button { min-height: 38px; font-size: 13px; }

.metric-card > small,
.panel-header small { font-size: 12px; }
.metric-card > strong { font-size: 36px; }
.metric-card p { font-size: 14px; }
.panel-header h3 { font-size: 19px; }
.legend { font-size: 12px; }
.chart-y,
.chart-x { font-size: 11px; }
.status { font-size: 11px; }
.health-stat,
.health-stat strong { font-size: 14px; }
.queue-item strong { font-size: 14px; }
.queue-item p { font-size: 13px; }
.queue-item time { font-size: 12px; }
.donut span,
.donut-wrap li { font-size: 13px; }

/* Conversas: texto confortável e ações principais no primeiro plano. */
.inbox-shell {
  height: calc(100vh - 80px);
  grid-template-columns: 300px minmax(400px, 1fr) 370px;
}
.list-toolbar { gap: 9px; padding: 13px 12px 10px; }
.list-toolbar label,
.flow-list label,
.table-toolbar label { height: 44px; padding: 0 12px; }
.list-toolbar input,
.flow-list input,
.table-toolbar input { font-size: 14px; }
.list-toolbar button,
.chat-actions button { min-width: 44px; min-height: 44px; }
.list-tabs { padding: 0 12px 11px; gap: 5px; }
.list-tabs button { min-height: 38px; padding: 8px 10px; font-size: 13px; }
.conversation { gap: 11px; min-height: 82px; padding: 15px 13px; }
.contact-avatar { width: 44px; height: 44px; font-size: 13px; }
.conversation-copy strong { font-size: 15px; }
.conversation-copy time { font-size: 12px; }
.conversation-copy p { margin: 5px 0 7px; font-size: 14px; }
.mini-tag { padding: 4px 7px; font-size: 10px; }
.unread { width: 22px; height: 22px; font-size: 11px; }

.chat-header { height: 72px; padding: 0 16px; }
.person-title { gap: 11px; }
.person-title strong { font-size: 17px; }
.person-title span { font-size: 13px; }
.ai-status { font-size: 11px; }
.chat-context { height: 44px; padding: 0 16px; gap: 18px; font-size: 13px; overflow-x: auto; white-space: nowrap; }
.messages { padding: 16px 6% 20px; scroll-padding-top: 16px; }
.day-divider { margin-bottom: 14px; }
.day-divider span { padding: 5px 10px; font-size: 10px; }
.message { max-width: 82%; margin-bottom: 11px; padding: 12px 14px 9px; border-radius: 4px 14px 14px 14px; }
.message.outgoing { border-radius: 14px 4px 14px 14px; }
.message p { font-size: 15px; line-height: 1.5; }
.message time { margin-top: 6px; font-size: 11px; }
.message small { margin-bottom: 6px; font-size: 10px; }
.recipe-image { width: 220px; height: 124px; }
.recipe-image span { font-size: 10px; }
.recipe-image b { font-size: 9px; }
.system-message { padding: 8px 12px; font-size: 12px; }
.composer { padding: 10px 14px 13px; }
.reply-mode,
.reply-mode button { font-size: 13px; }
.composer form { gap: 8px; padding: 7px; }
.composer form > button { width: 38px; height: 38px; font-size: 17px; }
.composer textarea { padding: 9px 3px; font-size: 15px; }

.context-tabs { height: 50px; }
.context-tabs button { min-height: 48px; font-size: 13px; }
.recipe-title { padding: 17px 18px 13px; }
.recipe-title small { font-size: 11px; }
.recipe-title h3 { font-size: 18px; }
.confidence { margin: 0 18px 15px; padding: 12px; }
.confidence > span { font-size: 13px; }
.confidence > strong { font-size: 14px; }
.recipe-fields { gap: 10px; padding: 0 18px 15px; }
.recipe-fields span { font-size: 12px; }
.recipe-fields input,
.formula-item input { min-height: 40px; padding: 9px; font-size: 14px; }
.items-header { padding: 10px 18px; font-size: 11px; }
.formula-item { padding: 11px 18px; }
.formula-item strong { font-size: 14px; }
.formula-item p { font-size: 13px; }
.formula-item.alert small { font-size: 11px; }
.confidence-chip { font-size: 11px; }
.estimate { margin: 14px 18px; padding: 13px; }
.estimate span,
.estimate small { font-size: 12px; }
.estimate strong { font-size: 25px; }
.context-actions { padding: 0 18px; gap: 9px; }
.approval-note { margin: 10px 18px 18px; font-size: 11px; }

/* Demais telas: elimina os textos de 8–10 px do protótipo inicial. */
.table-panel th { font-size: 12px; }
.table-panel td,
.table-panel td strong { font-size: 14px; }
.table-panel td small { font-size: 12px; }
.table-toolbar button { min-height: 44px; font-size: 13px; }
.tag { font-size: 11px; }
.crm-summary small { font-size: 11px; }
.crm-summary strong { font-size: 25px; }
.crm-summary span { font-size: 12px; }
.kanban-column > header,
.kanban-column > header b { font-size: 11px; }
.lead-card strong { font-size: 14px; }
.source { font-size: 9px; }
.lead-card p { font-size: 13px; }
.lead-card small { font-size: 11px; }
.lead-card footer span,
.lead-card footer b { font-size: 11px; }
.flow-card { min-height: 58px; }
.flow-card strong { font-size: 14px; }
.flow-card small { font-size: 11px; }
.flow-card > b,
.canvas-toolbar { font-size: 12px; }
.node small { font-size: 10px; }
.node strong { font-size: 14px; }
.node span { font-size: 12px; }
.branch-label { font-size: 10px; }
.agent-card h3 { font-size: 19px; }
.agent-card > p,
.new-agent-card p { font-size: 14px; }
.agent-tags span { font-size: 11px; }
.agent-metrics span { font-size: 11px; }
.agent-metrics strong { font-size: 16px; }
.campaign-head small { font-size: 10px; }
.campaign-head h3 { font-size: 16px; }
.campaign-numbers span { font-size: 11px; }
.campaign-numbers strong { font-size: 21px; }
.campaign-footer,
.campaign-footer button { font-size: 12px; }
.integration-logo { font-size: 13px; }
.integration-card h3 { font-size: 16px; }
.integration-card p { font-size: 14px; }
.integration-card div > span,
.integration-card button { font-size: 12px; }
.toast p { font-size: 14px; }

@media (max-width: 1280px) {
  :root { --sidebar: 230px; }
  .nav-item { font-size: 14px; }
  .inbox-shell { grid-template-columns: 260px minmax(360px, 1fr) 330px; }
  .messages { padding-left: 4%; padding-right: 4%; }
}

@media (max-height: 800px) {
  .sidebar { padding-top: 14px; }
  .brand { padding-bottom: 10px; }
  .workspace-switcher { min-height: 52px; margin-bottom: 7px; }
  .nav-section-label { padding-top: 8px; }
  .nav-item { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
  .usage { display: none; }
}

/* DNA visual do CRM LockCar, adaptado à identidade azul/ciano da Essência. */
:root {
  --bg: #f3f6f8;
  --surface-2: #f8fafc;
  --surface-3: #edf3f9;
  --border: #dce6ee;
  --border-soft: #e8f0f6;
  --text: #1c2d41;
  --muted: #64748b;
  --muted-2: #7d8895;
  --lime: #00d5ff;
  --lime-soft: rgba(0, 213, 255, .10);
  --essencia-royal: #153e70;
  --essencia-ink: #0f2a3d;
}

.sidebar {
  background: #08090c;
  border-right: 1px solid #1f2429;
  box-shadow: 8px 0 26px rgba(15, 42, 61, .05);
}
.brand-mark {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(0, 213, 255, .65);
  border-radius: 50%;
  background: #102235;
  color: #71eaff;
  box-shadow: 0 0 0 5px rgba(0, 213, 255, .06);
  transform: none;
}
.brand span { color: #89949e; }
.workspace-switcher {
  position: relative;
  overflow: hidden;
  background: #101317;
  border-color: #262e35;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
.workspace-switcher::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--lime);
}
.workspace-avatar { background: var(--essencia-royal); }
.nav-section-label { color: #69737c; }
.nav-item { color: #d7dde2; }
.nav-item:hover { color: #fff; background: #10171d; }
.nav-item.active {
  color: #fff;
  background: var(--essencia-ink);
  box-shadow: inset 3px 0 var(--lime);
}
.nav-item.active > span { color: var(--lime); }
.nav-item b { background: #222a30; color: #cbd2d8; }
.nav-item.active b { background: rgba(0, 213, 255, .15); color: #7deaff; }
.usage { background: #0d1013; border-color: #262e35; }

.topbar {
  background: rgba(255, 255, 255, .97);
  border-bottom-color: #dce6ee;
  box-shadow: 0 1px 3px rgba(18, 36, 58, .055);
}
.topbar > div:first-child { display: flex; min-width: 0; flex-direction: column; }
.topbar h1 { order: 1; color: #172b43; letter-spacing: -.025em; }
.eyebrow {
  order: 2;
  margin: 3px 0 0;
  color: #6d7b89;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.channel-health,
.icon-button { border-color: #dce6ee; background: #fff; }
.primary-button { background: #00d5ff; color: #0e2034; border-color: #00d5ff; }
.primary-button:hover { background: #00bfe6; border-color: #00bfe6; }
.secondary-button { background: #e9f1f8; color: #25374c; border-color: #dae4ec; }

.panel,
.table-panel,
.agent-card,
.new-agent-card,
.campaign-card,
.integration-card {
  border-color: #dce6ee;
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 36, 58, .045);
}
.metric-card {
  border-color: #dce6ee;
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 36, 58, .045);
}

.conversation-list,
.context-panel,
.chat-column,
.composer { background: #fff; }
.conversation-list { border-right-color: #dce6ee; }
.context-panel { border-left-color: #dce6ee; }
.conversation { border-bottom-color: #edf3f9; }
.conversation:hover { background: #f8fbfd; }
.conversation.active {
  background: #eef7fc;
  box-shadow: inset 3px 0 var(--lime);
}
.contact-avatar {
  background: #d5e4f3;
  color: #1f508c;
}
.messages {
  background-color: #f4f7fa;
  background-image: radial-gradient(circle at 50% 0, rgba(21, 62, 112, .045), transparent 44%);
}
.message { border-color: #dce6ee; background: #fff; }
.message.outgoing { border-color: #ccdeeb; background: #e9f2fa; }
.system-message { border-color: #dce6ee; background: #eef5fa; }
.composer form { border-color: #cbd9e4; background: #fff; }
.context-tabs button.active { color: var(--essencia-royal); border-bottom-color: var(--lime); }
.estimate { border-color: #b7e9f4; background: #effbfe; }
.estimate strong { color: #00798f; }

/* Confirmação de receita: fluxo detalhado inspirado na lógica operacional do Vitória Farmácia. */
.full-review-link {
  display: grid;
  grid-template-columns: 34px 1fr;
  width: calc(100% - 36px);
  margin: 0 18px 14px;
  padding: 12px;
  border: 1px solid #b8ddeb;
  border-radius: 10px;
  background: #f0faff;
  color: #153e70;
  text-align: left;
  cursor: pointer;
}
.full-review-link > span { grid-row: 1 / 3; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #153e70; color: #fff; font-weight: 800; }
.full-review-link strong { font-size: 13px; }
.full-review-link small { margin-top: 2px; color: #64748b; font-size: 10px; }
.full-review-link:hover { border-color: #00bfe6; background: #e7f8fd; }

.recipe-confirmation-view { max-width: 1680px; margin: 0 auto; }
.review-toolbar { display: grid; grid-template-columns: 220px 1fr auto; align-items: center; gap: 18px; margin-bottom: 14px; }
.review-back { min-height: 42px; justify-self: start; padding: 0 15px; border: 1px solid #d4e0e9; border-radius: 9px; background: #fff; color: #334a62; font-size: 13px; font-weight: 700; cursor: pointer; }
.review-back:hover { border-color: #a9c2d3; background: #f8fbfd; }
.review-identification { display: flex; align-items: center; gap: 12px; min-width: 0; }
.review-identification span { color: #173a68; font-size: 13px; font-weight: 800; letter-spacing: .055em; }
.review-identification b { overflow: hidden; color: #64748b; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.review-status { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .045em; white-space: nowrap; }
.review-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.review-status.pending { background: #fff4d9; color: #9a6500; }
.review-status.confirmed { background: #e6f8ef; color: #087448; }
.review-status.danger { background: #ffeded; color: #b63f3f; }

.review-tabs { display: flex; align-items: stretch; min-height: 58px; margin: 0 0 18px; padding: 0 10px; overflow-x: auto; border: 1px solid #dce6ee; border-radius: 11px; background: #fff; box-shadow: 0 1px 2px rgba(18,36,58,.04); }
.review-tabs button { position: relative; display: flex; align-items: center; gap: 9px; min-width: max-content; padding: 0 20px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #64748b; font-size: 14px; font-weight: 700; cursor: pointer; }
.review-tabs button > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #edf3f7; color: #728194; font-size: 10px; }
.review-tabs button > b { padding: 3px 6px; border-radius: 5px; background: #ecf7fb; color: #087e99; font-size: 8px; letter-spacing: .06em; }
.review-tabs button:hover { color: #153e70; }
.review-tabs button.active { border-bottom-color: #00c7ee; color: #153e70; }
.review-tabs button.active > span { background: #153e70; color: #fff; }
.review-tab-panel { display: none; }
.review-tab-panel.active { display: block; animation: enter .18s ease; }

.review-alert,
.internal-alert { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid #f1d99a; border-radius: 11px; background: #fff9e9; color: #765211; }
.review-alert > span,
.internal-alert > span { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #eaa91d; color: #fff; font-size: 16px; font-weight: 900; }
.review-alert strong,
.internal-alert strong { display: block; margin: 1px 0 3px; color: #6f4b00; font-size: 14px; }
.review-alert p,
.internal-alert p { margin: 0; color: #826628; font-size: 13px; line-height: 1.45; }
.internal-alert { border-color: #b8ddeb; background: #effaff; color: #153e70; }
.internal-alert > span { border-radius: 7px; background: #153e70; }
.internal-alert strong { color: #153e70; }
.internal-alert p { color: #526b84; }

.review-layout { display: grid; grid-template-columns: minmax(390px, .78fr) minmax(620px, 1.22fr); align-items: start; gap: 18px; }
.review-stack { display: grid; gap: 18px; }
.review-card { overflow: hidden; border: 1px solid #dce6ee; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(18,36,58,.045); }
.review-card-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 67px; padding: 14px 17px; border-bottom: 1px solid #e8f0f6; }
.review-card-header small { display: block; margin-bottom: 3px; color: #7d8895; font-size: 9px; font-weight: 800; letter-spacing: .105em; }
.review-card-header h2 { margin: 0; color: #1b3048; font-size: 18px; line-height: 1.2; }
.preview-actions { display: flex; align-items: center; gap: 4px; }
.preview-actions button { min-height: 32px; padding: 0 10px; border: 1px solid #d6e1e9; border-radius: 7px; background: #fff; color: #3c4e61; font-size: 11px; cursor: pointer; }
.preview-actions button:first-child,
.preview-actions button:nth-child(3) { width: 32px; padding: 0; font-size: 15px; }
.preview-actions b { min-width: 42px; text-align: center; color: #526174; font-size: 10px; }

.prescription-preview { display: grid; place-items: center; min-height: 470px; padding: 25px; background: #e9eef2; background-image: linear-gradient(45deg, rgba(72,92,112,.035) 25%, transparent 25%, transparent 75%, rgba(72,92,112,.035) 75%), linear-gradient(45deg, rgba(72,92,112,.035) 25%, transparent 25%, transparent 75%, rgba(72,92,112,.035) 75%); background-position: 0 0, 12px 12px; background-size: 24px 24px; }
.paper-sheet { position: relative; width: min(100%, 380px); min-height: 420px; padding: 30px 32px; border: 1px solid #d4d0c5; background: #fffefa; color: #2f3640; box-shadow: 0 8px 24px rgba(33,48,62,.16); transform: rotate(-.25deg); }
.paper-brand { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 17px; border-bottom: 2px solid #173a68; }
.paper-brand span { color: #173a68; font-family: Inter, sans-serif; font-size: 15px; font-weight: 800; letter-spacing: .08em; }
.paper-brand b { font-size: 10px; }
.paper-patient { margin: 18px 0; font-size: 11px; }
.paper-sheet ol { display: grid; gap: 14px; margin: 0; padding-left: 22px; }
.paper-sheet li { padding-left: 4px; font-size: 11px; }
.paper-sheet li b,
.paper-sheet li span { display: block; }
.paper-sheet li span { margin-top: 3px; color: #606873; font-size: 9px; }
.paper-sheet mark { padding: 1px 4px; border-radius: 3px; background: #ffe9a8; color: #7c5700; }
.paper-warning { margin: -5px -7px; padding: 7px 7px 7px 11px !important; border: 1px dashed #d89c18; border-radius: 5px; background: #fff9e7; }
.paper-signature { position: absolute; right: 30px; bottom: 28px; display: flex; flex-direction: column; align-items: center; min-width: 145px; font-size: 9px; }
.paper-signature i { width: 120px; height: 25px; margin-bottom: 2px; border-bottom: 1px solid #38414c; transform: skew(-18deg); }
.paper-signature span { margin-top: 2px; color: #656d77; }
.image-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 13px 17px; border-top: 1px solid #e8f0f6; }
.image-details span { min-width: 0; }
.image-details small,
.source-grid small { display: block; margin-bottom: 3px; color: #8491a0; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.image-details strong,
.source-grid strong { display: block; overflow: hidden; color: #33475d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.completion-chip,
.required-chip,
.confidence-summary { padding: 6px 9px; border-radius: 7px; background: #eef5fa; color: #526b84; font-size: 10px; font-weight: 700; white-space: nowrap; }
.required-chip { background: #fff0f0; color: #b13c3c; }
.confidence-summary b { color: #087e99; }
.quality-list { padding: 4px 0; }
.quality-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; min-height: 55px; padding: 9px 17px; border-bottom: 1px solid #edf2f6; }
.quality-row:last-child { border-bottom: 0; }
.quality-row.warning { background: #fffaf0; }
.quality-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; font-size: 12px; font-weight: 900; }
.quality-icon.ok { background: #e6f8ef; color: #087448; }
.quality-icon.warn { background: #fff0cf; color: #a46c00; }
.quality-row strong { display: block; color: #2c4056; font-size: 12px; }
.quality-row small { display: block; margin-top: 2px; color: #768596; font-size: 10px; }
.quality-row > b { color: #087448; font-size: 8px; letter-spacing: .07em; }
.quality-row.warning > b { color: #a46c00; }

.source-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #e8f0f6; }
.source-grid > span { padding: 12px 17px; background: #fff; }
.audit-timeline { padding: 16px 17px 17px; }
.audit-timeline > div { position: relative; display: grid; grid-template-columns: 14px 1fr; gap: 9px; padding-bottom: 15px; }
.audit-timeline > div:last-child { padding-bottom: 0; }
.audit-timeline > div::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: -1px; width: 1px; background: #d7e2e9; }
.audit-timeline > div:last-child::before { display: none; }
.audit-timeline i { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 3px; border: 3px solid #fff; border-radius: 50%; background: #9aabba; box-shadow: 0 0 0 1px #cbd8e1; }
.audit-timeline .current i { background: #00bede; box-shadow: 0 0 0 1px #00bede; }
.audit-timeline span { display: grid; grid-template-columns: 43px 1fr; column-gap: 7px; }
.audit-timeline b { color: #788797; font-size: 10px; }
.audit-timeline strong { color: #2e4359; font-size: 11px; }
.audit-timeline small { grid-column: 2; margin-top: 2px; color: #748394; font-size: 10px; }

.review-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 17px; }
.review-field,
.item-fields label,
.critical-decision,
.review-notes { display: block; }
.review-field > span,
.item-fields label > span,
.critical-decision > span,
.review-notes > span { display: block; margin-bottom: 6px; color: #56687a; font-size: 11px; font-weight: 700; }
.review-field input,
.review-field select,
.item-fields input,
.critical-decision select,
.review-notes textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #cfdce6; border-radius: 8px; outline: 0; background: #fff; color: #21364c; font-size: 13px; }
.review-field input:focus,
.review-field select:focus,
.item-fields input:focus,
.critical-decision select:focus,
.review-notes textarea:focus { border-color: #00bede; box-shadow: 0 0 0 3px rgba(0,190,222,.11); }
.span-2 { grid-column: span 2; }
.field-guidance { display: flex; align-items: flex-start; gap: 8px; margin: 0 17px 17px; padding: 10px 12px; border-radius: 8px; background: #f2f7fa; color: #617386; font-size: 11px; line-height: 1.45; }
.field-guidance span { display: grid; flex: 0 0 auto; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #567b9d; color: #fff; font-size: 10px; font-weight: 800; }

.extracted-items-card { overflow: visible; }
.review-item { padding: 14px 17px 16px; border-bottom: 1px solid #e8f0f6; }
.review-item:last-child { border-bottom: 0; }
.review-item.critical { margin: 8px; padding: 14px 12px 15px; border: 1px solid #edcf80; border-radius: 9px; background: #fffbf0; }
.review-item-title { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; margin-bottom: 12px; }
.review-item-title > span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; background: #153e70; color: #fff; font-size: 11px; font-weight: 800; }
.review-item-title > strong { color: #243a51; font-size: 13px; }
.item-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.item-fields .span-2 { grid-column: span 2; }
.needs-review input { border-color: #e4ae2f; background: #fff9e8; color: #795500; font-weight: 800; }
.critical-message { display: flex; align-items: center; gap: 8px; margin: -2px 0 12px; padding: 8px 10px; border-radius: 7px; background: #ffefc5; color: #795500; }
.critical-message > span { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: #d69200; color: #fff; font-size: 11px; font-weight: 900; }
.critical-message p { margin: 0; font-size: 10px; }
.critical-decision { margin-top: 12px; }
.critical-decision select { border-color: #ddaa36; background: #fffdf8; }
.review-notes { padding: 17px 17px 7px; }
.review-notes textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.private-note { margin: 0 17px 17px; color: #7d8996; font-size: 10px; }

.approval-card { border-color: #bed7e5; }
.approval-intro { margin: 0; padding: 14px 17px; color: #5c6f82; font-size: 12px; }
.approval-checks { display: grid; gap: 7px; padding: 0 17px 16px; }
.approval-checks label { display: flex; align-items: flex-start; gap: 11px; min-height: 58px; padding: 11px 12px; border: 1px solid #dce6ee; border-radius: 9px; background: #fbfcfd; cursor: pointer; }
.approval-checks label:hover { border-color: #b7cedc; background: #f7fbfd; }
.approval-checks input { flex: 0 0 auto; width: 19px; height: 19px; margin: 1px 0 0; accent-color: #0f6e90; }
.approval-checks b { display: block; color: #2a4057; font-size: 12px; }
.approval-checks small { display: block; margin-top: 3px; color: #748394; font-size: 10px; line-height: 1.4; }
.approval-summary { display: flex; flex-direction: column; margin: 0 17px 15px; padding: 13px 14px; border: 1px solid #cce2ed; border-radius: 9px; background: #f1f9fc; }
.approval-summary > span { color: #448099; font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.approval-summary strong { margin: 4px 0 2px; color: #153e70; font-size: 12px; }
.approval-summary small { color: #647a8e; font-size: 10px; }
.review-actions { display: grid; grid-template-columns: auto auto 1fr; gap: 9px; padding: 0 17px; }
.review-actions button { min-height: 44px; }
.danger-button { padding: 0 15px; border: 1px solid #edc2c2; border-radius: 8px; background: #fff5f5; color: #ae3f3f; font-size: 12px; font-weight: 800; cursor: pointer; }
.danger-button:hover { border-color: #dc9e9e; background: #ffeded; }
.primary-button:disabled { border-color: #cad7df; background: #dce5ea; color: #8796a3; cursor: not-allowed; }
.approval-owner { margin: 10px 17px 16px; text-align: right; color: #738291; font-size: 10px; }
.approval-owner strong { color: #43576b; }

/* Abas comerciais no padrão de trabalho do sistema de farmácia. */
.margin-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 18px; }
.margin-summary-grid article { padding: 16px 17px; border: 1px solid #dce6ee; border-radius: 11px; background: #fff; box-shadow: 0 1px 2px rgba(18,36,58,.04); }
.margin-summary-grid small { display: block; color: #7a8997; font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.margin-summary-grid strong { display: block; margin: 6px 0 2px; color: #20364d; font-size: 25px; }
.margin-summary-grid span { color: #718192; font-size: 10px; }
.margin-summary-grid .profit strong { color: #087448; }
.margin-summary-grid .highlight { border-color: #9dd9e8; background: #f0fbfe; }
.margin-summary-grid .highlight strong { color: #087e99; }
.margin-table-wrap { overflow-x: auto; }
.margin-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.margin-table th { padding: 11px 13px; border-bottom: 1px solid #dce6ee; background: #f6f9fb; color: #718191; font-size: 9px; text-align: right; letter-spacing: .055em; }
.margin-table th:first-child,
.margin-table td:first-child { text-align: left; }
.margin-table td { padding: 13px; border-bottom: 1px solid #e8f0f6; color: #526478; font-size: 12px; text-align: right; }
.margin-table td strong,
.margin-table td small { display: block; }
.margin-table td strong { color: #2a4057; font-size: 12px; }
.margin-table td small { margin-top: 3px; color: #83909d; font-size: 9px; }
.margin-table td.positive { color: #087448; font-weight: 800; }
.margin-table tr.attention-row { background: #fffdf6; }
.margin-table tfoot td { border: 0; background: #153e70; color: #fff; font-size: 11px; font-weight: 800; }
.margin-pill { display: inline-flex; min-height: 25px; align-items: center; padding: 0 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.margin-pill.healthy { background: #e5f8ee; color: #087448; }
.margin-pill.attention { background: #fff0cd; color: #996400; }
.margin-legend { display: flex; gap: 12px; color: #748394; font-size: 9px; }
.margin-legend span { display: flex; align-items: center; gap: 5px; }
.margin-legend i { width: 7px; height: 7px; border-radius: 50%; }
.margin-legend i.healthy { background: #22a66e; }
.margin-legend i.attention { background: #e1a323; }
.margin-bottom-grid,
.cost-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.policy-list { display: grid; grid-template-columns: repeat(3, 1fr); padding: 17px; }
.policy-list span { padding: 3px 14px; border-right: 1px solid #e1e9ef; }
.policy-list span:last-child { border: 0; }
.policy-list small { display: block; min-height: 28px; color: #758493; font-size: 10px; }
.policy-list strong { display: block; color: #263c53; font-size: 18px; }
.calculation-note { margin: 0 17px 17px; padding: 9px 11px; border-radius: 7px; background: #f4f7f9; color: #7b8895; font-size: 9px; }
.discount-simulator { display: block; padding: 18px 17px 12px; color: #56687a; font-size: 11px; font-weight: 700; }
.discount-simulator > div { display: grid; grid-template-columns: 1fr 50px; align-items: center; gap: 12px; margin-top: 14px; }
.discount-simulator input { width: 100%; accent-color: #0e90ac; }
.discount-simulator b { display: grid; place-items: center; min-height: 34px; border-radius: 7px; background: #edf5f8; color: #153e70; }
.discount-result { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0 17px 17px; overflow: hidden; border: 1px solid #dbe6ed; border-radius: 8px; background: #dbe6ed; }
.discount-result span { padding: 11px; background: #f9fbfc; }
.discount-result small { display: block; color: #7c8996; font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.discount-result strong { display: block; margin-top: 3px; color: #173a68; font-size: 16px; }

.cost-breakdown { padding: 8px 17px 17px; }
.cost-breakdown > div { display: grid; grid-template-columns: 1fr auto 95px; align-items: center; gap: 12px; min-height: 58px; border-bottom: 1px solid #e8f0f6; }
.cost-breakdown > div > span { display: flex; align-items: center; gap: 9px; color: #33495f; font-size: 12px; font-weight: 700; }
.cost-breakdown i { width: 9px; height: 30px; border-radius: 4px; background: #153e70; }
.cost-breakdown i.packaging { background: #00bede; }
.cost-breakdown i.operation { background: #8aa2b5; }
.cost-breakdown b { color: #243a51; font-size: 13px; }
.cost-breakdown small { color: #7d8996; font-size: 9px; text-align: right; }
.cost-breakdown > div.total { grid-template-columns: 1fr auto; min-height: 64px; border: 0; }
.cost-breakdown > div.total span { color: #173a68; font-size: 13px; font-weight: 800; }
.cost-breakdown > div.total b { color: #173a68; font-size: 20px; }
.price-warning { display: flex; align-items: center; gap: 9px; margin: 0 17px 17px; padding: 10px 12px; border-radius: 8px; background: #fff6df; color: #745100; }
.price-warning span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #d99c16; color: #fff; font-weight: 900; }
.price-warning p { margin: 0; font-size: 10px; }

.full-history-card { max-width: 1020px; margin: 0 auto; }
.history-list { padding: 22px 25px 28px; }
.history-entry { position: relative; display: grid; grid-template-columns: 66px 18px 1fr; gap: 13px; min-height: 88px; }
.history-entry::before { content: ""; position: absolute; left: 75px; top: 20px; bottom: -1px; width: 1px; background: #d5e1e9; }
.history-entry:last-child::before { display: none; }
.history-entry time { color: #7e8b98; font-size: 9px; line-height: 1.45; text-align: right; }
.history-entry time b { color: #40556a; font-size: 12px; }
.history-entry > i { position: relative; z-index: 1; width: 13px; height: 13px; margin: 4px 0 0 1px; border: 3px solid #fff; border-radius: 50%; background: #8ca1b2; box-shadow: 0 0 0 1px #c2d2dc; }
.history-entry.current > i { background: #00bede; box-shadow: 0 0 0 1px #00aaca; }
.history-entry span strong { color: #294057; font-size: 13px; }
.history-entry span p { margin: 4px 0; color: #647588; font-size: 11px; }
.history-entry span small { color: #8995a1; font-size: 9px; }

@media (max-width: 1400px) {
  .review-layout { grid-template-columns: minmax(350px, .72fr) minmax(560px, 1.28fr); }
  .review-tabs button { padding: 0 15px; }
  .item-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-fields .span-2 { grid-column: span 2; }
  .margin-summary-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1120px) {
  .review-layout,
  .cost-layout,
  .margin-bottom-grid { grid-template-columns: 1fr; }
  .review-toolbar { grid-template-columns: auto 1fr; }
  .review-status { grid-column: 1 / -1; justify-self: start; }
}
.logout-button { width: 100%; margin-top: 6px; border: 1px solid var(--border-soft); background: transparent; color: var(--muted); border-radius: 9px; padding: 8px; font-size: 10px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.logout-button:hover { color: var(--text); border-color: var(--border); background: #111519; }
