@import "./ui-crm-workspace-companion0911-r5.css";
/* Shared sales-console layout. Scoped so embedded tools retain their own controls. */
/* The insight card uses a complete light palette, including its text and nested surfaces. */
.sales-cockpit-card { color:#1e293b; }
.sales-cockpit-card p { margin:0; font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.sales-cockpit-heading { display:flex; align-items:flex-start; flex-wrap:wrap; gap:8px 12px; margin-bottom:12px; }
.sales-cockpit-heading-copy { flex:1; min-width:180px; }
.sales-cockpit-heading h3 { display:flex; align-items:center; gap:6px; margin:0 0 4px; color:#17233f; font-size:15px; line-height:1.5; }
.sales-cockpit-heading h3 .anticon { color:#1d4ed8; }
.sales-cockpit-heading>.ant-tag { margin:0; flex-shrink:0; }
.sales-cockpit-card .sales-cockpit-muted,.sales-cockpit-label { color:#475569; font-size:12px; line-height:1.6; }
.sales-cockpit-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
.sales-cockpit-stats>div { padding:10px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; min-width:0; }
.sales-cockpit-stats strong { display:block; margin-top:4px; color:#17233f; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.sales-cockpit-strategy { padding:10px 12px; background:#eff6ff; border:1px solid #dbeafe; border-radius:8px; margin-bottom:12px; }
.sales-cockpit-card h4 { margin:0 0 5px; font-size:13px; line-height:1.6; color:#1e3a8a; }
.sales-cockpit-strategy p,.sales-cockpit-script { color:#1e293b; }
.sales-cockpit-followup { display:flex; flex-direction:column; gap:8px; }
.sales-cockpit-followup h4 { margin:0; color:#1e293b; }
.sales-cockpit-followup-title { display:flex; align-items:flex-start; gap:6px; }
.sales-cockpit-followup-title>.anticon { flex-shrink:0; color:#b45309; margin-top:4px; }
.sales-cockpit-followup-title>span:last-child { min-width:0; overflow-wrap:anywhere; }
.sales-cockpit-card .sales-cockpit-timing { padding:7px 10px; border:1px solid #fed7aa; border-radius:6px; color:#92400e; background:#fff7ed; font-size:12px; white-space:normal; }
.sales-cockpit-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.sales-cockpit-actions>.ant-btn { min-width:28px; height:28px; }
.sales-cockpit-reasons { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.sales-cockpit-reasons .ant-tag { margin:0; padding:3px 7px; max-width:100%; white-space:normal; overflow-wrap:anywhere; color:#475569; background:#f8fafc; border-color:#e2e8f0; font-size:12px; line-height:1.6; }
html[data-ui-template="service-v1"] .sales-page-shell .sales-agent-panel-content .ant-tag.ant-tag-warning,html[data-ui-template="service-v1"] .sales-page-shell .sales-agent-panel-content .ant-tag.ant-tag-gold { color:#92400e; background:#fffbeb; border-color:#fde68a; }
html[data-ui-template="service-v1"] .sales-page-shell .sales-agent-panel-content .ant-tag.ant-tag-orange { color:#9a3412; background:#fff7ed; border-color:#fed7aa; }
html[data-ui-template="service-v1"] .sales-page-shell .sales-agent-panel-content .ant-tag.ant-tag-green,html[data-ui-template="service-v1"] .sales-page-shell .sales-agent-panel-content .ant-tag.ant-tag-success { color:#166534; background:#f0fdf4; border-color:#bbf7d0; }
html[data-ui-template="service-v1"] .sales-page-shell .sales-agent-panel-content .ant-tag.ant-tag-cyan { color:#115e59; background:#f0fdfa; border-color:#99f6e4; }
.dashboard-stage-row { display:grid; grid-template-columns:80px minmax(0,1fr) 60px; gap:12px; align-items:center; padding:9px 0; }
.dashboard-stage-name { color:#475569; font-size:13px; }
.dashboard-stage-track { height:20px; background:#edf2f7; border-radius:5px; overflow:hidden; }
.dashboard-stage-bar { height:100%; border-radius:5px; }
.dashboard-stage-count { text-align:right; white-space:nowrap; color:#1e293b; font-size:13px; font-variant-numeric:tabular-nums; }
html[data-ui-template="service-v1"] .cg-glow-text { text-shadow:none !important; }
html[data-ui-template="service-v1"] .cg-neon-glow { box-shadow:none !important; background:#edf4ff !important; border-color:#dbeafe !important; }
html[data-ui-template="service-v1"] .app-sidebar .ant-menu-item-selected .ant-menu-title-content { background:transparent !important; }
html[data-ui-template="service-v1"] .contact-alert-pulse { animation:none !important; box-shadow:none !important; border-color:#e2e8f0 !important; }
@media (max-width:767px) {
  .dashboard-page > div { padding:16px !important; }
  .dashboard-page .dashboard-kpi-column { flex-basis:calc(50% - 12px) !important; max-width:50% !important; }
  .dashboard-stage-row { grid-template-columns:70px minmax(0,1fr) 48px; gap:8px; }
}
.sales-page-shell { display: grid !important; grid-template-columns: 176px 280px minmax(320px, 1fr); grid-template-rows: 46px minmax(0, 1fr); overflow: hidden; min-width: 0; }
.sales-page-shell[data-agent-open="true"] { grid-template-columns: 176px 280px minmax(320px, 1fr) 340px; }
.sales-view-toolbar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; border-bottom: 1px solid #e2e8f0; background: white; }
.sales-view-tabs { display: flex; gap: 6px; }
.sales-staff-column, .sales-contacts-column, .sales-chat-column { min-width: 0; min-height: 0; overflow: hidden; height: 100%; }
.sales-chat-column > div { height: 100%; min-width: 0; }
.sales-page-shell .sales-agent-panel { width: 100% !important; min-width: 0; height: 100%; }
.sales-page-shell .sales-agent-panel > div { min-width: 0; }
@media (max-width: 1559px) {
  .sales-page-shell, .sales-page-shell[data-agent-open="true"] { grid-template-columns: 176px 260px minmax(320px, 1fr); }
  .sales-page-shell .sales-agent-panel { position: absolute; right: 0; top: 46px; bottom: 0; z-index: 30; width: min(400px, 100%) !important; height: calc(100% - 46px); box-shadow: -10px 0 30px #0f172a20; }
}
@media (max-width: 1359px) {
  .sales-page-shell, .sales-page-shell[data-agent-open="true"] { grid-template-columns: 260px minmax(320px, 1fr); }
  .sales-staff-column { display: none; }
  .sales-page-shell[data-pane="staff"] .sales-staff-column { display: block; position: absolute; top: 46px; left: 0; bottom: 0; width: 240px; z-index: 25; height: calc(100% - 46px); box-shadow: 10px 0 30px #0f172a20; background: white; }
}
@media (max-width: 767px) {
  .sales-page-shell, .sales-page-shell[data-agent-open="true"] { grid-template-columns: minmax(0, 1fr); }
  .sales-page-shell .sales-staff-column, .sales-page-shell .sales-contacts-column, .sales-page-shell .sales-chat-column { display: none; }
  .sales-page-shell[data-pane="contacts"] .sales-contacts-column, .sales-page-shell[data-pane="chat"] .sales-chat-column, .sales-page-shell[data-pane="staff"] .sales-staff-column { display: block; position: static; width: 100%; box-shadow: none; height: 100%; }
  .sales-view-toolbar { padding-inline: 10px; gap: 6px; }
}
html[data-ui-template="service-v1"] body {
  background: #f5f7fb !important;
  font-weight: 400;
}
html[data-ui-template="service-v1"] .app-shell {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
html[data-ui-template="service-v1"] .app-workspace {
  min-width: 0;
  min-height: 0;
}
html[data-ui-template="service-v1"] .app-content {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
html[data-ui-template="service-v1"] .app-sidebar {
  inset: 0 auto 0 0;
  z-index: 100;
  overflow: auto;
  box-shadow: none !important;
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid #ffffff14;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.app-brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  height: 32px;
  border-radius: 9px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
}
.app-brand-copy {
  display: grid;
  gap: 3px;
  white-space: nowrap;
}
.app-brand-copy strong {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 600;
}
.app-brand-copy small {
  color: #bac8e0;
  font-size: 11px;
}
.app-sidebar.ant-layout-sider-collapsed .app-brand {
  padding-inline: 16px;
}
html[data-ui-template="service-v1"] .app-sidebar .ant-menu-item,
html[data-ui-template="service-v1"] .app-sidebar .ant-menu-submenu-title {
  width: calc(100% - 16px) !important;
  margin-inline: 8px !important;
  font-weight: 500;
  font-size: 13px;
}
html[data-ui-template="service-v1"] .app-sidebar .ant-menu-item-selected {
  box-shadow: none !important;
  background: #2563eb !important;
}
html[data-ui-template="service-v1"] .app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
  flex: 0 0 64px;
  line-height: 1.4;
  box-shadow: none !important;
}
.app-header-location {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.app-page-title {
  color: #1e293b;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-account {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #475569;
  font: inherit;
  cursor: pointer;
}
.app-account > span:last-child {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: #0f172a66;
  border: 0;
  cursor: pointer;
}
html[data-ui-template="service-v1"] .ant-card,
html[data-ui-template="service-v1"] .ant-table {
  box-shadow: none !important;
  border-color: #e2e8f0 !important;
}
html[data-ui-template="service-v1"] .ant-modal-content,
html[data-ui-template="service-v1"] .ant-drawer-content,
html[data-ui-template="service-v1"] .ant-popover-inner,
html[data-ui-template="service-v1"] .ant-dropdown-menu {
  box-shadow: 0 12px 32px #0f172a18 !important;
}
html[data-ui-template="service-v1"] .ant-card-head {
  border-bottom-color: #edf1f6;
}
html[data-ui-template="service-v1"] .ant-btn-primary {
  color: #fff !important;
  box-shadow: none !important;
}
html[data-ui-template="service-v1"] .ant-btn-primary:disabled {
  color: #64748b !important;
  background: #e2e8f0 !important;
  border-color: #e2e8f0 !important;
}
html[data-ui-template="service-v1"] .ant-typography-secondary {
  color: #64748b;
}
html[data-ui-template="service-v1"]
  .app-content
  [style*="color: rgb(185, 202, 203)"],
html[data-ui-template="service-v1"]
  .app-content
  [style*="color: rgb(132, 148, 149)"] {
  color: #64748b !important;
}
html[data-ui-template="service-v1"]
  .app-content
  [style*="color: rgb(0, 240, 255)"],
html[data-ui-template="service-v1"]
  .app-content
  [style*="color: rgb(168, 238, 0)"] {
  color: #2563eb !important;
}
html[data-ui-template="service-v1"] .cg-corner::before,
html[data-ui-template="service-v1"] .cg-corner::after {
  display: none !important;
}
html[data-ui-template="service-v1"] .ant-table-cell {
  font-variant-numeric: tabular-nums;
}
html[data-ui-template="service-v1"] .app-content h1,
html[data-ui-template="service-v1"] .app-content h2,
html[data-ui-template="service-v1"] .app-content h3,
html[data-ui-template="service-v1"] .app-content h4 {
  color: #17233f;
  letter-spacing: -0.02em;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 3px;
}
.ui-inline-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-block: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  color: #9a3412;
}
.ui-inline-error button {
  border: 1px solid #fdba74;
  color: #9a3412;
  background: white;
  border-radius: 7px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.ui-muted-note {
  color: #64748b;
  font-size: 12px;
  line-height: 1.7;
}
@media (max-width: 767px) {
  html[data-ui-template="service-v1"] .app-header {
    padding-inline: 12px;
    gap: 8px;
    height: 56px !important;
    flex-basis: 56px;
  }
  .app-account > span:last-child {
    display: none;
  }
  .app-header-location {
    gap: 5px;
  }
  .app-page-title {
    font-size: 14px;
  }
  .app-content > div:not(.sales-page-shell):not(.opc-native-page) {
    max-width: 100%;
  }
  .ui-inline-error {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .ant-modal {
    max-width: calc(100vw - 24px);
    margin-inline: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.ui-data-explainer,.dashboard-secondary { padding:12px 16px; margin-bottom:16px; border:1px solid #e2e8f0; border-radius:10px; background:#f8fafc; color:#475569; font-size:13px; line-height:1.7; }
details>summary { cursor:pointer; font-weight:500; }
details>p { margin:8px 0 0; }
.dashboard-secondary[open]>summary { margin-bottom:12px; }
.ui-secondary-button { border:1px solid #cbd5e1; border-radius:8px; background:white; padding:8px 12px; color:#1d4ed8; cursor:pointer; }
.crm-tag-conflict { font-size:12px; line-height:1.6; color:#92400e; }
.crm-tag-conflict p { max-width:260px; }
.brain-page-layout { flex-direction:column; min-width:0; }
.brain-page-layout>div:first-child { width:100%!important; display:flex; align-items:center; flex-wrap:wrap; padding:8px 16px!important; border-bottom:1px solid #e2e8f0; }
.brain-page-layout>div:first-child>div:first-child { display:none; }
.brain-page-layout>div:nth-child(2) { min-width:0; }
.brain-page-layout>div:nth-child(2)>div:first-child { gap:12px; flex-wrap:wrap; }
.brain-summary-card { height:100%; display:flex; flex-direction:column; }
.brain-summary-card .ant-card-body { flex:1; }
.brain-summary-card .ant-card-actions { margin-top:auto; }
.brain-summary-description { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; min-height:54px; max-height:54px; line-height:18px; }
.brain-create-options { display:grid; gap:12px; padding-block:8px; }
.brain-create-options p { color:#64748b; margin:0; font-size:13px; }
.followup-reason { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.sales-sync-status { flex-wrap:wrap; }
.sales-sync-details { order:5; width:100%; font-size:11px; line-height:1.6; }
.sales-sync-details[open] { padding:8px; background:white; color:#475569; }
.sales-sync-details[open] [style*='color:'] { color:#475569!important; }
.material-template-preview { height:144px; position:relative; overflow:hidden; border-radius:8px; display:flex; flex-direction:column; justify-content:center; padding:14px; margin-bottom:10px; color:#eee0b4; background:#162b45; }
.material-template-preview strong { font-family:Georgia,'Songti SC',serif; font-size:22px; line-height:1.4; white-space:pre-line; z-index:1; }
.material-template-preview small { position:absolute; bottom:8px; left:10px; font-size:9px; letter-spacing:.1em; color:inherit; opacity:.8; }
.material-template-preview .template-art { position:absolute; font-size:100px; opacity:.3; right:-8px; bottom:-22px; }
.template-0 { border:8px solid #162b45; outline:1px solid #d6b873; outline-offset:-12px; }
.template-1 { background:linear-gradient(145deg,#e2ead5 0 50%,#889d77 51% 65%,#617e5d 66%); color:#203b29; }
.template-1 strong { font-size:18px; align-self:flex-start; max-width:65%; }
.template-2 { background:#f7efdf; color:#57412a; align-items:center; text-align:center; }
.template-3 { background:linear-gradient(115deg,#19324e 0 67%,#cbab6a 68%); }
.template-3 strong { font-size:19px; }
.template-4 { background:#e9d1c1; color:#663f2f; }
.template-4 .template-art { opacity:1; font-size:120px; right:10px; bottom:10px; color:#7e5545; }
.template-4 strong { font-size:16px; z-index:1; }
.template-5 { background:#f1f5f9; color:#475569; border:1px dashed #94a3b8; }
.template-5 strong { font-size:18px; }
.app-content>div>h1,.app-content>div>h2,.app-content>div>h3,.app-content>div>h4 { font-size:22px!important; font-weight:600!important; margin-top:0; }
.app-content .ant-space { max-width:100%; }
@media(max-width:767px) {
  .app-content>div[style*='padding: 24px'] { padding:16px!important; }
  .brain-page-layout>div:nth-child(2) { padding:16px!important; }
  .brain-page-layout .ant-space { flex-wrap:wrap; }
  .sales-chat-column .ant-space { flex-wrap:wrap; }
  .sales-chat-column [style*='max-width: 65%'] { max-width:85%!important; }
  .sales-chat-column [style*='padding: 10px 20px 14px'] { padding:10px!important; }
  .ui-inline-error { flex-wrap:wrap; }
}
.sales-grade-legend{font-size:11px;color:#64748b;line-height:1.6;margin-top:6px}.sales-grade-legend p{margin:6px 0}
.sales-ai-tools{display:flex;gap:8px;align-items:center}.sales-inline-draft-tools{position:static!important;display:flex!important;flex-direction:row!important;z-index:auto!important;gap:4px!important}.sales-inline-draft-tools>div{display:none}.sales-inline-draft-tools .ant-btn-circle{width:auto!important;height:26px!important;min-width:26px!important;border-radius:7px!important;padding:0 8px!important;box-shadow:none!important}
@media(max-width:767px){.sales-ai-tools{gap:4px}.sales-view-tabs{gap:2px}.sales-view-toolbar .ant-btn{font-size:12px;padding-inline:6px}}

.ui-notification-trigger{border:0;background:transparent;color:#475569;padding:8px;cursor:pointer;border-radius:8px}.ui-notification-trigger:focus-visible{outline:3px solid #93c5fd}.token-usage-page>.ant-space{flex-wrap:wrap}.sales-inline-draft-tools .ant-btn{width:auto!important;height:30px!important;background:white!important;color:#334155!important;border:1px solid #cbd5e1!important;box-shadow:none!important;padding:4px 10px!important;border-radius:7px!important}.ui-data-error{padding:32px;color:#475569}.ui-data-error button{padding:8px 16px;background:#2563eb;color:#fff;border:0;border-radius:8px;cursor:pointer}

html[data-ui-template="service-v1"] .app-sidebar{overflow:hidden!important}.app-sidebar .ant-layout-sider-children{display:flex;flex-direction:column;height:100%;overflow:hidden}.app-sidebar .app-brand{flex-shrink:0}.app-sidebar nav{flex:1;min-height:0;overflow-y:auto;padding-bottom:12px;scrollbar-width:thin}

.sales-inline-draft-tools>div{display:none!important}.sales-view-tabs,.sales-ai-tools{flex-shrink:0}.sales-conversation-header>div:first-child{min-width:100px}.sales-conversation-header>div:first-child .ant-typography{white-space:nowrap}
@media(max-width:767px){.sales-view-toolbar{gap:6px}.sales-conversation-header{padding:8px 12px!important;flex-wrap:wrap;gap:6px}.sales-conversation-header>div:first-child{flex:1;min-width:110px}.sales-conversation-header>.ant-space{flex-wrap:wrap}.sales-conversation-header>div:first-child .ant-typography{max-width:220px;overflow:hidden;text-overflow:ellipsis;display:block}.sales-composer-actions{flex-direction:column;align-items:stretch!important;gap:6px;padding:6px 8px!important}.sales-composer-actions>div:first-child{white-space:nowrap;flex-wrap:wrap}.sales-composer-actions>.ant-space{display:flex;justify-content:flex-start;flex-wrap:wrap}.sales-composer-actions .ant-btn{font-size:12px!important;padding-inline:7px!important}.sales-inline-draft-tools .ant-btn{padding-inline:7px!important}}

html[data-ui-template="service-v1"] .sales-page-shell .sales-agent-panel-content .ant-tag.ant-tag-error,html[data-ui-template="service-v1"] .sales-page-shell .sales-agent-panel-content .ant-tag.ant-tag-red { color:#991b1b; background:#fef2f2; border-color:#fecaca; }
html[data-ui-template="service-v1"] .sales-page-shell .sales-agent-panel-content .ant-tag.ant-tag-purple { color:#6b21a8; background:#faf5ff; border-color:#e9d5ff; }
html[data-ui-template="service-v1"] .sales-page-shell .sales-agent-panel-content .ant-tag.ant-tag-magenta { color:#9d174d; background:#fdf2f8; border-color:#fbcfe8; }
html[data-ui-template="service-v1"] .sales-page-shell .sales-agent-panel-content .ant-tag.ant-tag-default { color:#475569; background:#f8fafc; border-color:#e2e8f0; }
.sales-page-shell .sales-agent-panel-content .ant-btn-primary { color:#fff!important; background:#1d4ed8!important; border-color:#1d4ed8!important; }
.sales-page-shell .sales-agent-panel-content .ant-btn-primary:hover { background:#1e40af!important; border-color:#1e40af!important; }
