/* SalesOps Pro UI — system-wide visual and interaction layer */
:root{
  --bg:#f5f7fb;--surface:#fff;--surface-2:#f8fafc;--text:#101828;--muted:#667085;--muted-2:#98a2b3;
  --line:#e7eaf0;--line-strong:#d0d5dd;--accent:#5b5bd6;--accent-2:#4444c7;--accent-soft:#eeeeff;
  --nav:#0b1220;--nav-2:#111a2d;--nav-text:#cbd5e1;--nav-muted:#78869d;--success:#12b76a;--warning:#f79009;--danger:#f04438;
  --shadow-xs:0 1px 2px rgba(16,24,40,.04);--shadow-sm:0 4px 14px rgba(16,24,40,.06);--shadow-md:0 16px 40px rgba(16,24,40,.08);
  --radius-sm:10px;--radius:14px;--radius-lg:20px;--sidebar-w:272px;
}
html{scroll-behavior:smooth;background:var(--bg)}
body{background:radial-gradient(circle at 80% -10%,rgba(91,91,214,.055),transparent 32%),var(--bg);color:var(--text);font-feature-settings:"kern" 1,"liga" 1;min-height:100vh}
body.app-authenticated{padding-right:var(--sidebar-w)}
*{scrollbar-width:thin;scrollbar-color:#cfd5df transparent}
*::-webkit-scrollbar{width:8px;height:8px}*::-webkit-scrollbar-thumb{background:#cfd5df;border-radius:20px}*::-webkit-scrollbar-track{background:transparent}
::selection{background:#dedeff;color:#24246e}

/* Sidebar */
.app-sidebar{position:fixed;inset:0 0 0 auto;width:var(--sidebar-w);z-index:80;background:linear-gradient(180deg,#0a1120 0%,#0d1628 65%,#0a1120 100%);color:var(--nav-text);display:flex;flex-direction:column;border-left:1px solid rgba(255,255,255,.05);box-shadow:-8px 0 32px rgba(11,18,32,.04);overflow:hidden}
.sidebar-brand{height:82px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid rgba(255,255,255,.06);flex:none}.sidebar-brand .brand{gap:12px}.sidebar-brand .brand-mark{width:42px;height:42px;border-radius:13px;background:linear-gradient(135deg,#7777ff,#5151d7);box-shadow:0 8px 24px rgba(91,91,214,.28);position:relative}.sidebar-brand .brand-mark:after{content:"";position:absolute;inset:1px;border-radius:12px;border:1px solid rgba(255,255,255,.22)}.sidebar-brand .brand-mark span{position:relative;z-index:1;font-size:19px}.brand-copy{display:grid;gap:2px}.brand-copy strong{color:#fff;font-size:16px;letter-spacing:-.01em}.brand-copy small{color:#7f8da3;font-size:10px;letter-spacing:.08em;text-transform:uppercase}.sidebar-close{display:none;width:34px;height:34px;border:0;border-radius:9px;background:rgba(255,255,255,.07);color:#fff;font-size:24px;cursor:pointer}
.sidebar-nav{flex:1;overflow:auto;padding:18px 12px 24px}.nav-section{display:grid;gap:4px}.nav-section+.nav-section{margin-top:23px;padding-top:20px;border-top:1px solid rgba(255,255,255,.055)}.nav-section-label{padding:0 12px 8px;color:#68778f;font-size:10px;font-weight:800;letter-spacing:.08em}.nav-item{position:relative;display:flex;align-items:center;gap:11px;min-height:44px;padding:10px 12px;border-radius:11px;color:#aab5c5;font-size:13.5px;font-weight:650;transition:background .17s ease,color .17s ease,transform .17s ease}.nav-item:hover{background:rgba(255,255,255,.055);color:#f5f7fb;transform:translateX(-2px)}.nav-item.active{background:linear-gradient(90deg,rgba(91,91,214,.22),rgba(91,91,214,.10));color:#fff;box-shadow:inset -2px 0 #8585ff}.nav-item.active .nav-icon{color:#a9a9ff}.nav-icon{width:20px;height:20px;display:grid;place-items:center;color:#718096;flex:none}.nav-icon svg{width:19px;height:19px}.nav-live-dot{width:7px;height:7px;border-radius:50%;background:#20d489;box-shadow:0 0 0 4px rgba(32,212,137,.11);margin-right:auto}.nav-item-emphasis:not(.active) .nav-icon{color:#32a8ff}
.sidebar-footer{flex:none;padding:12px;border-top:1px solid rgba(255,255,255,.06);background:rgba(0,0,0,.08)}.sidebar-company,.sidebar-user{display:flex;align-items:center;gap:10px;padding:10px;border-radius:12px}.sidebar-company{background:rgba(255,255,255,.035);margin-bottom:6px}.sidebar-company>span:last-child,.user-copy{min-width:0;display:grid;gap:2px}.sidebar-company strong,.sidebar-user strong{font-size:12.5px;color:#e7edf6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-company small,.sidebar-user small{font-size:10.5px;color:#718096;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:ltr;text-align:right}.company-monogram,.user-avatar{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;flex:none;font-weight:800;background:rgba(255,255,255,.09);color:#e8ebff}.company-monogram{background:rgba(91,91,214,.20);color:#c8c8ff}.user-copy{flex:1}.logout-button{color:#8c99ad!important;background:transparent!important}.logout-button:hover{background:rgba(240,68,56,.13)!important;color:#ff8e86!important}

/* Top bar */
.topbar{position:sticky!important;top:0;z-index:60;height:72px!important;min-height:72px!important;padding:0 30px!important;margin:0!important;display:flex!important;flex-wrap:nowrap!important;align-items:center;justify-content:space-between;gap:20px;background:rgba(255,255,255,.88)!important;backdrop-filter:saturate(180%) blur(16px);border-bottom:1px solid rgba(224,228,235,.9)!important;box-shadow:none!important}.topbar-start,.topbar-actions{display:flex;align-items:center;gap:13px}.topbar-page{display:grid;gap:2px}.topbar-page strong{font-size:15px;color:#202939}.topbar-kicker{font-size:9.5px;color:#98a2b3;text-transform:uppercase;letter-spacing:.08em;font-weight:800}.icon-button{width:38px;height:38px;border:1px solid var(--line);border-radius:11px;background:#fff;color:#475467;display:grid;place-items:center;cursor:pointer;transition:.16s ease}.icon-button svg{width:18px;height:18px}.icon-button:hover{background:#f7f8fa;border-color:#d8dde6;color:#1d2939}.mobile-menu-button{display:none}.system-live{display:flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;background:#f6fef9;border:1px solid #d1fadf;color:#027a48;font-size:11.5px;font-weight:750}.system-live i{width:7px;height:7px;background:#12b76a;border-radius:50%;box-shadow:0 0 0 4px rgba(18,183,106,.09)}.topbar-profile{display:flex;align-items:center;gap:9px;padding:4px 7px 4px 10px;border-radius:12px;transition:.16s ease}.topbar-profile:hover{background:#f6f7f9}.topbar-profile>span:last-child{display:grid;gap:1px}.topbar-profile strong{font-size:12px}.topbar-profile small{font-size:10px;color:#98a2b3}.user-avatar.small{width:32px;height:32px;border-radius:10px;background:linear-gradient(135deg,#ececff,#ddddff);color:#4444b8}

/* Content shell */
.container.app-content{width:min(1500px,calc(100% - 56px));margin:0 auto;padding:30px 0 70px}.container.auth-container{width:100%;margin:0;min-height:100vh}.company-context{display:none!important}.hero{margin:0 0 22px!important;align-items:center!important;min-height:70px}.hero.compact{margin-bottom:18px!important}.hero h1{font-size:30px!important;letter-spacing:-.025em;color:#101828;margin:3px 0 7px!important}.hero .muted{font-size:13.5px;margin:0;max-width:780px;line-height:1.7}.eyebrow{color:#7777d9!important;font-size:10px!important;letter-spacing:.08em!important;font-weight:850!important;text-transform:uppercase}.hero>.btn,.hero>div+div{flex:none}

/* Buttons & form controls */
.btn{min-height:40px;padding:9px 14px!important;border:1px solid #d8dde6!important;background:#fff!important;color:#344054!important;border-radius:10px!important;font-size:13px!important;font-weight:750!important;box-shadow:var(--shadow-xs);gap:7px;transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease,background .14s ease}.btn:hover{transform:translateY(-1px);border-color:#c5ccd7!important;background:#fbfcfd!important;box-shadow:0 4px 10px rgba(16,24,40,.06)}.btn.primary{border-color:var(--accent)!important;background:linear-gradient(180deg,#6464df,#5353cd)!important;color:#fff!important;box-shadow:0 5px 12px rgba(91,91,214,.20)}.btn.primary:hover{background:linear-gradient(180deg,#5e5ed9,#4949c1)!important;box-shadow:0 7px 16px rgba(91,91,214,.25)}.btn.danger{color:#d92d20!important;background:#fff!important;border-color:#fecdca!important}.linkbtn{font-weight:700}.btn:disabled{opacity:.55;cursor:not-allowed;transform:none!important}
input,select,textarea{min-height:42px;border:1px solid #d9dee7!important;border-radius:10px!important;padding:10px 12px!important;background:#fff!important;color:#1d2939!important;font-size:13px!important;box-shadow:inset 0 1px 1px rgba(16,24,40,.015);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}textarea{line-height:1.65}input::placeholder,textarea::placeholder{color:#a1a9b6}input:hover,select:hover,textarea:hover{border-color:#c7ced9!important}input:focus,select:focus,textarea:focus{border-color:#8c8ce8!important;box-shadow:0 0 0 3px rgba(91,91,214,.10)!important;outline:none!important}label{color:#344054}.form-grid{gap:16px!important}.form-grid label,.user-filters label,.audit-filters label,.customer-filters label{font-size:12.5px!important;font-weight:750!important;color:#475467}.workflow-toggle input,.customer-entry-form input[type=checkbox]{accent-color:var(--accent)}

/* Panels */
.panel{border:1px solid var(--line)!important;border-radius:16px!important;background:rgba(255,255,255,.96)!important;padding:22px!important;margin-bottom:18px!important;box-shadow:var(--shadow-xs)}.panel:hover{border-color:#dfe3e9!important}.panel h2{font-size:17px;margin:0 0 7px!important;letter-spacing:-.012em}.panel h3{font-size:14px;margin-top:24px}.panel-head{gap:18px}.panel-head .muted{margin:3px 0 0;font-size:12.5px}.grid-2{gap:18px!important}.details{gap:12px 20px!important;font-size:13.5px}.details dt{font-size:12px;color:#7b8798!important}.details dd{color:#27364a}.mt{margin-top:22px!important}

/* Dashboard metrics */
.stats{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;margin-bottom:20px!important}.stats article{position:relative;overflow:hidden;border:1px solid var(--line)!important;border-radius:16px!important;padding:19px 20px!important;background:#fff!important;box-shadow:var(--shadow-xs);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.stats article:after{content:"";position:absolute;left:-16px;top:-25px;width:84px;height:84px;border-radius:50%;background:rgba(91,91,214,.045)}.stats article:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm);border-color:#dce0ea!important}.stats span{font-size:12px!important;color:#667085!important;font-weight:650}.stats strong{margin-top:8px!important;font-size:29px!important;letter-spacing:-.03em;color:#182230}.stats article:nth-child(2) strong{color:#175cd3}.stats article:nth-child(3) strong{color:#b54708}.stats article:nth-child(4) strong{color:#027a48}

/* Tables */
.table-wrap{border:1px solid #edf0f3;border-radius:12px;overflow:auto;background:#fff}.panel>.table-wrap{margin:4px -6px -6px}.panel>.table-wrap table{border-radius:12px}.table-wrap table{min-width:760px}th,td{padding:13px 14px!important;border-bottom:1px solid #edf0f3!important;font-size:12.8px!important;vertical-align:middle}thead th{position:sticky;top:0;z-index:1;background:#fafbfc!important;color:#7a8494!important;font-size:10.5px!important;font-weight:800!important;letter-spacing:.02em}tbody tr{transition:background .13s ease}tbody tr:hover{background:#fafbff!important}tbody tr:last-child td{border-bottom:0!important}.case-link{color:#4141b7!important;font-weight:800!important}.cell-detail{font-size:10.8px!important;color:#98a2b3!important}.empty{padding:38px!important;color:#98a2b3!important}.pagination{font-size:12px;color:#667085}

/* Status */
.status,.status-pill{min-height:26px;padding:5px 9px!important;border-radius:999px!important;font-size:10.5px!important;font-weight:800!important;letter-spacing:.01em;border:1px solid transparent}.status:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.72;margin-left:6px}.s-completed{background:#ecfdf3!important;color:#027a48!important;border-color:#d1fadf!important}.s-manual_review,.s-missing_information,.s-exception{background:#fffaeb!important;color:#b54708!important;border-color:#fef0c7!important}.s-cancelled{background:#fef3f2!important;color:#b42318!important;border-color:#fee4e2!important}.s-understood,.s-validated,.s-ready,.s-email_sent,.s-waiting_internal_response,.s-response_received{background:#eff8ff!important;color:#175cd3!important;border-color:#d1e9ff!important}

/* Alerts */
.alert{border-radius:11px!important;padding:11px 13px!important;font-size:12.5px;border:1px solid #e8ebf0;background:#f8fafc;color:#475467}.alert.success{background:#ecfdf3!important;color:#05603a!important;border-color:#abefc6}.alert.danger{background:#fef3f2!important;color:#b42318!important;border-color:#fecdca}.alert[role=status]{box-shadow:var(--shadow-xs)}

/* Timeline / records */
.event,.customer-record{border:1px solid var(--line)!important;border-radius:13px!important;background:#fff!important;box-shadow:var(--shadow-xs)}.event{padding:14px 15px!important}.event:hover,.customer-record:hover{border-color:#d9dee7!important}.customer-tabs{border-radius:13px!important;padding:6px!important;background:#f8fafc!important}.customer-tabs a{font-size:12px;font-weight:700}.customer-tabs a:hover{background:#fff!important;box-shadow:var(--shadow-xs)}
pre{background:#0d1526!important;border:1px solid #1f2b42;border-radius:13px!important;color:#d7dfeb!important}

/* Telegram full inbox */
.telegram-inbox-page{min-height:calc(100vh - 145px)}.telegram-inbox-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:0 0 18px}.telegram-inbox-heading h1{font-size:30px;letter-spacing:-.025em;margin:3px 0 7px}.telegram-inbox-heading .muted{margin:0;font-size:13px}.telegram-live-pill{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border-radius:999px;background:#f6fef9;border:1px solid #d1fadf;color:#027a48;font-size:11px;font-weight:800}.telegram-live-pill span{width:7px;height:7px;border-radius:50%;background:#12b76a;box-shadow:0 0 0 4px rgba(18,183,106,.09)}
.telegram-inbox-shell{display:grid!important;grid-template-columns:340px minmax(0,1fr)!important;height:calc(100vh - 188px)!important;min-height:620px!important;border:1px solid #dfe4eb!important;border-radius:18px!important;overflow:hidden!important;background:#fff!important;box-shadow:0 18px 48px rgba(16,24,40,.07)!important}.telegram-inbox-sidebar{min-width:0!important;background:#fbfcfe!important;border-left:1px solid #e6eaf0!important;display:flex;flex-direction:column}.telegram-inbox-search{padding:14px!important;display:flex!important;gap:8px!important;border-bottom:1px solid #edf0f3!important;background:#fff}.telegram-inbox-search input{background:#f8fafc!important}.telegram-inbox-search .btn{min-width:64px}.telegram-conversation-list{overflow:auto;flex:1;padding:8px}.telegram-conversation-item{display:flex!important;gap:11px!important;padding:12px!important;border:1px solid transparent!important;border-radius:12px!important;margin-bottom:4px!important;background:transparent!important;transition:.15s ease}.telegram-conversation-item:hover{background:#f4f6fb!important;border-color:#eef0f5!important}.telegram-conversation-item.active{background:#eeeeff!important;border-color:#dcdcfe!important;box-shadow:inset -3px 0 #6666d9}.telegram-list-avatar{width:42px!important;height:42px!important;min-width:42px!important;border-radius:13px!important;background:linear-gradient(135deg,#e9f7ff,#e9e8ff)!important;color:#4444b8!important;font-weight:850!important;display:grid!important;place-items:center!important}.telegram-list-copy{min-width:0;flex:1}.telegram-list-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.telegram-list-top strong{font-size:12.5px;color:#27364a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.telegram-list-top small{font-size:9px;color:#98a2b3;white-space:nowrap}.telegram-username{font-size:10px;color:#7b8798}.telegram-preview{display:block;margin-top:4px;font-size:11.2px;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.telegram-list-empty{text-align:center;padding:48px 20px;color:#667085}.telegram-list-empty strong{display:block;color:#344054;margin-bottom:6px}
.telegram-inbox-main{min-width:0;display:flex!important;flex-direction:column!important;background:#fff}.telegram-chat-header{min-height:76px!important;padding:12px 18px!important;border-bottom:1px solid #edf0f3!important;background:rgba(255,255,255,.94)!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important}.telegram-peer-large{padding:0!important}.telegram-avatar{width:40px!important;height:40px!important;border-radius:13px!important;background:linear-gradient(135deg,#e7f7ff,#e8e8ff)!important;color:#4141b7!important;box-shadow:none!important}.telegram-peer strong{font-size:13px}.telegram-peer small{font-size:10.5px;color:#98a2b3}.telegram-chat-actions{display:flex;gap:7px;flex-wrap:wrap}.telegram-chat-actions .btn{min-height:34px;padding:7px 10px!important;font-size:11.5px!important}
.telegram-inbox-thread{flex:1!important;min-height:0!important;overflow:auto!important;padding:22px clamp(18px,4vw,54px)!important;background:linear-gradient(180deg,#f8faff 0%,#fbfcfe 100%)!important;display:flex!important;flex-direction:column!important;gap:9px!important}.telegram-case-divider{display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;margin:9px 0!important;color:#98a2b3!important;font-size:10px!important}.telegram-case-divider:before,.telegram-case-divider:after{content:"";height:1px;flex:1;background:#e5e9ef}.telegram-case-divider a{color:#667085;font-weight:750}.telegram-message{display:flex!important;width:100%}.telegram-message.inbound{justify-content:flex-start!important}.telegram-message.outbound{justify-content:flex-end!important}.telegram-bubble{max-width:min(70%,680px)!important;padding:10px 13px!important;border-radius:15px 15px 15px 5px!important;background:#fff!important;border:1px solid #e5e9ef!important;box-shadow:0 2px 6px rgba(16,24,40,.04)!important}.telegram-message.outbound .telegram-bubble{background:linear-gradient(145deg,#5d5dd8,#4f4fc8)!important;color:#fff!important;border-color:#5151cb!important;border-radius:15px 15px 5px 15px!important;box-shadow:0 5px 14px rgba(91,91,214,.16)!important}.telegram-bubble p{font-size:12.8px!important;line-height:1.75!important;margin:0!important}.telegram-bubble small{display:block;margin-top:6px;font-size:9.5px;color:#98a2b3!important}.telegram-message.outbound .telegram-bubble small{color:#dadaff!important}
.telegram-ai-workbench{margin:0!important;padding:13px 16px!important;border:0!important;border-top:1px solid #e9edf2!important;border-radius:0!important;background:linear-gradient(180deg,#fbfbff,#f8f8ff)!important;box-shadow:none!important;gap:10px!important}.telegram-ai-head strong{font-size:13px!important}.telegram-ai-head small{font-size:10.5px!important}.telegram-ai-review-badge{background:#fff!important;border-color:#e3e3ff!important;color:#5353b6!important}.telegram-ai-actions .btn{min-height:34px!important;padding:7px 11px!important;font-size:11.5px!important}.telegram-ai-result{border-top-color:#e3e6ef!important}.telegram-ai-result textarea{background:#fff!important}.telegram-ai-status{font-size:11.5px!important}.telegram-inbox-composer{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:end!important;gap:10px!important;padding:13px 16px!important;border-top:1px solid #e8ecf1!important;background:#fff!important}.telegram-inbox-composer textarea{resize:none!important;min-height:44px!important;max-height:120px!important}.telegram-inbox-composer .btn{height:44px!important;min-width:108px}.telegram-readonly-note{padding:12px 16px;background:#f8fafc;color:#667085;font-size:12px;border-top:1px solid #edf0f3}.telegram-case-history{border-top:1px solid #edf0f3;padding:9px 16px;background:#fff}.telegram-case-history summary{font-size:11px;color:#667085;font-weight:750;cursor:pointer}.telegram-case-history-list{padding-top:8px}.telegram-inbox-placeholder{margin:auto;text-align:center;padding:40px;color:#98a2b3}.telegram-placeholder-icon{width:64px;height:64px;margin:0 auto 16px;border-radius:20px;display:grid;place-items:center;background:#f0f2ff;color:#5b5bd6;font-size:26px}

/* Telegram mini */
.telegram-mini-root{right:auto!important;left:20px!important;bottom:18px!important}.telegram-mini-panel{border:1px solid #dce2e9!important;border-radius:17px!important;box-shadow:0 22px 60px rgba(16,24,40,.22)!important;overflow:hidden}.telegram-mini-header{background:linear-gradient(135deg,#121c31,#0b1220)!important}.telegram-mini-launcher{background:linear-gradient(135deg,#5f5fda,#4a4ac4)!important;border:1px solid rgba(255,255,255,.14)!important;box-shadow:0 14px 30px rgba(66,66,190,.28)!important}.telegram-mini-launcher-icon svg{width:16px;height:16px}.telegram-mini-list-item{border-color:#e9edf2!important}.telegram-mini-list-item.active{background:#eeeeff!important;border-color:#dadaff!important}.telegram-mini-message.outbound .telegram-mini-bubble{background:#5555cf!important;border-color:#5555cf!important}

/* Filters and settings */
.user-filters,.customer-filters,.audit-filters{padding:14px;border:1px solid #edf0f3;border-radius:13px;background:#fafbfc;margin-bottom:12px}.settings-pair{gap:16px!important}.setup-grid{gap:16px!important}.setup-card{border-radius:15px!important}.link-command{background:#f8fafc!important;border-color:#e4e7ec!important;border-radius:10px!important}.telegram-settings,.customer-basic{max-width:820px!important}

/* Auth */
body.app-guest{padding:0;background:#09111f}.auth-container{display:grid!important;place-items:stretch!important;padding:0!important}.auth-layout{min-height:100vh;display:grid;grid-template-columns:minmax(380px,.82fr) minmax(520px,1.18fr);background:#fff}.auth-panel{display:flex;align-items:center;justify-content:center;padding:48px;background:#fff}.auth-card{width:min(440px,100%)!important;border:0!important;border-radius:0!important;padding:0!important;box-shadow:none!important;background:transparent!important}.auth-brand{margin-bottom:34px!important}.auth-brand .brand-mark{width:44px;height:44px;border-radius:14px;background:linear-gradient(135deg,#6868e3,#4b4bc5)}.auth-card h1{font-size:28px;letter-spacing:-.03em;margin:0 0 8px!important}.auth-card>.muted{font-size:13px}.auth-card .form-grid{margin-top:28px!important}.auth-card .form-grid label{font-size:12.5px}.auth-card .btn.primary{height:44px;margin-top:2px}.auth-visual{position:relative;overflow:hidden;padding:64px;display:flex;flex-direction:column;justify-content:space-between;background:radial-gradient(circle at 20% 20%,rgba(114,114,255,.28),transparent 34%),radial-gradient(circle at 85% 78%,rgba(20,184,166,.14),transparent 31%),linear-gradient(145deg,#0b1220,#111c33 58%,#0c1425);color:#fff}.auth-visual:before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:42px 42px;mask-image:linear-gradient(to bottom,black,transparent 80%)}.auth-visual>*{position:relative;z-index:1}.auth-visual-badge{align-self:flex-start;padding:7px 10px;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:rgba(255,255,255,.06);backdrop-filter:blur(8px);font-size:11px;color:#c8d3e3}.auth-visual-copy{max-width:620px}.auth-visual-copy h2{font-size:clamp(34px,4vw,58px);line-height:1.12;margin:0 0 18px;letter-spacing:-.045em}.auth-visual-copy p{color:#a7b4c7;line-height:1.9;font-size:15px;max-width:560px}.auth-feature-row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:34px}.auth-feature{padding:16px;border:1px solid rgba(255,255,255,.09);border-radius:14px;background:rgba(255,255,255,.045);backdrop-filter:blur(8px)}.auth-feature strong{display:block;font-size:12px;margin-bottom:4px}.auth-feature small{color:#8290a5;font-size:10.5px;line-height:1.5}

/* AJAX layer */
#ajax-progress{right:var(--sidebar-w)!important;background:transparent!important}#ajax-progress span{background:linear-gradient(90deg,#7777ff,#51a8ff)!important}.ajax-toast-region{left:20px!important;right:auto!important}.ajax-toast{border-radius:13px!important;box-shadow:0 18px 46px rgba(16,24,40,.22)!important}.ajax-live-status{display:none!important}

/* Responsive */
.app-overlay{display:none}
@media(max-width:1120px){
  :root{--sidebar-w:246px}.container.app-content{width:calc(100% - 36px)}.telegram-inbox-shell{grid-template-columns:300px minmax(0,1fr)!important}.topbar{padding:0 22px!important}.topbar-profile>span:last-child{display:none}
}
@media(max-width:900px){
  body.app-authenticated{padding-right:0}.app-sidebar{transform:translateX(105%);transition:transform .22s ease;width:min(292px,86vw);box-shadow:-20px 0 60px rgba(0,0,0,.28)}body.sidebar-open .app-sidebar{transform:none}.app-overlay{display:block;position:fixed;inset:0;background:rgba(8,15,27,.48);backdrop-filter:blur(2px);z-index:70;opacity:0;pointer-events:none;transition:.2s ease}body.sidebar-open .app-overlay{opacity:1;pointer-events:auto}.sidebar-close{display:grid;place-items:center}.mobile-menu-button{display:grid}.topbar{padding:0 16px!important}.container.app-content{width:calc(100% - 28px);padding-top:22px}.system-live{display:none}.telegram-inbox-shell{grid-template-columns:280px minmax(0,1fr)!important}.stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}#ajax-progress{right:0!important}
}
@media(max-width:720px){
  .topbar{height:64px!important;min-height:64px!important}.topbar-page strong{font-size:13px}.topbar-kicker,.topbar-notification{display:none}.container.app-content{width:calc(100% - 20px);padding:18px 0 90px}.hero{align-items:flex-start!important;flex-direction:column!important;gap:13px!important}.hero h1,.telegram-inbox-heading h1{font-size:25px!important}.panel{padding:16px!important;border-radius:14px!important}.stats{gap:10px!important}.stats article{padding:15px!important}.stats strong{font-size:24px!important}.telegram-inbox-heading{align-items:flex-start;flex-direction:column}.telegram-inbox-shell{display:block!important;height:auto!important;min-height:0!important;border-radius:14px!important}.telegram-inbox-sidebar{border-left:0!important;border-bottom:1px solid #e6eaf0!important;max-height:300px}.telegram-conversation-list{display:flex;overflow-x:auto;overflow-y:hidden;gap:6px}.telegram-conversation-item{flex:0 0 235px;margin:0!important}.telegram-inbox-main{min-height:640px}.telegram-chat-header{padding:10px 12px!important}.telegram-chat-actions .btn{font-size:10.5px!important}.telegram-inbox-thread{min-height:360px!important;padding:16px 12px!important}.telegram-bubble{max-width:88%!important}.telegram-ai-head{flex-direction:column}.telegram-ai-actions{display:grid!important;grid-template-columns:1fr 1fr}.telegram-ai-actions .btn:first-child{grid-column:1/-1}.telegram-inbox-composer{padding:10px!important}.telegram-mini-root{left:8px!important;right:8px!important}.auth-layout{grid-template-columns:1fr}.auth-visual{display:none}.auth-panel{padding:32px 20px}.ajax-toast-region{left:10px!important;right:10px!important;width:auto!important}
}
@media(max-width:480px){
  .topbar-profile{display:none}.topbar-actions{gap:6px}.container.app-content{width:calc(100% - 16px)}.stats{grid-template-columns:1fr 1fr!important}.stats article:after{display:none}.panel>.table-wrap{margin:4px 0 0}.user-filters,.customer-filters,.audit-filters{padding:10px}.telegram-conversation-item{flex-basis:205px}.telegram-list-avatar{width:38px!important;height:38px!important;min-width:38px!important}.telegram-chat-header{align-items:flex-start!important;flex-direction:column!important}.telegram-ai-actions{grid-template-columns:1fr}.telegram-ai-actions .btn:first-child{grid-column:auto}.telegram-inbox-composer{grid-template-columns:1fr!important}.telegram-inbox-composer .btn{width:100%}.telegram-inbox-main{min-height:700px}.auth-card h1{font-size:25px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Dashboard composition */
.dashboard-hero-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.dashboard-stats article small{display:block;margin-top:4px;color:#a0a8b5;font-size:10.5px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,.45fr);gap:18px;align-items:start}.dashboard-cases-panel{min-width:0;margin-bottom:0!important}.dashboard-cases-panel .panel-head{margin-bottom:14px}.dashboard-text-link{font-size:11.5px;color:#5555c6;font-weight:800;white-space:nowrap}.dashboard-text-link:hover{color:#3535a4}.dashboard-side-stack{display:grid;gap:18px}.dashboard-side-stack .panel{margin:0!important}.quick-action-list{display:grid;gap:7px;margin-top:14px}.quick-action-list a{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;border:1px solid transparent;border-radius:12px;transition:.16s ease}.quick-action-list a:hover{background:#f7f8ff;border-color:#e7e7ff;transform:translateX(-2px)}.quick-action-icon{width:38px;height:38px;border-radius:11px;background:#f1f2ff;color:#5555c6;display:grid;place-items:center;font-size:14px}.quick-action-list a>span:nth-child(2){display:grid;gap:2px}.quick-action-list strong{font-size:12.3px;color:#344054}.quick-action-list small{font-size:10.3px;color:#98a2b3}.quick-action-list b{color:#a0a8b5;font-size:13px}.ops-health-card{background:linear-gradient(145deg,#111b31,#0c1425)!important;border-color:#17243c!important;color:#fff}.ops-health-head{display:flex;align-items:center;gap:10px}.ops-health-head>div{display:grid;gap:2px}.ops-health-head strong{font-size:12.5px}.ops-health-head small{font-size:10px;color:#8090a9}.ops-health-dot{width:9px;height:9px;border-radius:50%;background:#20d489;box-shadow:0 0 0 5px rgba(32,212,137,.11)}.ops-health-card p{font-size:11px;line-height:1.7;color:#8795aa;margin:12px 0 0}.channel-chip{display:inline-flex;padding:4px 8px;border-radius:8px;background:#f5f7fa;color:#667085;font-size:10.5px;font-weight:700}
@media(max-width:1180px){.dashboard-grid{grid-template-columns:1fr}.dashboard-side-stack{grid-template-columns:1fr 1fr}.dashboard-side-stack .ops-health-card{min-height:100%}}
@media(max-width:720px){.dashboard-side-stack{grid-template-columns:1fr}.dashboard-hero-actions{width:100%}.dashboard-hero-actions .btn{flex:1}.dashboard-text-link{display:none}}
.quick-action-icon svg{width:18px;height:18px}
