:root{--primary: #22c55e;--primary-dark: #16a34a;--accent: #14b8a6;--bg: #0b0f14;--surface: #151a21;--surface-2: #1c222b;--input: #10151c;--text: #ffffff;--text-2: #9aa4b2;--muted: #6b7280;--border: #2a3340;--error: #ef4444;--chat-bg: #0b141a;--in-bubble: #202c33;--out-bubble: #005c4b;--blue: #53bdeb}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:15px}button{font:inherit;color:inherit;cursor:pointer}input{font:inherit;color:inherit}button:disabled{opacity:.5;cursor:not-allowed}.muted{color:var(--text-2)}.small{font-size:12px}.accent{color:var(--primary)}.auth-screen{min-height:100%;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 50% 0%,#10251c 0%,var(--bg) 55%)}.auth-card{width:100%;max-width:400px;background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:32px 28px;display:flex;flex-direction:column;gap:14px}.auth-card h1{margin:0;text-align:center;font-size:26px}.auth-logo{width:72px;height:72px;border-radius:18px;align-self:center}.auth-tagline{margin:0;text-align:center;color:var(--text-2)}.auth-motto{margin:0 0 8px;text-align:center;font-weight:600}.field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}.field>span{font-size:13px;color:var(--text-2)}.field input,.input-row{background:var(--input);border:1px solid var(--border);border-radius:12px;padding:12px 14px;outline:none}.field input:focus,.input-row:focus-within{border-color:var(--primary)}.input-row{display:flex;align-items:center;padding:0 12px 0 0}.input-row input{flex:1;border:0;background:transparent}.input-row input:focus{border:0}.btn-primary{background:linear-gradient(90deg,var(--primary),var(--accent));color:#04130a;font-weight:700;border:0;border-radius:12px;padding:13px 18px;width:100%}.btn-ghost{background:transparent;border:1px solid var(--border);border-radius:12px;padding:12px 18px;width:100%;margin-top:8px}.btn-row{display:flex;gap:10px;margin-top:8px}.btn-row .btn-ghost{margin-top:0}.link-btn{background:none;border:0;color:var(--primary);padding:4px 8px}.error-box{background:#ef44441f;border:1px solid rgba(239,68,68,.4);color:#fca5a5;border-radius:10px;padding:10px 12px;font-size:14px;margin-bottom:8px}.org-list{display:flex;flex-direction:column;gap:8px}.org-item{display:flex;align-items:center;gap:12px;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:12px;text-align:left}.org-item:hover:not(:disabled){border-color:var(--primary)}.org-name{flex:1;font-weight:600}.pill{background:#22c55e26;color:var(--primary);border-radius:999px;padding:2px 10px;font-size:12px;align-self:flex-start}.avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;font-weight:700;color:#fff;flex-shrink:0}.online-dot{position:absolute;right:0;bottom:0;width:11px;height:11px;border-radius:50%;background:var(--primary);border:2px solid var(--surface)}.app-shell{display:flex;height:100%}.sidebar{width:380px;max-width:100%;background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;flex-shrink:0}.main-pane{flex:1;min-width:0;display:flex;background:var(--chat-bg)}.sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px}.account-btn{display:flex;align-items:center;gap:10px;background:none;border:0;padding:0;text-align:left;min-width:0}.account-text{display:flex;flex-direction:column;min-width:0}.account-text strong,.account-text small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:170px}.account-text small{color:var(--text-2)}.head-actions{display:flex;gap:4px}.icon-btn{background:none;border:0;width:36px;height:36px;border-radius:50%;font-size:18px;display:inline-grid;place-items:center}.icon-btn:hover{background:var(--surface-2)}.icon-btn.accent{color:var(--primary)}.search-wrap{padding:0 14px 10px}.search-wrap input{width:100%;background:var(--input);border:1px solid var(--border);border-radius:999px;padding:10px 16px;outline:none}.search-wrap input:focus{border-color:var(--primary)}.tabs{display:flex;gap:6px;padding:0 14px 10px;overflow-x:auto}.tab{background:var(--surface-2);border:1px solid transparent;border-radius:999px;padding:6px 14px;color:var(--text-2);white-space:nowrap;font-size:13px}.tab.active{background:#22c55e26;color:var(--primary);border-color:#22c55e66}.chat-list{flex:1;overflow-y:auto}.list-note{text-align:center;color:var(--text-2);padding:24px 16px}.list-note.error{color:#fca5a5}.chat-item{display:flex;align-items:center;gap:12px;padding:10px 14px;cursor:pointer;position:relative;border-bottom:1px solid rgba(42,51,64,.5)}.chat-item:hover,.chat-item.selected{background:var(--surface-2)}.chat-meta{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.row{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-title{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-time{font-size:12px;color:var(--text-2);flex-shrink:0}.chat-time.unread{color:var(--primary)}.chat-preview{color:var(--text-2);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.badge{background:var(--primary);color:#04130a;border-radius:999px;min-width:20px;height:20px;padding:0 6px;font-size:12px;font-weight:700;display:inline-grid;place-items:center;flex-shrink:0}.row-action{display:none;position:absolute;right:10px;top:8px;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:2px 8px}.chat-item:hover .row-action{display:block}.empty-main{margin:auto;text-align:center;color:var(--text-2);padding:24px}.empty-main img{width:88px;border-radius:22px;opacity:.9}.empty-main h2{color:var(--text);margin-bottom:4px}.conversation{flex:1;display:flex;flex-direction:column;min-width:0;position:relative}.conv-head{display:flex;align-items:center;gap:12px;padding:10px 14px;background:var(--surface);border-bottom:1px solid var(--border)}.conv-title{flex:1;display:flex;flex-direction:column;min-width:0}.conv-title small{color:var(--text-2)}.back-btn{display:none}.messages{flex:1;overflow-y:auto;padding:16px clamp(12px,6%,80px);display:flex;flex-direction:column;gap:4px}.day-chip{text-align:center;margin:10px 0}.day-chip span{background:var(--surface-2);color:var(--text-2);border-radius:8px;padding:4px 12px;font-size:12px}.bubble-row{display:flex}.bubble-row.mine{justify-content:flex-end}.bubble{max-width:min(520px,80%);padding:7px 10px 5px;border-radius:10px;background:var(--in-bubble);word-break:break-word}.mine .bubble{background:var(--out-bubble)}.bubble-text{margin:0;white-space:pre-wrap}.bubble-meta{display:flex;gap:4px;justify-content:flex-end;font-size:11px;color:#fff9;margin-top:2px}.tick.read{color:var(--blue)}.tick.failed{color:var(--error);font-weight:700}.media{display:block;max-width:100%;max-height:340px;border-radius:8px;margin-bottom:4px}audio{max-width:100%;height:40px}.file-card{display:flex;gap:10px;align-items:center;background:#0003;border-radius:8px;padding:10px;color:inherit;text-decoration:none;margin-bottom:4px}.file-ext{background:var(--primary-dark);border-radius:6px;padding:6px 8px;font-size:11px;font-weight:700}.file-info{display:flex;flex-direction:column;min-width:0}.file-info strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-info small{color:var(--text-2)}.location-card{display:flex;flex-direction:column;gap:4px;background:#0003;border-radius:8px;padding:10px;margin-bottom:4px}.location-card a{color:var(--blue)}.window-banner{background:#3a2a0a;color:#fbbf24;padding:8px 16px;font-size:13px;text-align:center}.composer{display:flex;align-items:center;gap:8px;padding:10px 14px;background:var(--surface);border-top:1px solid var(--border)}.composer-input{flex:1;background:var(--input);border:1px solid var(--border);border-radius:999px;padding:11px 16px;outline:none}.composer-input:focus{border-color:var(--primary)}.send-btn{width:42px;height:42px;border-radius:50%;border:0;background:var(--primary);color:#04130a;font-size:16px}.attach-wrap{position:relative}.attach-menu{position:absolute;bottom:46px;left:0;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:6px;display:flex;flex-direction:column;min-width:140px;z-index:5}.attach-menu button{background:none;border:0;text-align:left;padding:9px 12px;border-radius:8px}.attach-menu button:hover{background:var(--surface)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:grid;place-items:center;padding:16px;z-index:50}.modal{background:var(--surface);border:1px solid var(--border);border-radius:16px;width:100%;max-width:420px;max-height:90vh;display:flex;flex-direction:column}.modal.wide{max-width:560px}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px 0}.modal-head h3{margin:0}.modal-body{padding:14px 18px 18px;overflow-y:auto}.profile{display:flex;flex-direction:column;gap:4px;margin-bottom:14px}.menu-btn{display:block;width:100%;text-align:left;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:13px 14px;margin-bottom:8px}.menu-btn.danger{color:#fca5a5}.template-list{display:flex;flex-direction:column;gap:8px}.template-item{display:flex;flex-direction:column;gap:4px;text-align:left;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:12px}.template-item:hover{border-color:var(--primary)}.template-body{color:var(--text-2);font-size:13px;white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.template-preview{background:var(--out-bubble);border-radius:10px;padding:12px;white-space:pre-wrap;margin-bottom:14px;display:flex;flex-direction:column;gap:6px}.template-preview small{color:#fff9}.preview-img{max-width:100%;max-height:240px;border-radius:10px;margin-bottom:12px}.file-name{word-break:break-all;color:var(--text-2)}.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%);background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:10px 16px;z-index:60;max-width:90vw;box-shadow:0 8px 24px #0006}@media (max-width: 820px){.sidebar{width:100%;border-right:0}.main-pane,.app-shell.has-selection .sidebar{display:none}.app-shell.has-selection .main-pane{display:flex}.back-btn{display:inline-grid}}.icon-btn.logout{color:#fca5a5}.phone-row{padding:0}.phone-row select{background:transparent;border:0;border-right:1px solid var(--border);padding:12px;color:var(--text);outline:none;font-weight:700}.phone-row select option{background:var(--surface)}.phone-row input{padding:12px 14px}.template-field{display:flex;align-items:center;gap:10px;text-align:left;width:100%;background:var(--input);border:1px solid var(--border);border-radius:12px;padding:12px 14px}.template-field:hover{border-color:var(--primary)}.tf-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.tf-text small{color:var(--text-2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.policy-banner{display:flex;gap:10px;background:var(--input);border:1px solid var(--border);border-radius:12px;padding:12px;font-size:12px;color:var(--text-2);margin-bottom:14px;line-height:1.4}.policy-icon{background:var(--primary);color:#fff;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:700;flex-shrink:0}.confirm-text{margin:4px 0 16px;color:var(--text-2)}.btn-danger{flex:1;background:var(--error);color:#fff;font-weight:700;border:0;border-radius:12px;padding:12px 18px}.btn-row .btn-ghost{flex:1}.layout{display:flex;height:100%}.layout-content{flex:1;min-width:0;height:100%;overflow:hidden;display:flex;flex-direction:column}.layout-content>.app-shell{flex:1;min-height:0}.rail{width:76px;background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;align-items:center;padding:12px 0;gap:8px;flex-shrink:0}.rail-logo{width:40px;height:40px;border-radius:10px;margin-bottom:8px}.rail-items,.rail-foot{display:flex;flex-direction:column;gap:4px;width:100%;padding:0 8px}.rail-items{flex:1}.rail-item{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 4px;border-radius:12px;background:none;border:0;color:var(--text-2);text-decoration:none;font-size:11px}.rail-item:hover{background:var(--surface-2);color:var(--text)}.rail-item.active{background:#22c55e26;color:var(--primary)}.rail-item.logout{color:#fca5a5}.rail-icon{font-size:20px;line-height:1}.page{flex:1;overflow-y:auto;padding:24px clamp(16px,3vw,40px) 40px;display:flex;flex-direction:column;gap:16px}.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}.page-head h1{margin:0 0 4px;font-size:24px}.page-head p{margin:0}.page-actions{display:flex;gap:8px}.btn-small{background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:8px 14px;font-size:13px;color:var(--text);text-decoration:none;display:inline-block}.btn-small:hover{border-color:var(--primary)}.btn-small.primary{background:var(--primary);color:#04130a;border-color:var(--primary);font-weight:700}.stat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:4px}.stat-card.warn{border-color:#f59e0b80}.stat-label{color:var(--text-2);font-size:13px}.stat-value{font-size:28px}.stat-hint{color:var(--muted);font-size:12px}.card{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:16px}.card h3{margin:0 0 12px;font-size:16px}.card-head{display:flex;justify-content:space-between;align-items:center}.grid-2{display:grid;grid-template-columns:2fr 1fr;gap:12px}.legend{font-size:12px;color:var(--text-2);display:flex;align-items:center;gap:6px}.dot{display:inline-block;width:8px;height:8px;border-radius:50%}.dot.ok{background:var(--primary)}.dot.fail{background:var(--error)}.bars{display:flex;align-items:flex-end;gap:10px;height:190px}.bar-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;height:100%}.bar-track{flex:1;width:100%;max-width:44px;display:flex;flex-direction:column-reverse;justify-content:flex-start;background:var(--surface-2);border-radius:8px;overflow:hidden}.bar-fill.ok{background:var(--primary)}.bar-fill.fail{background:var(--error)}.bar-num{font-size:12px;color:var(--text-2)}.bar-day{font-size:12px;color:var(--muted)}.hbar{display:grid;grid-template-columns:80px 1fr 36px;align-items:center;gap:8px;margin-bottom:8px;font-size:13px}.hbar-label{text-transform:capitalize;color:var(--text-2)}.hbar-track{background:var(--surface-2);border-radius:6px;height:10px;overflow:hidden}.hbar-fill{background:var(--accent);height:100%}.hbar-num{text-align:right;color:var(--text-2)}.table-wrap{overflow-x:auto}.table{width:100%;border-collapse:collapse;font-size:14px}.table th{text-align:left;color:var(--text-2);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.4px;padding:8px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.table td{padding:10px 12px;border-bottom:1px solid rgba(42,51,64,.5);vertical-align:middle}.table tr:last-child td{border-bottom:0}.cell-clip{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag{background:var(--surface-2);border-radius:6px;padding:2px 8px;font-size:12px;text-transform:capitalize}.tag.role-1{background:#a855f72e;color:#d8b4fe}.tag.role-2{background:#3b82f62e;color:#93c5fd}.ok-text{color:var(--primary)}.err-text{color:#fca5a5}.user-cell{display:flex;align-items:center;gap:10px}.user-cell>div{display:flex;flex-direction:column}.filters{display:flex;gap:8px;flex-wrap:wrap}.filters input,.filters select{background:var(--input);border:1px solid var(--border);border-radius:10px;padding:10px 14px;outline:none;color:var(--text)}.filters input{flex:1;min-width:220px}.filters input:focus,.filters select:focus{border-color:var(--primary)}.org-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}.org-card{display:flex;flex-direction:column;gap:14px}.org-card-head{display:flex;align-items:center;gap:12px}.org-card-head>div{display:flex;flex-direction:column;flex:1;min-width:0}.org-stats{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:var(--text-2)}@media (max-width: 820px){.layout.with-rail{flex-direction:column-reverse}.rail{width:100%;flex-direction:row;padding:4px 8px;border-right:0;border-top:1px solid var(--border);justify-content:space-around}.rail-logo{display:none}.rail-items,.rail-foot{flex-direction:row;padding:0;width:auto}.rail-items{flex:1;justify-content:space-around}.grid-2{grid-template-columns:1fr}}.actions-cell{white-space:nowrap;display:flex;gap:6px}.actions-cell{display:flex;gap:6px;white-space:nowrap}.success-box{background:#22c55e1f;border:1px solid rgba(34,197,94,.4);color:#86efac;border-radius:10px;padding:10px 12px;font-size:14px}.select{background:var(--input);border:1px solid var(--border);border-radius:12px;padding:12px 14px;color:var(--text);outline:none}@keyframes spin{to{transform:rotate(360deg)}}@keyframes shimmer{0%{background-position:-200px 0}to{background-position:calc(200px + 100%) 0}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.spinner-wrap{display:inline-flex;align-items:center;gap:10px}.spinner{display:inline-block;border-style:solid;border-color:#22c55e33;border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite}.spinner-label{color:var(--text-2);font-size:14px}.page-loader{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:60px 16px;color:var(--text-2);animation:fade-in .3s ease}.sk{display:block;border-radius:8px;background:linear-gradient(90deg,var(--surface-2) 0px,#262e3a 100px,var(--surface-2) 200px);background-size:200px 100%;background-repeat:no-repeat;background-color:var(--surface-2);animation:shimmer 1.3s ease-in-out infinite}.sk-line{height:12px}.sk-line.short{height:10px}.sk-avatar{width:46px;height:46px;border-radius:50%;flex-shrink:0}.sk-avatar.sm{width:34px;height:34px}.sk-stat{height:28px;width:40%;margin-top:8px}.sk-block{height:190px;width:100%;border-radius:12px}.sk-btn{height:34px;width:150px;border-radius:10px}.sk-lines{flex:1;display:flex;flex-direction:column;gap:9px;min-width:0}.sk-chat{display:flex;align-items:center;gap:12px;padding:12px 14px}.sk-list,.sk-table,.sk-dashboard{animation:fade-in .3s ease}.sk-dashboard,.sk-table{display:flex;flex-direction:column;gap:16px}.sk-row{display:flex;align-items:center;gap:24px}.sk-messages{display:flex;flex-direction:column;gap:10px;padding:8px 0}.sk-bubble-row{display:flex}.sk-bubble-row.mine{justify-content:flex-end}.sk-bubble{border-radius:12px}.btn-spin{display:inline-block;width:16px;height:16px;border:2px solid rgba(4,19,10,.3);border-top-color:#04130a;border-radius:50%;animation:spin .7s linear infinite;vertical-align:-3px;margin-right:8px}.splash{height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:#0b0f14}.splash img{width:72px;height:72px;border-radius:18px}.splash .spinner{width:28px;height:28px;border-width:3px}.btn-spin.dark{border-color:#ffffff40;border-top-color:var(--primary)}
