:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#e8efff;background:#07101e;color-scheme:dark;font-size:14px}
*{box-sizing:border-box}html,body{height:100%;margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a{color:#6daeff;text-decoration:none}a:hover{text-decoration:underline}
.loading{min-height:100vh;display:grid;place-items:center;color:#a8b6ce}.hidden{display:none!important}
.login-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 75% 8%,#123b7c 0,#07101e 45%,#060b13 100%)}
.login-card{width:min(100%,470px);padding:38px;background:#101e33;border:1px solid #2c4465;border-radius:24px;box-shadow:0 25px 90px #0008}
.brand-icon{width:40px;height:40px;border:1px solid #4085ff;background:linear-gradient(145deg,#2566d5,#102b63);border-radius:12px;display:grid;place-items:center;font-weight:900;font-size:17px;letter-spacing:-2px;color:#fff;flex-shrink:0}
.brand{display:flex;align-items:center;gap:11px;font-weight:800;letter-spacing:.01em;font-size:17px}.brand-sub{font-size:10px;text-transform:uppercase;color:#8eacd3;letter-spacing:.17em;margin-top:3px;font-weight:600}.login-card h1{font-size:29px;margin:34px 0 12px}.login-card p{line-height:1.7;color:#9aaccc}.login-btn{display:flex;align-items:center;justify-content:center;width:100%;margin-top:25px;color:white;background:#5865f2;border-radius:11px;padding:14px;font-weight:750;text-decoration:none}.login-btn:hover{text-decoration:none;background:#717cf8}.login-foot{font-size:12px;text-align:center;padding-top:23px;color:#91a4c4}
.app-shell{display:grid;grid-template-rows:68px minmax(0,1fr);height:100dvh;min-height:550px}.topbar{display:flex;align-items:center;justify-content:space-between;padding:0 22px;border-bottom:1px solid #1b2c45;background:#0c1728;gap:12px}.top-left,.top-right{display:flex;align-items:center;gap:15px}.top-title{border-left:1px solid #304662;padding-left:15px;color:#9fb2d0;font-weight:700}.top-right{color:#97a9c5}.avatar{border-radius:50%;width:34px;height:34px;object-fit:cover;background:#203451}.agent-profile{display:flex;align-items:center;gap:10px}.agent-label{font-weight:700;color:#e6efff}.agent-role{font-size:11px;color:#6faeff}.shell{display:grid;grid-template-columns:240px 310px minmax(0,1fr) 270px;min-height:0}
.navigation{padding:23px 14px;border-right:1px solid #1c2c42;background:#0a1526;display:flex;flex-direction:column;gap:25px}.nav-section-title{font-size:11px;color:#7990b1;letter-spacing:.13em;text-transform:uppercase;font-weight:800;margin:0 0 11px 12px}.nav-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 11px;border-radius:10px;color:#abbad0;font-weight:650;width:100%;background:none;border:0;text-align:left}.nav-item:hover{background:#13263d;color:white}.nav-item.selected{background:#1a3760;color:#e7f1ff;border:1px solid #2e65a1}.counter{background:#223b58;color:#a8c8f5;font-size:11px;border-radius:7px;padding:3px 8px}.selected .counter{background:#2b5faa;color:white}.quick-stats{display:grid;grid-template-columns:1fr 1fr;gap:9px}.quick-stat{background:#101e32;border:1px solid #1e3350;padding:12px;border-radius:12px}.quick-number{font-size:24px;font-weight:850}.quick-label{font-size:11px;color:#859bbb;margin-top:3px}.aside-info{margin-top:auto;background:#101d30;padding:14px;border-radius:12px;border:1px solid #203550;color:#a5b5d0;font-size:12px;line-height:1.6}.aside-info strong{color:#d4e4ff}
.ticket-pane{background:#0e1b2d;border-right:1px solid #23334a;display:flex;flex-direction:column;min-width:0}.pane-header{padding:22px 17px 16px;border-bottom:1px solid #22354c}.pane-headline{font-size:18px;font-weight:780;margin:0 0 14px}.search{width:100%;background:#111f34;border:1px solid #2a3f5a;border-radius:9px;color:white;padding:11px 12px;outline:none}.search:focus,textarea:focus{border-color:#438bf6}.ticket-count{font-size:12px;color:#8295b5;margin-top:10px}.ticket-list{overflow-y:auto;min-height:0}.ticket-entry{padding:17px 15px;border-bottom:1px solid #1d3147;display:block;border-left:3px solid transparent;width:100%;background:none;text-align:left;color:inherit}.ticket-entry:hover{background:#16263d}.ticket-entry.active{background:#1b3051;border-left-color:#438eff}.entry-top{display:flex;justify-content:space-between;gap:8px}.entry-user{font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entry-id{font-size:11px;color:#8297b7}.entry-desc{display:flex;gap:8px;align-items:center;margin-top:10px;color:#94a7c2;font-size:12px}.ticket-type{border-radius:6px;background:#223958;color:#99caff;padding:3px 7px;font-size:11px;font-weight:750;text-transform:capitalize}.type-sales{background:#372b4a;color:#d6a9ff}.type-billing{background:#413222;color:#ffd39a}.time{font-size:11px;color:#8195b2}.claimed{color:#71cdac;font-size:11px;margin-top:10px}.empty-state{color:#99abc7;padding:32px 20px;text-align:center;line-height:1.7}
.conversation{display:flex;flex-direction:column;min-width:0;background:#0b1626}.conversation-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 22px;border-bottom:1px solid #233249;min-height:90px}.conversation-header h2{font-size:17px;margin:3px 0 5px;overflow-wrap:anywhere}.eyebrow{font-size:10px;color:#79a6e5;text-transform:uppercase;letter-spacing:.13em;font-weight:800}.subline{font-size:12px;color:#8d9dbb}.button-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.button{border:1px solid #355074;background:#1b2d45;color:#deebff;border-radius:9px;padding:9px 12px;font-size:12px;font-weight:740}.button:hover{background:#294161}.button.primary{background:#2470e8;border-color:#338aff;color:white}.button.primary:hover{background:#3581f1}.button.danger{background:#42222c;border-color:#854154;color:#ffd3d7}.button.ghost{border-color:#293f58;background:transparent}.pill{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;background:#143a2f;color:#76dfb9;border-radius:20px;font-size:11px;font-weight:800}.pill.closed{color:#ffc1c1;background:#44303a}.notice{margin:16px 22px 0;padding:12px 15px;border:1px solid #245890;background:#122944;border-radius:10px;font-size:12px;line-height:1.5;color:#b9d7fe}.notice strong{color:#e9f4ff}.messages{flex:1;min-height:0;overflow:auto;padding:24px 27px 10px}.message{display:flex;gap:11px;margin-bottom:22px}.message.agent{flex-direction:row-reverse}.msg-avatar{width:33px;height:33px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;background:#273954;color:#dcecff;font-weight:800}.message.agent .msg-avatar{background:#21579d}.msg-body{max-width:min(90%,670px);min-width:0}.msg-byline{display:flex;gap:9px;align-items:baseline;margin-bottom:7px}.message.agent .msg-byline{justify-content:flex-end}.msg-name{font-size:12px;font-weight:800;color:#dce9fd}.msg-meta{font-size:10px;color:#8ca1bf}.bubble{background:#19283e;border:1px solid #2b3e56;border-radius:2px 13px 13px 13px;padding:13px 16px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.message.agent .bubble{background:#194275;border-color:#2765a8;border-radius:13px 2px 13px 13px}.msg-links{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}.attachment{font-size:12px;padding:7px 10px;background:#273b55;border-radius:8px;max-width:100%;overflow-wrap:anywhere}.typing{height:21px;color:#91c0f5;font-size:12px;padding:0 28px}
.composer{padding:12px 22px 20px;border-top:1px solid #23354e;background:#0e1a2c}.composer-label{font-size:12px;font-weight:800;color:#bdd2ec;display:flex;justify-content:space-between;margin-bottom:9px}.composer textarea{display:block;width:100%;min-height:86px;max-height:180px;resize:vertical;background:#14263e;border:1px solid #304a67;border-radius:10px;padding:12px 14px;color:white;outline:none;line-height:1.5}.composer-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:10px;gap:9px}.hint{font-size:11px;color:#7b91b2}.customer{border-left:1px solid #21354c;background:#0e1a2a;display:flex;flex-direction:column;min-height:0;overflow-y:auto}.customer-content{padding:23px 18px}.customer h3{font-size:13px;color:#a5b9d8;text-transform:uppercase;letter-spacing:.08em;margin:20px 0 12px}.customer h3:first-child{margin-top:0}.customer-name{font-size:17px;font-weight:800;margin:7px 0}.details-grid{display:grid;grid-template-columns:1fr;gap:11px}.detail-label{font-size:11px;color:#8498b9}.detail-value{font-size:13px;font-weight:680;overflow-wrap:anywhere;margin-top:3px}.detail-block{background:#13253b;border:1px solid #263d57;border-radius:9px;padding:11px}.internal-note{background:#1b2b40;border:1px solid #304763;border-radius:9px;padding:11px;margin:9px 0}.note-author{font-size:11px;color:#8fafdb;margin-bottom:5px}.note-text{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.mini-input{width:100%;min-height:76px;max-height:150px;resize:vertical;background:#101f33;border:1px solid #34506b;border-radius:9px;color:white;padding:11px;outline:none}.agent-help{background:#102846;border-left:3px solid #3c8aff;padding:11px;border-radius:7px;color:#afc8eb;font-size:12px;line-height:1.6}.toast{position:fixed;bottom:20px;right:20px;background:#1a385c;border:1px solid #4985ce;color:white;padding:13px 17px;border-radius:10px;box-shadow:0 12px 35px #0008;max-width:min(400px,90vw);z-index:100}.toast.error{border-color:#d76b6b;background:#482c3b}.placeholder{display:flex;flex:1;align-items:center;justify-content:center;text-align:center;color:#88a3c5;padding:25px}.placeholder h2{color:#e4efff}.placeholder-icon{font-size:46px}.connection-dot{width:8px;height:8px;background:#65dbb0;border-radius:50%;display:inline-block;margin-right:5px}.connection-dot.offline{background:#e1ad68}
@media(max-width:1350px){.shell{grid-template-columns:205px 275px minmax(0,1fr)}.customer{display:none}}
@media(max-width:950px){.shell{grid-template-columns:270px minmax(0,1fr)}.navigation{display:none}.top-title{display:none}.customer{display:none}}
@media(max-width:650px){.app-shell{min-height:500px}.shell{display:block;position:relative}.ticket-pane{position:absolute;inset:0;z-index:5}.conversation{position:absolute;inset:0;z-index:6}.ticket-pane.mobile-hidden,.conversation.mobile-hidden{display:none}.topbar{padding:0 12px}.agent-label{display:none}.top-title{display:none}.brand{font-size:14px}.conversation-header{padding:12px;align-items:flex-start;flex-direction:column;min-height:75px}.messages{padding:16px 12px}.composer{padding:11px}.notice{margin:10px 12px 0}.button{padding:8px 10px}.msg-body{max-width:84%}}

.customer.open{display:flex!important;position:fixed;top:68px;right:0;bottom:0;z-index:20;width:min(370px,100vw);box-shadow:-18px 0 55px #000a;border-left:1px solid #365c83}.customer.open .customer-content{overflow-y:auto}

.claimed.unassigned{color:#a9adc3}#details-close{float:right}.note-save{margin-top:8px;width:100%}.audit-block{margin-bottom:7px}

/* v1.4 • Automatic reply administration, isolated from ticket layout */
.automation-overlay{position:fixed;inset:0;z-index:1000;background:#020913d9;display:grid;place-items:center;padding:22px;overflow:auto}
.automation-modal{width:min(1120px,100%);max-height:min(90vh,1050px);overflow:auto;background:#0e1b2f;color:#e8f1ff;border:1px solid #345478;border-radius:18px;box-shadow:0 24px 85px #000b}
.automation-head{padding:25px 28px 19px;border-bottom:1px solid #27415c;display:flex;align-items:flex-start;justify-content:space-between;gap:25px}
.automation-head h2{font-size:23px;margin:7px 0 4px}.automation-head p{color:#a7bedb;font-size:13px;line-height:1.55;max-width:700px}
.automation-columns{display:grid;grid-template-columns:1fr 1fr;gap:0}.automation-rules,.automation-editor{padding:23px 26px;min-width:0}.automation-rules{border-right:1px solid #28405b;overflow-y:auto;max-height:70vh}
.automation-section-title{font-size:13px;font-weight:850;letter-spacing:.03em;color:#d9eaff;margin-bottom:17px}
.automation-rule{background:#132a44;border:1px solid #284864;padding:14px;margin-bottom:12px;border-radius:11px}
.automation-rule-top,.automation-rule-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.automation-rule-top strong{font-size:14px}.automation-trigger,.automation-response{font-size:12px;color:#a9c5e5;line-height:1.6;overflow-wrap:anywhere;margin-top:8px}
.automation-response{white-space:pre-wrap;background:#0a1c31;border-radius:7px;padding:9px;max-height:130px;overflow:auto}
.automation-rule-actions{margin-top:13px;justify-content:flex-start}
.automation-editor label{display:block;font-size:12px;color:#bfd3ec;font-weight:750;margin-bottom:13px}
.auto-input{display:block;width:100%;color:#edf5ff;background:#0e2036;border:1px solid #355676;border-radius:9px;padding:11px;font:inherit;outline:none;margin-top:7px}
.auto-input:focus{border-color:#5395ed}.auto-input option{background:#162741}.automation-editor textarea{resize:vertical;min-height:105px}
.auto-inline{display:grid;grid-template-columns:1fr 1fr;gap:12px}.auto-check{display:flex!important;align-items:center;gap:9px;align-self:center;margin-top:16px}
.auto-check input{accent-color:#5291f0}.auto-help{font-size:12px;color:#9aafc9;line-height:1.65;margin:9px 0 15px}.auto-help code{background:#172d46;border:1px solid #2b4664;border-radius:4px;padding:1px 4px}
.auto-preview{padding-top:20px;margin-top:21px;border-top:1px solid #2e4762}#auto-preview-result{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:800px){.automation-overlay{padding:6px}.automation-modal{max-height:98vh}.automation-columns{grid-template-columns:1fr}.automation-rules{max-height:360px;border-right:0;border-bottom:1px solid #28405b}.automation-head{padding:15px}.automation-head h2{font-size:19px}.automation-rules,.automation-editor{padding:16px}.auto-inline{grid-template-columns:1fr}}

/* v1.4 • Dashboard-managed bot settings */
.settings-modal{width:min(950px,100%)}
.settings-form{display:grid;grid-template-columns:1fr 1fr;gap:22px;padding:22px}
.settings-section{background:#12263e;border:1px solid #2a4561;border-radius:12px;padding:20px;min-width:0}
.settings-section h3{font-size:15px;margin:0 0 12px;color:#deecff}
.settings-section label{display:block;font-size:12px;color:#bdd3eb;font-weight:750;margin:12px 0}
.settings-section textarea{resize:vertical;min-height:96px}
.settings-section .color-field{height:43px;max-width:155px;padding:5px;cursor:pointer}
.settings-section .auto-help{margin-bottom:0}
.settings-section .settings-toggle{display:flex;gap:11px;align-items:flex-start;font-weight:600;line-height:1.5}
.settings-toggle input{flex-shrink:0;accent-color:#438eff;margin-top:4px}
.settings-footer{grid-column:1/-1;display:flex;gap:10px;align-items:center;flex-wrap:wrap;border-top:1px solid #2b4460;padding-top:18px}
.initial-request{white-space:pre-wrap;line-height:1.6;font-weight:500}
@media(max-width:760px){.settings-form{grid-template-columns:1fr;padding:12px;gap:13px}.settings-section{padding:14px}}

/* v1.6 Official Evolve Network EN identity: use the actual supplied transparent logo. */
.brand-mark{width:56px;height:48px;object-fit:contain;flex:none;display:block;filter:drop-shadow(0 3px 8px #3765fa25)}
.login-card .brand-mark{width:100px;height:82px}
.login-card .brand{gap:17px;font-size:19px}
.login-card .brand-sub{font-size:11px;letter-spacing:.18em}
.sidebar-brand{display:flex;gap:10px;align-items:center;min-width:0;color:#ecf3ff;font-size:11px;font-weight:800;letter-spacing:.075em;padding:4px 8px 18px;border-bottom:1px solid #253b56;margin-bottom:-5px}
.sidebar-brand img{width:50px;height:44px;object-fit:contain;flex-shrink:0}
.sidebar-brand small{display:block;font-size:9px;letter-spacing:.14em;color:#8fa8d7;margin-top:6px;font-weight:700}
@media(max-width:650px){.topbar .brand-mark{width:42px;height:39px}.topbar .brand{gap:7px}.login-card{padding:25px}.login-card .brand-mark{width:80px;height:68px}}
