:root{--gradient:#667eea;--primary:#667eea;--primary-hover:#5a6fd6;--primary-light:#eef1fd;--primary-border:rgba(102,126,234,.3);--bg:#f8f9fa;--card:#fff;--border:#e2e8f0;--border-light:#f1f5f9;--text:#1e293b;--text-secondary:#64748b;--text-muted:#94a3b8;--success:#10b981;--warning:#f59e0b;--danger:#dc2626;--info:#3b82f6;--sidebar-bg:#1e1b4b;--sidebar-text:#c7d2fe;--sidebar-hover:hsla(0,0%,100%,.08);--sidebar-active:#667eea;--radius:8px;--radius-lg:12px;--radius-xl:16px;--shadow-sm:0 1px 3px rgba(0,0,0,.08);--shadow:0 2px 10px rgba(0,0,0,.06);--shadow-lg:0 4px 20px rgba(0,0,0,.08);--shadow-primary:0 2px 10px rgba(102,126,234,.3);--shadow-primary-lg:0 4px 20px rgba(102,126,234,.4)}*{box-sizing:border-box;margin:0;padding:0}::-webkit-scrollbar{width:0;height:0}*{scrollbar-width:none}body,html{overflow-x:hidden;max-width:100vw}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);font-size:14px;line-height:1.5}a{color:var(--primary);text-decoration:none}a:hover{text-decoration:underline}.layout{min-height:100vh;width:100%}.layout,.sidebar{display:flex;overflow-x:hidden}.sidebar{width:250px;background:var(--sidebar-bg);color:var(--sidebar-text);padding:0;position:fixed;top:0;left:0;bottom:0;overflow-y:auto;z-index:100;box-shadow:2px 0 20px rgba(0,0,0,.15);transition:width .25s ease;flex-direction:column}.sidebar-top{display:flex;align-items:center;justify-content:space-between;padding:18px 16px 14px;border-bottom:1px solid hsla(0,0%,100%,.08);background:hsla(0,0%,100%,.03);flex-shrink:0}.sidebar-mark{width:26px;height:26px;object-fit:contain;flex:none;display:block}.sidebar-plate{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:11px;background:#fff;border:1px solid rgba(15,23,42,.1);box-shadow:0 1px 3px rgba(0,0,0,.25)}.sidebar-logo{gap:9px;font-size:20px;font-weight:700;color:#fff;letter-spacing:.5px;white-space:nowrap;overflow:hidden;transition:all .25s ease}.sidebar-logo,.sidebar-toggle{display:flex;align-items:center}.sidebar-toggle{background:hsla(0,0%,100%,.1);border:none;color:hsla(0,0%,100%,.6);width:28px;height:28px;border-radius:6px;cursor:pointer;justify-content:center;font-size:11px;flex-shrink:0;transition:all .2s}.sidebar-toggle:hover{background:hsla(0,0%,100%,.18);color:#fff}.sidebar-nav{list-style:none;padding:8px;flex:1 1;overflow-y:auto}.sidebar-nav li{margin-bottom:2px}.sidebar-nav a{gap:12px;padding:10px 16px;color:var(--sidebar-text);font-size:14px;font-weight:500;border-radius:var(--radius);transition:all .2s ease;white-space:nowrap;overflow:hidden}.nav-icon,.sidebar-nav a{display:flex;align-items:center}.nav-icon{flex-shrink:0;width:24px;justify-content:center}.nav-label{transition:opacity .2s ease}.sidebar-nav a:hover{background:var(--sidebar-hover);color:#fff;text-decoration:none}.sidebar-nav a.active{background:var(--sidebar-active);color:#fff;box-shadow:0 2px 8px rgba(102,126,234,.4)}.sidebar-collapsed{width:68px}.sidebar-collapsed .sidebar-logo{font-size:16px;text-align:center}.sidebar-collapsed .sidebar-top{justify-content:center;padding:18px 8px 14px;gap:0;flex-direction:column;align-items:center}.sidebar-collapsed .sidebar-nav{padding:8px 4px}.sidebar-collapsed .sidebar-nav a{justify-content:center;padding:10px 8px;gap:0}.sidebar-collapsed .nav-label{display:none}.sidebar-collapsed:not(.sidebar-mobile-open):hover{width:68px}.sidebar-tip{position:fixed;left:76px;transform:translateY(-50%);background:#241021;color:#fff;padding:6px 10px;border-radius:8px;font-size:13px;line-height:1.2;white-space:nowrap;pointer-events:none;z-index:300;box-shadow:0 8px 22px rgba(0,0,0,.32)}.mobile-menu-backdrop,.mobile-topbar{display:none}.main-content{margin-left:250px;flex:1 1;padding:28px 32px;min-height:100vh;transition:margin-left .25s ease;overflow-x:hidden;max-width:calc(100vw - 250px)}[data-sidebar=collapsed] .main-content{margin-left:68px;max-width:calc(100vw - 68px)}.page-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.page-title{font-size:24px;font-weight:700;color:var(--text)}.page-header-gradient{background:var(--gradient);color:#fff;padding:24px 28px;border-radius:var(--radius-lg);margin-bottom:24px;box-shadow:var(--shadow-primary);position:relative;overflow:hidden}.page-header-gradient:before{content:"";position:absolute;top:-50%;right:-10%;width:200px;height:200px;background:hsla(0,0%,100%,.1);border-radius:50%;pointer-events:none}.page-header-gradient h1{color:#fff;margin:0;font-size:22px;font-weight:600;position:relative;z-index:1}.page-header-gradient p{color:hsla(0,0%,100%,.85);margin:6px 0 0;font-size:14px;position:relative;z-index:1}.card{background:var(--card);border-radius:var(--radius-lg);padding:24px;box-shadow:var(--shadow);margin-bottom:20px}.card-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;padding-bottom:14px;border-bottom:1px solid var(--border-light)}.card-title{font-size:17px;font-weight:600;color:var(--text)}.metrics{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));grid-gap:16px;gap:16px;margin-bottom:24px}.metric{background:var(--card);border-radius:var(--radius-lg);padding:20px;box-shadow:var(--shadow);position:relative;overflow:hidden}.metric:before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:var(--gradient)}.metric-label{font-size:12px;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.5px;font-weight:500}.metric-value{font-size:2rem;font-weight:700;margin-top:6px;color:var(--text);line-height:1.2}.metric-change{font-size:12px;margin-top:6px;display:flex;align-items:center;gap:4px}.metric-change.up{color:var(--success)}.metric-change.down{color:var(--danger)}.analytics-card,.card,.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse}th{text-align:left;font-size:12px;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.5px;font-weight:600;background:#f8fafc;border-bottom:2px solid var(--border)}td,th{padding:12px 14px}td{border-bottom:1px solid var(--border-light);vertical-align:middle}tbody tr:hover td{background:#f8fafc}.badge{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:600;white-space:nowrap}.badge-success{background:#dcfce7;color:#166534}.badge-warning{background:#fef3c7;color:#92400e}.badge-danger{background:#fee2e2;color:#991b1b}.badge-info{background:#dbeafe;color:#1e40af}.badge-neutral{background:#f1f5f9;color:#475569}.btn{display:inline-flex;align-items:center;gap:8px;padding:10px 22px;border-radius:var(--radius);font-size:14px;font-weight:500;border:none;cursor:pointer;transition:all .2s ease;font-family:inherit;white-space:nowrap}.btn:hover{opacity:.85}.btn-primary{background:var(--gradient);color:#fff;box-shadow:var(--shadow-primary)}.btn-primary:hover{box-shadow:var(--shadow-primary-lg)}.btn-secondary{background:#f1f5f9;color:#334155;border:1px solid var(--border)}.btn-secondary:hover{background:var(--border)}.btn-danger{background:#fef2f2;color:var(--danger);border:1px solid #fecaca}.btn-danger:hover{background:#fee2e2;border-color:#fca5a5}.btn-sm{padding:5px 12px;font-size:12px}.btn-xs{padding:3px 8px;font-size:11px}.btn-ghost{background:transparent;color:var(--primary);padding:6px 12px}.btn-ghost:hover{background:var(--primary-light)}.form-group{margin-bottom:16px}.form-label{display:block;font-size:13px;font-weight:500;margin-bottom:6px;color:#334155}.form-input,.form-select,.form-textarea{width:100%;padding:9px 14px;border:1px solid var(--border);border-radius:var(--radius);font-size:14px;font-family:inherit;background:var(--card);color:var(--text);transition:border-color .2s,box-shadow .2s}.form-select{padding-right:32px;-moz-appearance:none;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:12px}.form-input:focus,.form-select:focus,.form-textarea:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(102,126,234,.12)}.form-textarea{min-height:100px;resize:vertical}.form-hint{margin-top:4px;color:var(--text-muted);font-size:12px}.filters{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:20px;align-items:center}.filters .form-input,.filters .form-select{width:auto;min-width:140px;max-width:200px}.filter-pill{padding:7px 14px;border:1px solid var(--border);border-radius:var(--radius);background:#fff;font-size:13px;color:var(--text-secondary);cursor:pointer;transition:all .15s}.filter-pill:hover{background:#f1f5f9;color:#334155}.filter-pill.active{background:var(--gradient);color:#fff;border-color:transparent}.nav-tabs{background:#fff;border-bottom:1px solid var(--border);padding:0 16px;margin:0 0 20px;display:flex;flex-wrap:wrap;gap:0;box-shadow:var(--shadow-sm);border-radius:0 0 var(--radius-lg) var(--radius-lg)}.nav-tab{background:transparent;color:var(--text-secondary);padding:12px 16px;font-size:13px;font-weight:500;cursor:pointer;border:none;border-bottom:2px solid transparent;transition:all .2s}.nav-tab:hover{color:var(--primary);background:rgba(102,126,234,.04)}.nav-tab.active{color:var(--primary);border-bottom-color:var(--primary)}.toggle-switch{position:relative;display:inline-block;width:52px;height:28px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;inset:0;background:#cbd5e1;transition:.3s;border-radius:28px}.toggle-slider:before{position:absolute;content:"";height:22px;width:22px;left:3px;bottom:3px;background:#fff;transition:.3s;border-radius:50%;box-shadow:0 1px 3px rgba(0,0,0,.2)}.toggle-switch input:checked+.toggle-slider{background:var(--success)}.toggle-switch input:checked+.toggle-slider:before{transform:translateX(24px)}.tag{display:inline-block;font-size:12px;font-weight:500;color:var(--primary);background:var(--primary-light);padding:3px 10px;border-radius:12px}.option-box{margin:12px 0;padding:14px 16px;background:#f8fafc;border:1px solid var(--border);border-radius:var(--radius)}.loading{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;color:var(--text-muted);gap:16px}.spinner{width:32px;height:32px;border:3px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(1turn)}}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.empty{text-align:center;padding:60px 20px;color:var(--text-muted);font-size:16px;background:#fff;border-radius:var(--radius-lg);box-shadow:var(--shadow)}.toast{position:fixed;bottom:24px;right:24px;padding:14px 22px;border-radius:var(--radius);color:#fff;font-size:14px;font-weight:500;z-index:9999;animation:toastIn .3s ease;box-shadow:0 4px 15px rgba(0,0,0,.15)}.toast-success{background:var(--success)}.toast-error{background:var(--danger)}.toast-info{background:var(--primary)}@keyframes toastIn{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}.drop-overlay{display:none;position:absolute;inset:0;background:rgba(102,126,234,.08);border:2px dashed var(--primary);border-radius:var(--radius-lg);z-index:50;align-items:center;justify-content:center}.drop-overlay.visible{display:flex}.drop-overlay-inner{display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--primary);font-size:14px;font-weight:500}.chat-page-wrapper{margin:-28px -32px;height:calc(100vh);overflow:hidden}.chat-container{display:flex;gap:0;height:100%;width:100%;overflow:hidden}.chat-users-list{width:340px;flex-shrink:0;border-right:1px solid #e2e8f0;overflow:hidden;background:#fff;display:flex;flex-direction:column}.chat-users-header{padding:16px 20px;background:#f8f9fa;border-bottom:1px solid #e9ecef}.chat-users-count{background:var(--primary);color:#fff;padding:8px 15px;border-radius:var(--radius);font-size:14px;font-weight:500;text-align:center;margin-bottom:12px}.chat-users-body{overflow-y:auto;flex:1 1;min-height:0}.chat-user-item{padding:14px 16px;border-bottom:1px solid #f1f3f5;cursor:pointer;display:flex;align-items:flex-start;gap:12px;position:relative;transition:background .15s}.chat-user-item:hover{background:#f8f9fa}.chat-user-item.active{background:#e3f2fd;border-left:3px solid #2196f3}.chat-user-item.has-unread{background:#fff3cd;border-left:3px solid #ffc107}.chat-user-avatar{width:45px;height:45px;border-radius:50%;object-fit:cover;flex-shrink:0;border:2px solid #f1f3f5}.chat-user-name{font-weight:600;font-size:14px;color:#495057;margin-bottom:3px}.chat-user-last-msg,.chat-user-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-user-last-msg{font-size:12px;color:#6c757d;line-height:1.3}.chat-user-folder{display:inline-block;font-size:10px;padding:2px 6px;background:#6c757d;color:#fff;border-radius:10px;font-weight:500;margin-top:3px}.unread-badge{background:#dc3545;color:#fff;border-radius:10px;min-width:20px;height:20px;font-size:11px;display:inline-flex;align-items:center;justify-content:center;font-weight:600;padding:0 4px}.chat-area{flex:1 1;display:flex;flex-direction:column;background:#f0f2f5;min-width:0;overflow:hidden}.chat-header{padding:14px 20px;border-bottom:1px solid #e2e8f0;background:#fff;font-weight:600;font-size:16px;display:flex;justify-content:space-between;align-items:center;flex-shrink:0}.chat-header-actions{display:flex;align-items:center;gap:8px}.chat-header-btn{width:36px;height:36px;border:1px solid #ddd;border-radius:var(--radius);background:#fff;color:#666;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s;padding:0}.chat-header-btn:hover{background:#f8f9fa;border-color:#999}.chat-header-btn.active{background:var(--primary);border-color:var(--primary);color:#fff}.messages-container{flex:1 1;overflow-y:auto;overflow-x:hidden;padding:20px;background:#f0f2f5;min-height:0}.date-separator{text-align:center;margin:20px 0;position:relative}.date-separator:before{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:#dee2e6}.date-separator span{background:#f8f9fa;padding:6px 15px;color:#6c757d;font-size:12px;font-weight:500;position:relative;border-radius:15px;border:1px solid #dee2e6}.message-wrapper{display:flex;margin-bottom:8px;align-items:flex-end;padding:0 5px}.message-wrapper.incoming{justify-content:flex-start}.message-wrapper.outgoing{justify-content:flex-end}.message-container{display:flex;flex-direction:column;max-width:75%;min-width:200px}.message-wrapper.incoming .message-container{align-items:flex-start}.message-wrapper.outgoing .message-container{align-items:flex-end}.message-sender-name{font-size:11px;color:var(--primary);margin-bottom:4px;font-weight:600;padding:0 4px}.message-wrapper.outgoing .message-sender-name{color:var(--success)}.message-avatar{width:36px;height:36px;border-radius:50%;margin:0 10px 4px 0;object-fit:cover;flex-shrink:0;border:2px solid #f1f3f5}.message-bubble{display:inline-block;padding:12px 16px;border-radius:18px;position:relative;word-wrap:break-word;word-break:break-word;overflow-wrap:break-word;box-shadow:0 1px 3px rgba(0,0,0,.1);max-width:100%;min-width:200px;overflow:hidden}.message-bubble:has(.message-media img){padding:6px;min-width:auto;max-width:340px}.message-bubble:has(.message-media img) .message-text{padding:4px 10px 2px}.message-wrapper.incoming .message-bubble{background:#fff;color:#495057;border-bottom-left-radius:8px;border:1px solid #e9ecef}.message-wrapper.outgoing .message-bubble{background:#5b9bd5;color:#fff;border-bottom-right-radius:8px}.message-wrapper.outgoing .message-bubble a{color:#fff;text-decoration:underline}.message-text{line-height:1.4;font-size:14px;word-wrap:break-word}.message-text a{color:#2563eb;text-decoration:underline;text-underline-offset:2px}.message-text a:hover{opacity:.8}.message-wrapper.outgoing .message-text a{color:#e0e7ff}.message-text blockquote{margin:6px 0;padding:6px 12px;border-left:3px solid #5b9bd5;background:rgba(91,155,213,.08);border-radius:0 8px 8px 0;font-style:normal;color:inherit}.message-wrapper.outgoing .message-text blockquote{border-left-color:hsla(0,0%,100%,.5);background:hsla(0,0%,100%,.12)}.message-time{font-size:11px;opacity:.7;margin-top:4px;text-align:right}.message-media{margin:0 0 6px;text-align:center}.message-media img{width:100%;height:auto;border-radius:12px;display:block}.message-media.album-grid img{border-radius:0}.message-media video{width:100%;border-radius:0;display:block}.message-media audio{width:100%}.message-bubble:has(audio){width:55vw;max-width:600px;min-width:280px}.message-media:has(audio){margin:0 0 8px;max-width:100%;width:100%}.message-media.voice-media{margin:0 0 8px;max-width:100%;width:100%;display:block}.message-bubble:has(.voice-media){width:45%;min-width:260px}.system-message{text-align:center;margin:12px 0}.system-message span{background:#f0f2f5;color:#65676b;font-size:12px;font-style:italic;padding:5px 12px;border-radius:15px}.chat-input-area{padding:14px 20px;border-top:1px solid #e2e8f0;background:#fff;flex-shrink:0}.chat-input-row{display:flex;gap:10px;align-items:flex-end}.chat-input-row textarea{flex:1 1;padding:10px 14px;border:1px solid var(--border);border-radius:var(--radius-lg);font-size:14px;font-family:inherit;resize:none;max-height:120px;min-height:42px;transition:border-color .2s}.chat-input-row textarea:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(102,126,234,.12)}.chat-send-btn{width:42px;height:42px;background:var(--gradient);color:#fff;border:none;border-radius:50%;cursor:pointer;transition:all .2s;box-shadow:var(--shadow-primary);flex-shrink:0;align-self:flex-end;display:flex;align-items:center;justify-content:center;padding:0}.chat-send-btn:disabled{opacity:.4;cursor:default}.chat-send-btn:not(:disabled):hover{box-shadow:var(--shadow-primary-lg);transform:scale(1.05)}.broadcast-item{background:#fff;border:1px solid #e9ecef;border-left:3px solid #cbd5e1;border-radius:var(--radius);padding:16px 18px;margin-bottom:10px;transition:box-shadow .2s,border-color .2s;cursor:pointer}.broadcast-item:hover{box-shadow:var(--shadow)}.broadcast-item.scheduled{border-left-color:var(--warning)}.broadcast-item.sending{border-left-color:var(--info)}.broadcast-item.sent{border-left-color:var(--success)}.broadcast-item.stopped{border-left-color:var(--danger)}.funnel-card{background:#fff;border-radius:var(--radius-lg);padding:20px;box-shadow:var(--shadow);border-left:4px solid var(--success);transition:all .2s;cursor:pointer}.funnel-card.inactive{border-left-color:#d1d5db}.funnel-card:hover .funnel-card-title{color:var(--primary)}.funnels-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));grid-gap:16px;gap:16px}.funnel-step-num{flex-shrink:0;width:18px;height:18px;line-height:18px;text-align:center;border-radius:50%;background:#f1f5f9;color:var(--text-secondary);font-size:10px;font-weight:600}.funnel-step-delay{font-size:11px;color:var(--warning);background:#fffbeb;padding:1px 7px;border-radius:var(--radius)}.funnel-card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.funnel-card-status{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--success)}.funnel-card.inactive .funnel-card-status{color:#9ca3af}.funnel-card-date{font-size:11px;color:var(--text-muted)}.funnel-card-title{display:block;font-size:16px;font-weight:600;color:var(--text);margin-bottom:10px;line-height:1.4}.funnel-card-commands{gap:6px}.funnel-card-commands,.funnel-card-meta{display:flex;flex-wrap:wrap;margin-bottom:10px}.funnel-card-meta{gap:10px}.funnel-card-meta span{font-size:12px;color:var(--text-secondary);background:#f1f5f9;padding:3px 8px;border-radius:6px}.funnel-card-steps{border-top:1px solid #f1f5f9;padding-top:10px;margin-bottom:8px}.funnel-step-row{display:flex;align-items:baseline;gap:8px;padding:3px 0;font-size:12px;color:#475569}.funnel-step-msg{flex:1 1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-secondary)}.funnel-step-more{font-size:11px;color:var(--text-muted);padding:3px 0 0 26px}.funnels-stats{display:flex;gap:16px;margin-bottom:16px}.funnels-stat{background:#fff;border-radius:10px;padding:14px 22px;box-shadow:var(--shadow-sm);text-align:center;min-width:100px}.funnels-stat-value{font-size:24px;font-weight:700;color:var(--text);line-height:1.2}.funnels-stat-label{font-size:12px;color:var(--text-muted);margin-top:2px}.funnels-toolbar{display:flex;gap:12px;align-items:center;margin-bottom:16px;flex-wrap:wrap}.funnels-search{flex:1 1;min-width:200px;padding:9px 14px;border:1px solid var(--border);border-radius:var(--radius);font-size:14px;background:#fff;outline:none;transition:border-color .2s}.funnels-search:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(102,126,234,.12)}.funnels-filters{display:flex;gap:6px}.funnels-empty{grid-column:1/-1;text-align:center;padding:60px 20px;font-size:16px;color:var(--text-muted);background:#fff;border-radius:var(--radius-lg);box-shadow:var(--shadow-sm)}.funnel-detail{margin-top:16px;border-top:1px solid #e5e7eb;padding-top:16px}.funnel-detail-steps{display:flex;flex-direction:column;gap:8px}.funnel-detail-step{background:#f9fafb;border-radius:var(--radius);padding:12px;border:1px solid #e5e7eb}.stats-grid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));grid-gap:20px;gap:20px}.stat-card{background:#fff;border:1px solid #eef2f7;border-radius:var(--radius-xl);padding:25px;position:relative;overflow:hidden;box-shadow:0 4px 15px rgba(0,0,0,.05)}.stat-card:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--gradient)}.stat-number{font-size:2.5rem;font-weight:600;color:var(--text);margin-bottom:8px;line-height:1}.stat-label{color:var(--text-secondary);font-size:14px;font-weight:500}.action-btn{display:flex;align-items:center;gap:12px;padding:14px 18px;background:#fff;border:1px solid #f1f5f9;border-radius:10px;text-decoration:none;color:#334155;transition:all .2s ease;font-weight:500;box-shadow:var(--shadow-sm);cursor:pointer}.action-btn:hover{background:var(--primary);color:#fff;transform:translateY(-1px);box-shadow:var(--shadow-primary);text-decoration:none}.folder-filters{display:flex;gap:6px;flex-wrap:nowrap;overflow-x:auto;padding:8px 16px;-webkit-overflow-scrolling:touch;border-bottom:1px solid #f1f3f5;background:#fafbfc;flex-shrink:0}.folder-filter{background:#e9ecef;border:none;padding:6px 12px;border-radius:20px;cursor:pointer;font-size:12px;white-space:nowrap;transition:all .15s}.folder-filter.active,.folder-filter:hover{background:var(--primary);color:#fff}.delete-folder-btn{position:absolute;top:-6px;right:-6px;background:#dc3545;color:#fff;border:none;border-radius:50%;width:16px;height:16px;font-size:12px;line-height:1;cursor:pointer;display:none;align-items:center;justify-content:center}.folder-filter:hover .delete-folder-btn{display:flex}@keyframes highlight-fade{0%{background:rgba(102,126,234,.2)}to{background:transparent}}.highlight-msg{animation:highlight-fade 2s ease}.copyable-text{cursor:pointer;padding:2px 4px;border-radius:4px;transition:background .2s}.copyable-text:hover{background:#f3f4f6}@media (max-width:1024px){.chat-users-list{width:300px}.funnels-grid{grid-template-columns:1fr}.broadcast-two-col{grid-template-columns:1fr!important}.main-content{padding:20px}.page-header{flex-wrap:wrap;gap:12px}}@media (max-width:768px){.sidebar{display:flex!important;width:48px!important;z-index:200;transition:width .25s ease}.sidebar .sidebar-toggle,.sidebar .sidebar-top{display:none}.sidebar .nav-label{display:none!important}.sidebar .sidebar-nav{padding:6px 4px}.sidebar .sidebar-nav a{justify-content:center;padding:10px 6px;gap:0}.sidebar-mobile-open{width:260px!important}.sidebar-mobile-open .sidebar-top{display:flex}.sidebar-mobile-open .nav-label{display:inline!important}.sidebar-mobile-open .sidebar-nav{padding:8px}.sidebar-mobile-open .sidebar-nav a{justify-content:flex-start;padding:10px 16px;gap:12px}.mobile-menu-backdrop{display:block;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:150;-webkit-tap-highlight-color:transparent}.main-content{margin-left:48px!important;max-width:calc(100vw - 48px)!important;padding:12px}.metrics,.stats-grid{grid-template-columns:repeat(2,1fr);gap:12px}.page-header-gradient{padding:16px 20px;border-radius:var(--radius)}.page-header-gradient h1{font-size:18px}.page-header{flex-direction:column;align-items:flex-start;gap:8px}.page-title{font-size:20px}.card{padding:16px}td,th{padding:8px 10px}.btn,td,th{font-size:13px}.btn{padding:7px 14px}.chat-page-wrapper{margin:-12px!important;padding:0!important;height:calc(100vh - 0px);height:calc(100dvh - 0px);overflow:hidden}.chat-page-wrapper.chat-fullscreen{position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;margin:0!important;z-index:250}.chat-container{height:100%;position:relative}.chat-users-list{width:100%!important;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;max-height:none!important;z-index:2;transition:transform .25s ease}.chat-users-list.mobile-hidden{transform:translateX(-100%);pointer-events:none}.chat-area{position:absolute;top:0;left:0;right:0;bottom:0;height:100%;z-index:1;min-height:0!important}.chat-area.mobile-hidden{visibility:hidden;pointer-events:none}.chat-area.mobile-visible{z-index:3}.chat-header{padding:10px 12px!important}.chat-header-actions{gap:4px!important}.chat-header-actions span{display:none!important}.mobile-back-btn{display:flex!important}.chat-input-area{padding:8px 12px max(8px,env(safe-area-inset-bottom))!important}.chat-input-row textarea{font-size:16px!important;min-height:38px!important;padding:8px 12px!important}.chat-send-btn{width:38px!important;height:38px!important}.messages-container{padding:12px!important}.message-bubble{max-width:85%!important}.chat-users-header{padding:12px 14px!important}.chat-user-item{padding:10px 14px!important;gap:10px!important}.folder-filters{padding:6px 10px!important}}.mobile-back-btn{display:none;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:none;background:#f1f5f9;cursor:pointer;flex-shrink:0;margin-right:4px;-webkit-tap-highlight-color:transparent}.mobile-back-btn:active{background:#e2e8f0}@media (max-width:480px){.main-content{padding:12px}.metrics,.stats-grid{grid-template-columns:1fr}.page-header-gradient{padding:14px 16px}.page-header-gradient h1{font-size:16px}.card{padding:12px;border-radius:var(--radius)}td,th{padding:6px 8px;font-size:12px}}.settings-tabs{display:flex;gap:4px;margin-bottom:20px;border-bottom:2px solid #f1f5f9;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.settings-tabs::-webkit-scrollbar{display:none}.settings-tab{padding:10px 20px;font-size:14px;font-weight:500;cursor:pointer;border-radius:8px 8px 0 0;transition:all .15s;background:transparent;color:#94a3b8;border:none;border-bottom:2px solid transparent;margin-bottom:-2px;white-space:nowrap;flex-shrink:0}.settings-tab-active{background:#fff;color:#1e293b;border-bottom-color:#667eea}.settings-field{margin-bottom:12px}.settings-field-label{display:block;font-size:13px;color:#475569;margin-bottom:6px;font-weight:500}.settings-field-row{display:flex;align-items:center;gap:8px}.settings-field-actions{display:flex;gap:4px;flex-shrink:0}.settings-field-actions .btn-sm{padding:4px 10px;font-size:12px;white-space:nowrap}.settings-proxy-row{display:flex;align-items:center;gap:10px;margin-bottom:8px}.settings-proxy-fields{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.settings-proxy-fields .form-input{flex:1 1;min-width:120px;padding:6px 12px;font-size:13px}.settings-prompt-header{gap:8px;margin-bottom:6px}.settings-prompt-header,.settings-save-bar{display:flex;justify-content:space-between;align-items:center}.settings-save-bar{gap:12px}.settings-logout-btn{display:flex;align-items:center;gap:8px;background:hsla(0,0%,100%,.15)!important;color:#fff!important;border:1px solid hsla(0,0%,100%,.3)!important;padding:8px 16px;font-size:13px;border-radius:8px;cursor:pointer;transition:background .2s;flex-shrink:0;position:relative;z-index:1}.settings-logout-btn:hover{background:hsla(0,0%,100%,.25)!important}.settings-modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:1000;padding:16px}.settings-modal{background:#fff;border-radius:12px;padding:24px;width:100%;max-width:440px;max-height:90vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.2)}.settings-modal-lg{max-width:560px}@media (max-width:768px){.settings-tabs{gap:0;margin-bottom:16px;padding-bottom:0}.settings-tab{padding:8px 12px;font-size:12px}.settings-field-row{flex-direction:column;align-items:stretch}.settings-field-row .form-input{width:100%!important;font-size:16px!important;padding:10px 12px}.settings-field-actions{justify-content:flex-end;margin-top:6px}.settings-proxy-row{flex-direction:column;align-items:stretch}.settings-proxy-row select{max-width:100%!important}.settings-proxy-fields{flex-direction:column}.settings-proxy-fields .form-input{width:100%!important;min-width:0;font-size:16px!important;padding:10px 12px}.settings-prompt-header{flex-direction:column;align-items:flex-start;gap:6px}.settings-save-bar{flex-direction:column;align-items:stretch;gap:8px}.settings-save-bar .btn-primary{width:100%;padding:12px;font-size:15px}.settings-logout-btn{padding:6px 12px;font-size:12px}.settings-logout-btn span{display:none}.settings-modal{padding:16px;max-height:85vh;margin:8px}.settings-modal .form-group{margin-bottom:12px}.settings-modal [style*=gridTemplateColumns]{grid-template-columns:1fr!important}.form-input,.form-select,.form-textarea,.settings-modal .form-input,.settings-modal .form-select,.settings-modal .form-textarea{font-size:16px!important;padding:10px 12px}.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -12px;padding:0 12px}}@media (max-width:480px){.login-card{width:calc(100vw - 32px)!important;max-width:380px;padding:28px 20px!important;margin:16px}.login-card input{font-size:16px!important;padding:12px 14px!important}.login-card button[type=submit]{padding:13px!important;font-size:16px!important}}.nav-group{list-style:none}.nav-group-label{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:1px;color:hsla(0,0%,100%,.35);padding:14px 16px 6px;white-space:nowrap}.nav-group-divider{height:1px;background:hsla(0,0%,100%,.08);margin:8px}.breadcrumbs{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-muted);margin-bottom:16px}.breadcrumbs a{color:var(--text-secondary);text-decoration:none;transition:color .15s}.breadcrumbs a:hover{color:var(--primary);text-decoration:none}.breadcrumbs-sep{color:var(--border)}.breadcrumbs-current{color:var(--text);font-weight:500}.monitoring-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));grid-gap:12px;gap:12px;margin-bottom:24px}.monitor-card{background:var(--card);border-radius:var(--radius);padding:14px 16px;display:flex;align-items:center;gap:12px;box-shadow:var(--shadow-sm);transition:all .2s}.monitor-card.alert{border-left:3px solid var(--danger);background:#fef2f2}.monitor-card.warning{border-left:3px solid var(--warning);background:#fffbeb}.monitor-card.ok{border-left:3px solid var(--success)}.monitor-icon{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}.monitor-card.alert .monitor-icon{background:#fee2e2}.monitor-card.warning .monitor-icon{background:#fef3c7}.monitor-card.ok .monitor-icon{background:#dcfce7}.monitor-value{font-size:20px;font-weight:700}.monitor-label{font-size:12px}.export-btn,.monitor-label{color:var(--text-secondary)}.export-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:var(--radius);font-size:13px;font-weight:500;border:1px solid var(--border);background:#fff;cursor:pointer;transition:all .15s}.export-btn:hover{background:#f1f5f9;color:var(--text)}.quick-replies-dropdown{position:absolute;bottom:100%;left:0;right:0;background:#fff;border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);max-height:240px;overflow-y:auto;z-index:50;margin-bottom:8px}.quick-reply-item{padding:10px 14px;cursor:pointer;font-size:13px;border-bottom:1px solid var(--border-light);transition:background .1s}.quick-reply-item:last-child{border-bottom:none}.quick-reply-item:hover{background:var(--primary-light)}.quick-reply-title{font-weight:500;color:var(--text);margin-bottom:2px}.quick-reply-preview{color:var(--text-muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.funnel-flow{display:flex;align-items:stretch;gap:0;overflow-x:auto;padding:20px 0}.funnel-step-card{flex:0 0 200px;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:16px;text-align:center;position:relative}.funnel-step-card.active{border-color:var(--primary);box-shadow:var(--shadow-primary)}.funnel-arrow{display:flex;align-items:center;justify-content:center;width:40px;flex-shrink:0;color:var(--text-muted);font-size:18px}.funnel-bar{height:8px;background:var(--border);border-radius:4px;margin-top:8px;overflow:hidden}.funnel-bar-fill{height:100%;background:var(--primary);border-radius:4px;transition:width .3s}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);grid-gap:2px;gap:2px;margin-bottom:16px}.calendar-header-cell{text-align:center;font-size:12px;font-weight:600;color:var(--text-secondary);padding:8px 4px;text-transform:uppercase}.calendar-cell{min-height:80px;background:var(--card);border:1px solid var(--border-light);border-radius:4px;padding:4px;font-size:12px}.calendar-cell.other-month{opacity:.4}.calendar-cell.today{border-color:var(--primary);background:var(--primary-light)}.calendar-day-num{font-weight:600;font-size:13px;margin-bottom:2px;color:var(--text)}.calendar-event{background:var(--primary);color:#fff;padding:2px 6px;border-radius:4px;font-size:11px;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}[data-theme=dark]{--bg:#0f172a;--card:#1e293b;--border:#334155;--border-light:#1e293b;--text:#f1f5f9;--text-secondary:#94a3b8;--text-muted:#64748b;--sidebar-bg:#0c0f1a;--shadow-sm:0 1px 3px rgba(0,0,0,.3);--shadow:0 2px 10px rgba(0,0,0,.2);--shadow-lg:0 4px 20px rgba(0,0,0,.3)}[data-theme=dark] body{background:var(--bg);color:var(--text)}[data-theme=dark] th{background:#1e293b;color:var(--text-secondary)}[data-theme=dark] tbody tr:hover td{background:#263548}[data-theme=dark] .form-input,[data-theme=dark] .form-select,[data-theme=dark] .form-textarea{background:#0f172a;border-color:var(--border);color:var(--text)}[data-theme=dark] .btn-secondary{background:#334155;color:#e2e8f0;border-color:#475569}[data-theme=dark] .btn-secondary:hover{background:#475569}[data-theme=dark] .btn-danger{background:#450a0a;color:#fca5a5;border-color:#7f1d1d}[data-theme=dark] .filter-pill{background:#1e293b;border-color:#334155;color:#94a3b8}[data-theme=dark] .filter-pill:hover{background:#334155;color:#e2e8f0}[data-theme=dark] .nav-tabs{background:#1e293b;border-color:#334155}[data-theme=dark] .chat-area{background:#0f172a}[data-theme=dark] .chat-users-list{background:#1e293b;border-color:#334155}[data-theme=dark] .chat-users-header,[data-theme=dark] .folder-filters{background:#0f172a;border-color:#334155}[data-theme=dark] .folder-filter{background:#334155;color:#94a3b8}[data-theme=dark] .folder-filter.active,[data-theme=dark] .folder-filter:hover{background:var(--primary);color:#fff}[data-theme=dark] .chat-user-item{border-color:#334155}[data-theme=dark] .chat-user-item:hover{background:#263548}[data-theme=dark] .chat-user-item.active{background:#1e3a5f;border-left-color:#3b82f6}[data-theme=dark] .chat-user-item.has-unread{background:#422006;border-left-color:#f59e0b}[data-theme=dark] .chat-user-name{color:#e2e8f0}[data-theme=dark] .chat-header{color:var(--text)}[data-theme=dark] .chat-header,[data-theme=dark] .chat-input-area{background:#1e293b;border-color:#334155}[data-theme=dark] .message-avatar{border-color:#334155}[data-theme=dark] .message-text a{color:#93c5fd}[data-theme=dark] .chat-input-row textarea{background:#0f172a;border-color:#334155;color:#f1f5f9}[data-theme=dark] .messages-container{background:#0f172a}[data-theme=dark] .message-wrapper.incoming .message-bubble{background:#1e293b;color:#e2e8f0;border-color:#334155}[data-theme=dark] .system-message span{background:#1e293b;color:#94a3b8}[data-theme=dark] .date-separator:before{background:#334155}[data-theme=dark] .date-separator span{background:#1e293b;color:#94a3b8;border-color:#334155}[data-theme=dark] .empty{background:#1e293b}[data-theme=dark] .option-box{background:#0f172a;border-color:#334155}[data-theme=dark] .export-btn{background:#1e293b;border-color:#334155;color:#94a3b8}[data-theme=dark] .export-btn:hover{background:#334155;color:#e2e8f0}[data-theme=dark] .monitor-card{background:#1e293b}[data-theme=dark] .monitor-card.alert{background:#450a0a}[data-theme=dark] .monitor-card.warning{background:#422006}[data-theme=dark] .quick-replies-dropdown{background:#1e293b;border-color:#334155}[data-theme=dark] .quick-reply-item{border-color:#334155}[data-theme=dark] .quick-reply-item:hover{background:#334155}[data-theme=dark] .calendar-cell{background:#1e293b;border-color:#334155}[data-theme=dark] .calendar-cell.today{background:rgba(102,126,234,.15);border-color:var(--primary)}[data-theme=dark] .chat-header-btn{background:#0f172a;border-color:#334155;color:#94a3b8}[data-theme=dark] .chat-header-btn:hover{background:#334155}[data-theme=dark] .form-label{color:#94a3b8}[data-theme=dark] .metric{background:#1e293b}[data-theme=dark] .metric:before{background:var(--primary)}[data-theme=dark] .metric-value{color:var(--text)}[data-theme=dark] .stat-card{background:#1e293b}[data-theme=dark] .broadcast-item,[data-theme=dark] .funnel-step-card{background:#1e293b;border-color:#334155}[data-theme=dark] .funnels-search{background:#0f172a;color:var(--text)}[data-theme=dark] .funnel-card,[data-theme=dark] .funnels-empty,[data-theme=dark] .funnels-stat{background:#1e293b}[data-theme=dark] .action-btn{background:#1e293b;border-color:#334155;color:var(--text-secondary)}[data-theme=dark] .action-btn:hover{background:#334155}[data-theme=dark] .settings-tab-active{background:var(--card)!important;color:var(--text)!important}[data-theme=dark] .settings-modal{background:#1e293b;border-color:#334155}[data-theme=dark] .settings-modal .form-input,[data-theme=dark] .settings-modal .form-select,[data-theme=dark] .settings-modal .form-textarea{background:#0f172a}[data-theme=dark] td,[data-theme=dark] th,[data-theme=dark] tr{border-color:#334155}[data-theme=dark] table thead tr{border-color:#475569}[data-theme=dark] .card{background:var(--card);color:var(--text)}[data-theme=dark] .badge,[data-theme=dark] .card-title,[data-theme=dark] .page-title{color:var(--text)}[data-theme=dark] .settings-field-label{color:var(--text-secondary)}[data-theme=dark] .table-wrap td{color:var(--text)}[data-theme=dark] .table-wrap th{color:var(--text-secondary)}[data-theme=dark] select option{background:var(--card);color:var(--text)}[data-theme=dark] .metrics{color:var(--text)}[data-theme=dark] .metric-label{color:var(--text-secondary)}[data-theme=dark] .metric-change{color:var(--text-muted)}[data-theme=dark] .metric-change.up{color:#4ade80}[data-theme=dark] .tag{background:#334155;color:#94a3b8}[data-theme=dark] code,[data-theme=dark] pre{background:#0f172a;color:#e2e8f0}[data-theme=dark] .card-header,[data-theme=dark] hr{border-color:#334155}[data-theme=dark] .empty{color:var(--text-muted)}[data-theme=dark] ::placeholder{color:#475569}[data-theme=dark] .card .card,[data-theme=dark] .page-header-gradient+div .card{background:var(--card)}[data-theme=dark] .badge[style*="background: #dcfce7"],[data-theme=dark] .badge[style*="background: #ecfdf5"],[data-theme=dark] .badge[style*="background: #f0fdf4"]{background:rgba(34,197,94,.15)!important}[data-theme=dark] .badge[style*="background: #fef3c7"],[data-theme=dark] .badge[style*="background: #fef9c3"],[data-theme=dark] .badge[style*="background: #fffbeb"]{background:rgba(245,158,11,.15)!important}[data-theme=dark] .badge[style*="background: #fee2e2"],[data-theme=dark] .badge[style*="background: #fef2f2"]{background:rgba(239,68,68,.15)!important}[data-theme=dark] .badge[style*="background: #dbeafe"],[data-theme=dark] .badge[style*="background: #e0e7ff"],[data-theme=dark] .badge[style*="background: #eef2ff"]{background:rgba(99,102,241,.15)!important}[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea{background-color:var(--card)!important;color:var(--text)!important;border-color:var(--border)!important}[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#475569!important}[data-theme=dark] option{background:var(--card);color:var(--text)}[data-theme=dark] mark{background:rgba(250,204,21,.3)!important;color:var(--text)!important}[data-theme=dark] .card .table-wrap,[data-theme=dark] .card table{color:var(--text)}[data-theme=dark] .card table td{color:var(--text);border-color:var(--border)}[data-theme=dark] .card table th{color:var(--text-secondary);border-color:var(--border)}[data-theme=dark] .card table tbody tr,[data-theme=dark] .card table thead tr{border-color:var(--border)}[data-theme=dark] .card table tbody tr:hover{background:#263548}[data-theme=dark] .badge{border:none}[data-theme=dark] ::-webkit-scrollbar{width:8px}[data-theme=dark] ::-webkit-scrollbar-track{background:#0f172a}[data-theme=dark] ::-webkit-scrollbar-thumb{background:#334155;border-radius:4px}[data-theme=dark] ::-webkit-scrollbar-thumb:hover{background:#475569}[data-theme=dark] .recharts-cartesian-grid line{stroke:#334155}[data-theme=dark] .recharts-text{fill:#94a3b8}[data-theme=dark] .recharts-default-tooltip{background:#1e293b!important;border:1px solid #334155!important;color:#f1f5f9!important}[data-theme=dark] .recharts-tooltip-label{color:#f1f5f9!important}[data-theme=dark] .recharts-tooltip-item{color:#cbd5e1!important}[data-theme=dark] audio{filter:invert(1) hue-rotate(180deg);border-radius:20px}.sidebar-bottom{padding:12px 16px;border-top:1px solid hsla(0,0%,100%,.08);flex-shrink:0}.theme-toggle-btn{width:100%;display:flex;align-items:center;gap:10px;padding:8px 12px;background:hsla(0,0%,100%,.06);border:none;border-radius:var(--radius);color:var(--sidebar-text);cursor:pointer;font-size:13px;transition:all .2s}.theme-toggle-btn:hover{background:hsla(0,0%,100%,.12)}.sidebar-collapsed .theme-toggle-btn{justify-content:center;gap:0}.sidebar-collapsed .theme-toggle-label{display:none}.stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));grid-gap:14px;gap:14px}.stat-card{background:var(--card);border-radius:var(--radius-lg);padding:18px 20px;box-shadow:var(--shadow-sm)}.message-container{position:relative}.msg-delete-overlay{position:absolute;top:50%;left:-26px;transform:translateY(-50%);width:22px;height:22px;background:transparent;color:#94a3b8;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .15s;padding:0;line-height:1;z-index:5}.msg-delete-overlay svg{display:block;pointer-events:none}.message-wrapper:hover .msg-delete-overlay{opacity:1}[data-theme=dark] .msg-delete-overlay{color:#64748b}