*{box-sizing:border-box}body{margin:0;font:14px/1.4 system-ui,sans-serif;color:#111}.app{display:grid;grid-template-columns:300px 1fr 260px;height:100vh}.list{border-right:1px solid #e5e5e5;overflow-y:auto}.list h1{font-size:15px;padding:14px;margin:0;border-bottom:1px solid #eee}.conv{padding:12px 14px;cursor:pointer;border-bottom:1px solid #f2f2f2}.conv:hover,.conv.active{background:#f0f7f4}.conv .name{font-weight:600}.conv .last{color:#777;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.thread{display:flex;flex-direction:column;height:100vh}.msgs{flex:1;overflow-y:auto;padding:16px;background:#f7f8fa;display:flex;flex-direction:column;gap:6px}.bubble{max-width:65%;padding:8px 12px;border-radius:10px;white-space:pre-wrap;word-break:break-word}.bubble.in{background:#fff;align-self:flex-start;border:1px solid #eee}.bubble.out{background:#d9fdd3;align-self:flex-end}.bubble .meta{font-size:10px;color:#888;margin-top:2px;text-align:right}.media-img{max-width:240px;border-radius:8px;display:block;margin-bottom:4px}.media-audio{max-width:240px;display:block;margin-bottom:4px}.composer{display:flex;gap:8px;padding:12px;border-top:1px solid #e5e5e5}.composer input{flex:1;padding:10px;border:1px solid #ccc;border-radius:8px}.composer button{padding:10px 18px;border:0;border-radius:8px;background:#25d366;color:#fff;font-weight:600;cursor:pointer}.composer button:disabled{opacity:.5}.composer .attach{background:#eee;color:#333;padding:10px 12px}.modal-bg{position:fixed;top:0;right:0;bottom:0;left:0;background:#0006;display:grid;place-items:center;z-index:10}.modal{background:#fff;padding:24px;border-radius:12px;width:380px;max-width:90vw;max-height:90vh;overflow-y:auto;display:flex;flex-direction:column;gap:8px}.modal h2{font-size:15px;margin:0 0 8px}.modal label{font-size:11px;color:#888;text-transform:uppercase}.modal select,.modal input{padding:8px;border:1px solid #ccc;border-radius:6px;font:inherit}.modal .preview{background:#f0f7f4;padding:10px;border-radius:8px;font-size:13px;white-space:pre-wrap}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.modal-actions button:not(.link){padding:8px 16px;border:0;border-radius:8px;background:#25d366;color:#fff;font-weight:600;cursor:pointer}.modal-actions button:disabled{opacity:.5}.page{max-width:640px;margin:0 auto;padding:20px}.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.page-head h1{font-size:20px;margin:0}.card{background:#fff;border:1px solid #e5e5e5;border-radius:12px;padding:20px;margin-bottom:16px}.card h2{font-size:16px;margin:0 0 4px}.card .muted{color:#888;font-size:13px;margin:0 0 16px}.field{margin-bottom:14px}.field label{display:block;font-size:12px;color:#666;margin-bottom:4px;font-weight:600}.field input{width:100%;padding:9px;border:1px solid #ccc;border-radius:7px;font:inherit}.field small{display:block;color:#999;font-size:11px;margin-top:3px;word-break:break-all}.card .row{display:flex;align-items:center;gap:12px;margin-top:4px}.card button:not(.link){padding:9px 18px;border:0;border-radius:8px;background:#25d366;color:#fff;font-weight:600;cursor:pointer}.card button:disabled{opacity:.5}.userlist{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}.userrow{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;background:#f7f8fa;border-radius:7px;font-size:14px}.addrow{display:flex;gap:8px;flex-wrap:wrap}.addrow input{flex:1;min-width:120px;padding:8px;border:1px solid #ccc;border-radius:7px;font:inherit}.card .err{color:#c0392b;font-size:12px;margin-top:8px}.userlist{display:flex;flex-direction:column;gap:4px;margin-bottom:6px;max-height:200px;overflow-y:auto}.userrow{display:flex;justify-content:space-between;align-items:center;padding:6px 0;border-bottom:1px solid #f2f2f2}.userrow small{color:#999}.empty{display:grid;place-items:center;height:100vh;color:#999}.panel{border-left:1px solid #e5e5e5;padding:16px;overflow-y:auto}.panel h2{font-size:14px;margin:0 0 4px}.panel .wa{color:#888;font-size:12px;margin-bottom:16px}.panel label{display:block;font-size:11px;color:#888;text-transform:uppercase;margin:14px 0 4px;letter-spacing:.04em}.panel input,.panel textarea{width:100%;padding:8px;border:1px solid #ccc;border-radius:6px;font:inherit}.panel textarea{resize:vertical;min-height:70px}.chips{display:flex;flex-wrap:wrap;gap:4px}.chip{background:#e5f3ee;color:#157a54;border-radius:12px;padding:2px 8px;font-size:11px;display:inline-flex;gap:4px;align-items:center}.chip.mini{padding:1px 6px;font-size:10px}.chip button{border:0;background:none;cursor:pointer;color:#157a54;padding:0;font-size:12px}.conv .labels{display:flex;gap:3px;margin-top:3px}.saved{color:#25a06a;font-size:11px}.panel select{width:100%;padding:8px;border:1px solid #ccc;border-radius:6px;font:inherit}.login{display:grid;place-items:center;height:100vh;background:#f7f8fa}.login form{background:#fff;padding:28px;border-radius:12px;box-shadow:0 2px 20px #00000014;width:300px;display:flex;flex-direction:column;gap:10px}.login h1{font-size:18px;margin:0 0 8px;text-align:center}.login input{padding:10px;border:1px solid #ccc;border-radius:8px;font:inherit}.login button{padding:10px;border:0;border-radius:8px;background:#25d366;color:#fff;font-weight:600;cursor:pointer}.login .err{color:#c0392b;font-size:12px;text-align:center}.topbar{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid #eee;font-weight:600}.tabs{display:flex;border-bottom:1px solid #eee}.tab{flex:1;padding:8px;border:0;background:none;cursor:pointer;color:#777;font:inherit;border-bottom:2px solid transparent}.tab.active{color:#157a54;border-bottom-color:#25d366;font-weight:600}.link{border:0;background:none;color:#888;cursor:pointer;font:inherit}.conv .who{color:#157a54;font-weight:400;font-size:12px}.shell{display:flex;height:100vh}.sidebar{width:210px;flex:none;background:#0f2e23;color:#cfe8dd;display:flex;flex-direction:column}.sidebar .brand{font-size:17px;font-weight:700;padding:18px 16px;color:#fff}.sidebar nav{display:flex;flex-direction:column;gap:2px;padding:0 8px;flex:1}.navitem{display:flex;align-items:center;gap:10px;background:none;border:0;color:#cfe8dd;text-align:left;padding:11px 12px;border-radius:8px;cursor:pointer;font:inherit;font-size:14px}.navitem .ic{width:20px;text-align:center}.navitem:hover{background:#ffffff0f}.navitem.active{background:#25d366;color:#06231a;font-weight:600}.side-foot{padding:14px 16px;border-top:1px solid rgba(255,255,255,.1);font-size:13px}.side-foot .who{margin-bottom:6px;color:#fff}.side-foot .link{color:#9ec7b7}.content{flex:1;min-width:0;height:100vh;overflow:auto;background:#f4f6f5}.content .app{height:100vh;grid-template-columns:290px 1fr 260px;background:#fff}.page{max-width:860px;margin:0 auto;padding:24px}.page-title{font-size:22px;margin:0 0 18px}.page-title small{color:#999;font-weight:400;font-size:15px}.search{width:100%;padding:10px 12px;border:1px solid #ccc;border-radius:8px;font:inherit;margin-bottom:14px}.card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.card.nopad{padding:0;overflow:hidden}.muted{color:#999}.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin-bottom:20px}.stat-card{background:#fff;border:1px solid #e5e5e5;border-radius:12px;padding:16px}.stat-card .ic{font-size:20px}.stat-card .val{font-size:28px;font-weight:700;margin:4px 0 2px}.stat-card .lbl{color:#888;font-size:13px}.recent-row{display:flex;gap:10px;padding:10px 4px;border-top:1px solid #f0f0f0;cursor:pointer}.recent-row:hover{background:#f7f8fa}.recent-row b{min-width:140px}.recent-row .last{color:#888;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbl{width:100%;border-collapse:collapse;font-size:14px}.tbl th{text-align:left;padding:11px 14px;background:#fafafa;color:#666;font-size:12px;text-transform:uppercase;letter-spacing:.03em;border-bottom:1px solid #eee}.tbl td{padding:11px 14px;border-bottom:1px solid #f2f2f2}.tbl .mono{font-family:ui-monospace,monospace;font-size:13px;color:#555}.tbl tr:hover td{background:#f9fafb}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field textarea{width:100%;padding:9px;border:1px solid #ccc;border-radius:7px;font:inherit;resize:vertical}.tstat{padding:2px 8px;border-radius:10px;font-size:11px;font-weight:600}.tbody{color:#666;font-size:13px;max-width:320px;white-space:pre-wrap}code{background:#f0f0f0;padding:1px 5px;border-radius:4px;font-size:12px}:root{--navy: #152159;--navy-2: #223072;--gold: #fdc820;--gold-ink: #3a2e05;--page: #eaf4fc}body{color:#1b2340}.content{background:var(--page)}.sidebar{background:var(--navy);color:#c7d0ee}.sidebar .brand{color:#fff}.navitem{color:#c7d0ee}.navitem:hover{background:#ffffff14}.navitem.active{background:var(--gold);color:var(--gold-ink);font-weight:700}.side-foot{border-top-color:#ffffff1f}.side-foot .who{color:#fff}.side-foot .link{color:#aab6e6}.login button,.card button:not(.link),.modal-actions button:not(.link),.composer button:not(.attach){background:var(--gold);color:var(--gold-ink)}.link{color:var(--navy)}.tab.active{color:var(--navy);border-bottom-color:var(--gold)}.conv:hover,.conv.active{background:#eef1fb}.chip{background:#e6e9f7;color:var(--navy)}.chip button,.conv .who,.stat-card .val,.page-title{color:var(--navy)}.navitem.active .ic{filter:none}.btnrow{display:flex;gap:6px;align-items:center;margin-bottom:6px}.btnrow select,.btnrow input{padding:7px;border:1px solid #ccc;border-radius:6px;font:inherit}.btnrow input{flex:1}.wa-preview{background:#e5ddd5;padding:14px;border-radius:10px;max-width:340px}.wa-bubble{background:#fff;border-radius:8px;padding:8px 10px;box-shadow:0 1px 1px #0000001a;font-size:14px}.wa-header-img{width:100%;border-radius:6px;display:block;margin-bottom:6px}.wa-header-ph{background:#f0f0f0;color:#999;border-radius:6px;padding:24px;text-align:center;margin-bottom:6px;font-size:13px}.wa-header-txt{font-weight:700;margin-bottom:4px}.wa-body{white-space:pre-wrap;word-break:break-word;color:#111}.wa-footer{color:#888;font-size:12px;margin-top:6px}.wa-btns{display:flex;flex-direction:column;gap:2px;margin-top:4px}.wa-btn{background:#fff;color:#1a73c7;text-align:center;padding:8px;border-radius:8px;font-size:13px;font-weight:500;box-shadow:0 1px 1px #0000001a}.thread-head{padding:12px 16px;border-bottom:1px solid #eee;background:#fff}.thread-head b{display:block;font-size:15px}.thread-head .num{color:#888;font-size:12px}
