:root{--brand-orange: #FF6600;--brand-orange-light: #FFEEDD;--bg: #F7F7F8;--surface: #FFFFFF;--text: #2B2B2B;--text-muted: #767676;--border: #E5E5E5;--success: #3DAA4E;--danger: #D64545;--banner-error-bg: #FDECEC;--channel-telegram-bg: #D6EFFF;--channel-telegram-text: #0088CC}:root[data-theme=dark]{--brand-orange: #FF6600;--brand-orange-light: #402A18;--bg: #15171A;--surface: #1E2124;--text: #EDEDED;--text-muted: #9A9A9A;--border: #33373C;--success: #4CC26A;--danger: #FF6B6B;--banner-error-bg: #402424;--channel-telegram-bg: #133247;--channel-telegram-text: #5AC8FA}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}.app-shell{display:flex;min-height:100vh}.sidebar{width:220px;background:var(--surface);border-right:1px solid var(--border);padding:16px 0;display:flex;flex-direction:column}.sidebar-logo{font-weight:700;font-size:20px;color:var(--brand-orange);padding:0 20px 20px}.sidebar-link{display:block;padding:10px 20px;color:var(--text);text-decoration:none;font-size:14px}.sidebar-link.active,.sidebar-link:hover{background:var(--brand-orange-light);color:var(--brand-orange);font-weight:600}.main-content{flex:1;padding:24px;overflow-x:auto}.btn-primary{background:var(--brand-orange);color:#fff;border:none;padding:8px 16px;border-radius:6px;cursor:pointer;font-size:14px}.btn-primary:hover{background:#e65c00}.card{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:12px}.banner-error{background:var(--banner-error-bg);color:var(--danger);padding:8px 12px;border-radius:6px;margin-bottom:12px}.department-tabs{display:flex;gap:8px;margin-bottom:16px}.department-tab{background:var(--surface);border:1px solid var(--border);padding:8px 16px;border-radius:6px;cursor:pointer;font-size:14px}.department-tab.active{background:var(--brand-orange);color:#fff;border-color:var(--brand-orange)}.kanban-board{display:flex;gap:12px;overflow-x:auto}.kanban-column{min-width:240px;background:var(--surface);border-radius:8px;padding:8px}.kanban-column.drag-over{background:var(--brand-orange-light)}.kanban-column-header{font-weight:600;padding:6px 4px;display:flex;justify-content:space-between}.kanban-column-count{color:var(--text-muted)}.kanban-column-body{display:flex;flex-direction:column;gap:8px;min-height:40px}.deal-card{cursor:grab}.deal-card-title{font-weight:600;font-size:13px}.deal-card-amount{color:var(--brand-orange);font-weight:600;margin:4px 0}.deal-card-contact{color:var(--text-muted);font-size:12px}.contacts-layout{display:flex;gap:16px}.contacts-list{width:260px;flex-shrink:0}.contacts-list-item{padding:10px;border-bottom:1px solid var(--border);cursor:pointer}.contacts-list-item.active{background:var(--brand-orange-light)}.contacts-list-name{font-weight:600}.contacts-list-company{color:var(--text-muted);font-size:12px}.contacts-detail{flex:1}.custom-field-row{display:flex;flex-direction:column;gap:4px;margin-bottom:10px;max-width:320px}.custom-field-row label{font-size:12px;color:var(--text-muted)}.product-filters{display:flex;gap:8px;margin-bottom:16px}.product-filters button{background:var(--surface);border:1px solid var(--border);padding:6px 14px;border-radius:6px;cursor:pointer}.product-filters button.active{background:var(--brand-orange);color:#fff;border-color:var(--brand-orange)}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}.product-card-image{width:100%;border-radius:6px;margin-bottom:8px}.product-card-brand{color:var(--brand-orange);font-size:12px;font-weight:600;text-transform:uppercase}.product-card-name{font-weight:600;margin:4px 0}.product-card-price{color:var(--text);font-weight:700;margin-bottom:6px}.product-card-description{color:var(--text-muted);font-size:13px}.chats-layout{display:flex;gap:16px;height:calc(100vh - 96px)}.conversation-list{width:280px;flex-shrink:0;overflow-y:auto}.conversation-list-item{padding:10px;border-bottom:1px solid var(--border);cursor:pointer;display:flex;justify-content:space-between;align-items:center}.conversation-list-item.active{background:var(--brand-orange-light)}.channel-badge{font-size:11px;padding:2px 8px;border-radius:10px;background:var(--border)}.channel-telegram{background:var(--channel-telegram-bg);color:var(--channel-telegram-text)}.message-thread{flex:1;display:flex;flex-direction:column}.message-list{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:8px}.message{max-width:60%;padding:8px 12px;border-radius:10px;font-size:14px}.message-client{background:var(--surface);border:1px solid var(--border);align-self:flex-start}.message-manager{background:var(--brand-orange-light);align-self:flex-end}.message-composer{display:flex;gap:8px;padding:8px;border-top:1px solid var(--border)}.message-composer input{flex:1;padding:8px;border:1px solid var(--border);border-radius:6px}.theme-toggle{margin:auto 20px 8px;background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:6px 10px;cursor:pointer;font-size:16px;align-self:flex-start}.theme-toggle:hover{background:var(--brand-orange-light)}.user-switcher{padding:12px 20px;border-top:1px solid var(--border)}.user-switcher select{width:100%;padding:6px;border-radius:6px;border:1px solid var(--border);font-size:12px}.user-switcher-role{font-size:11px;color:var(--text-muted);margin-top:4px}.kb-layout{display:flex;gap:16px}.kb-list{width:300px;flex-shrink:0;display:flex;flex-direction:column;gap:8px}.kb-filters{display:flex;flex-wrap:wrap;gap:6px}.kb-filters button{background:var(--surface);border:1px solid var(--border);padding:4px 10px;border-radius:6px;cursor:pointer;font-size:12px;color:var(--text)}.kb-filters button.active{background:var(--brand-orange);color:#fff;border-color:var(--brand-orange)}.kb-new-button{align-self:flex-start}.kb-list-item{padding:10px;border-bottom:1px solid var(--border);cursor:pointer;border-radius:6px}.kb-list-item.active{background:var(--brand-orange-light)}.kb-list-title{font-weight:600;font-size:14px}.kb-list-category{color:var(--text-muted);font-size:12px}.kb-detail{flex:1}.kb-article-header{display:flex;align-items:center;gap:10px;margin-bottom:8px}.kb-category-badge{font-size:11px;padding:2px 8px;border-radius:10px;background:var(--border);color:var(--text-muted)}.kb-article-body{line-height:1.6}.kb-article-body h1,.kb-article-body h2,.kb-article-body h3{margin-top:16px}.kb-article-body table{border-collapse:collapse;margin:12px 0}.kb-article-body th,.kb-article-body td{border:1px solid var(--border);padding:6px 10px}.kb-article-actions,.kb-editor-actions{display:flex;gap:8px;margin-top:12px}.kb-title-input,.kb-category-input{display:block;width:100%;max-width:480px;padding:8px;margin-bottom:8px;border:1px solid var(--border);border-radius:6px;font-size:14px;background:var(--surface);color:var(--text)}.kb-editor-tabs{display:flex;gap:8px;margin-bottom:8px}.kb-editor-tabs button{background:var(--surface);border:1px solid var(--border);padding:4px 10px;border-radius:6px;cursor:pointer;font-size:12px;color:var(--text)}.kb-editor-tabs button.active{background:var(--brand-orange);color:#fff;border-color:var(--brand-orange)}.kb-editor-textarea{width:100%;min-height:320px;padding:10px;border:1px solid var(--border);border-radius:6px;font-family:ui-monospace,monospace;font-size:13px;background:var(--surface);color:var(--text)}.task-list{display:flex;flex-direction:column;gap:8px;margin-top:8px}.task-list-item{display:flex;align-items:flex-start;gap:8px;padding:8px;border:1px solid var(--border);border-radius:6px}.task-list-item.completed{opacity:.5}.task-list-item-title{font-weight:600;font-size:13px}.task-list-item-meta{color:var(--text-muted);font-size:12px;margin-top:2px}.task-type-badge{font-size:11px;padding:1px 6px;border-radius:8px;background:var(--brand-orange-light);color:var(--brand-orange);margin-right:4px}.task-form{display:flex;flex-direction:column;gap:6px;margin-top:8px;padding:10px;border:1px solid var(--border);border-radius:6px}.task-form input,.task-form select{padding:6px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--text);font-size:13px}.task-form-actions{display:flex;gap:8px}.task-add-button{align-self:flex-start;background:var(--surface);border:1px dashed var(--border);border-radius:6px;padding:6px 12px;cursor:pointer;color:var(--text);font-size:13px;margin-top:8px}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:100}.modal-content{background:var(--surface);border-radius:8px;padding:24px;max-width:600px;width:90%;max-height:85vh;overflow-y:auto;position:relative;color:var(--text)}.modal-close{position:absolute;top:12px;right:12px;background:none;border:none;font-size:18px;cursor:pointer;color:var(--text-muted)}.deal-card{position:relative}.deal-task-dot{position:absolute;top:8px;right:8px;width:8px;height:8px;border-radius:50%}.deal-task-dot-overdue{background:var(--danger)}.deal-task-dot-active{background:var(--success)}.tasks-filters{display:flex;gap:8px;align-items:center;margin-bottom:16px;flex-wrap:wrap}.tasks-filters select{padding:6px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--text)}.tasks-list{display:flex;flex-direction:column;gap:6px}.tasks-list-row{display:flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid var(--border);border-radius:6px;background:var(--surface)}.tasks-list-row.completed{opacity:.5}.tasks-list-title{font-weight:600;font-size:13px;flex:1}.tasks-list-meta{color:var(--text-muted);font-size:12px}.tasks-entity-toggle{display:flex;gap:8px}.tasks-entity-toggle label{display:flex;align-items:center;gap:4px;font-size:13px}.api-docs-page{max-width:1180px}.api-docs-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}.api-docs-header h1{margin:0;font-size:24px}.api-base-url{padding:8px 10px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--text-muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.api-docs-summary{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}.api-docs-summary-link{color:var(--text);text-decoration:none;background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:6px 10px;font-size:13px}.api-docs-summary-link:hover{color:var(--brand-orange);background:var(--brand-orange-light)}.api-docs-sections{display:flex;flex-direction:column;gap:18px}.api-section{display:grid;grid-template-columns:220px minmax(0,1fr);gap:14px;align-items:flex-start}.api-section-heading h2{margin:0 0 6px;font-size:18px}.api-section-heading p{margin:0;color:var(--text-muted);font-size:13px;line-height:1.5}.api-endpoint-list{display:flex;flex-direction:column;gap:10px}.api-endpoint-card{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:12px}.api-endpoint-title{display:flex;align-items:center;gap:8px;min-width:0}.api-endpoint-title code{overflow-wrap:anywhere;font-size:13px;color:var(--text)}.api-endpoint-card p{margin:8px 0;color:var(--text);font-size:13px;line-height:1.45}.api-method{width:54px;flex-shrink:0;text-align:center;border-radius:5px;padding:3px 0;color:#fff;font-size:11px;font-weight:700}.api-method-get{background:#2f80ed}.api-method-post{background:#27ae60}.api-method-patch{background:#9b51e0}.api-method-put{background:#f2994a}.api-method-delete{background:#d64545}.api-endpoint-meta{display:grid;grid-template-columns:100px minmax(0,1fr);gap:6px 10px;margin:0;font-size:12px}.api-endpoint-meta dt{color:var(--text-muted)}.api-endpoint-meta dd{margin:0;color:var(--text);overflow-wrap:anywhere}.api-endpoint-meta code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:var(--text)}@media (max-width: 900px){.api-docs-header{flex-direction:column}.api-section{grid-template-columns:1fr}}
