:root{--bg: #0b0d10;--bg-elevated: #12151a;--bg-panel: #0f1217;--bg-hover: #1a1f27;--bg-sidebar: #0f1217;--bg-nav-active: #1a1f27;--border: #222832;--text: #e8eaed;--text-muted: #8b93a1;--accent: #2f6fed;--accent-soft: rgba(47, 111, 237, .15);--success: #22c55e;--danger: #ef4444;--warning: #f59e0b;--radius: 10px;--sidebar-w: 248px;--list-w: 340px;font-family:DM Sans,system-ui,sans-serif;color:var(--text);background:var(--bg)}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%}button,input,select,textarea{font:inherit;color:inherit}a{color:inherit;text-decoration:none}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#2a313c;border-radius:8px}.app-shell{display:grid;grid-template-columns:var(--sidebar-w) 1fr;height:100%;background:var(--bg)}.sidebar{display:flex;flex-direction:column;border-right:none;background:var(--bg-sidebar);padding:20px 14px}.brand{font-family:Syne,sans-serif;font-weight:800;font-size:1.55rem;letter-spacing:-.03em;padding:4px 12px 28px;color:#fff}.nav{display:flex;flex-direction:column;gap:4px;flex:1}.nav-link,.nav a,.nav button.nav-item{display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:10px;color:#ffffffe0;background:transparent;border:none;cursor:pointer;text-align:left;width:100%;font-size:.95rem;font-weight:450;transition:background .15s ease,color .15s ease}.nav-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex-shrink:0;opacity:.95}.nav-label{line-height:1.2}.nav-link:hover,.nav a:hover,.nav button.nav-item:hover{background:#ffffff0f;color:#fff}.nav-link.active,.nav a.active{background:var(--bg-nav-active);color:#fff;box-shadow:none}.sidebar-footer{display:flex;flex-direction:column;gap:4px;border-top:none;padding-top:10px;margin-top:12px}.sidebar-footer .nav-link{color:#ffffffb8}.user-chip{display:flex;align-items:center;gap:10px;padding:10px 12px}.avatar{width:32px;height:32px;border-radius:50%;background:var(--accent);display:grid;place-items:center;font-weight:700;font-size:.85rem}.main{min-width:0;min-height:0;height:100%}.page{height:100%;padding:24px;overflow:auto}.page h1{font-family:Syne,sans-serif;font-size:1.5rem;margin-bottom:8px}.muted{color:var(--text-muted)}.card{background:var(--bg-elevated);border:1px solid var(--border);border-radius:var(--radius);padding:16px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:8px 14px;border-radius:8px;border:1px solid var(--border);background:var(--bg-hover);cursor:pointer;white-space:nowrap}.btn:hover{filter:brightness(1.08)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:transparent;color:#fff;font-weight:600}.btn-danger{background:#ef444426;border-color:#ef444459;color:#fecaca}.btn-ghost{background:transparent}.input,.select,.textarea{width:100%;padding:10px 12px;border-radius:8px;border:1px solid var(--border);background:var(--bg);outline:none}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent)}.login-page{min-height:100%;display:grid;place-items:center;background:radial-gradient(900px 500px at 50% -20%,rgba(47,111,237,.2),transparent 60%),var(--bg)}.login-card{width:min(400px,92vw);padding:28px;background:var(--bg-elevated);border:1px solid var(--border);border-radius:16px}.login-card h1{font-family:Syne,sans-serif;font-size:2rem;margin-bottom:4px}.form-stack{display:flex;flex-direction:column;gap:12px;margin-top:20px}.form-stack label{display:flex;flex-direction:column;gap:6px;font-size:.9rem;color:var(--text-muted)}.error{color:#fecaca;background:#ef44441f;border:1px solid rgba(239,68,68,.3);padding:8px 10px;border-radius:8px;font-size:.9rem}.conv-layout{display:grid;grid-template-columns:var(--list-w) 1fr;height:100%;min-height:0}.conv-list{border-right:1px solid var(--border);background:var(--bg-panel);display:flex;flex-direction:column;min-height:0}.conv-list-header{padding:16px 14px 10px;display:flex;align-items:center;justify-content:space-between}.conv-list-header h2{font-family:Syne,sans-serif;font-size:1.15rem}.tabs{display:flex;gap:4px;padding:8px 12px}.tab{flex:1;padding:8px;border:none;border-radius:8px;background:transparent;color:var(--text-muted);cursor:pointer;font-weight:500}.tab.active{background:var(--accent);color:#fff}.search-wrap{padding:0 12px 10px}.conv-items{flex:1;overflow:auto;padding:4px 8px 12px}.conv-item{width:100%;text-align:left;border:none;background:transparent;padding:12px 10px;border-radius:10px;cursor:pointer;display:flex;flex-direction:column;gap:4px}.conv-item:hover{background:var(--bg-hover)}.conv-item.active{background:var(--accent-soft)}.conv-item-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}.conv-item-name{font-weight:600;font-size:.95rem}.conv-item-time{font-size:.75rem;color:var(--text-muted)}.conv-item-preview{font-size:.82rem;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tag-row{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.tag{font-size:.7rem;padding:2px 7px;border-radius:999px;background:#ffffff0f;border:1px solid var(--border)}.empty-list{padding:40px 16px;text-align:center;color:var(--text-muted)}.conv-thread{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;background:linear-gradient(180deg,#12151a66,#0b0d10e6)}.thread-empty{flex:1;display:grid;place-items:center;color:var(--text-muted);gap:12px;text-align:center}.bubble-art{width:88px;height:72px;position:relative;opacity:.85}.bubble-art span{position:absolute;background:#1c2430;border:1px solid var(--border);border-radius:16px}.bubble-art span:nth-child(1){width:52px;height:36px;left:0;top:18px}.bubble-art span:nth-child(2){width:46px;height:32px;right:0;top:0;background:#243044}.thread-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--border);background:#0f1217d9}.thread-header h3{font-size:1.05rem}.thread-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.messages{flex:1;overflow:auto;padding:18px;display:flex;flex-direction:column;gap:10px}.msg{max-width:min(70%,520px);padding:10px 12px;border-radius:12px;font-size:.95rem;line-height:1.4;white-space:pre-wrap;word-break:break-word}.msg.in{align-self:flex-start;background:#1a2030;border:1px solid var(--border)}.msg.out{align-self:flex-end;background:#1e3a8a;border:1px solid #2563eb}.msg-body{white-space:pre-wrap;word-break:break-word}.msg-meta{margin-top:4px;font-size:.7rem;color:#ffffff8c}.composer{display:flex;gap:10px;padding:14px 16px;border-top:1px solid var(--border);background:#0f1217f2}.composer .textarea{min-height:44px;max-height:120px;resize:none}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:18px 0}.stat-card h3{font-size:.85rem;color:var(--text-muted);font-weight:500;margin-bottom:8px}.stat-card .value{font-family:Syne,sans-serif;font-size:1.8rem}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--border);font-size:.92rem}.table th{color:var(--text-muted);font-weight:500}.qr-box{display:inline-block;padding:12px;background:#fff;border-radius:12px}.qr-box img{display:block;width:240px;height:240px}.status-pill{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:.8rem;border:1px solid var(--border)}.status-pill.ok{color:#86efac;border-color:#22c55e66;background:#22c55e1a}.status-pill.off{color:#fca5a5;border-color:#ef444459;background:#ef44441a}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000008c;display:grid;place-items:center;z-index:50;padding:16px}.modal{width:min(420px,100%);background:var(--bg-elevated);border:1px solid var(--border);border-radius:14px;padding:18px}.modal h3{margin-bottom:12px;font-family:Syne,sans-serif}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.placeholder-page{height:100%;display:grid;place-items:center;text-align:center;color:var(--text-muted)}.placeholder-page h1{color:var(--text)}@media(max-width:900px){.app-shell{grid-template-columns:1fr}.sidebar{display:none}.conv-layout{grid-template-columns:1fr}}
