:root{--paper:#f5f7f8;--panel:#fff;--ink:#101820;--muted:#66747d;--faint:#96a2a9;--line:#dce4e8;--line-strong:#c8d3d9;--brand:#0f766e;--brand-dark:#0b5651;--brand-soft:#e0f3f0;--nav:#111820;--nav-2:#1b2630;--gold:#b99354;--danger:#bb3e50;--shadow:0 18px 50px rgba(16,24,32,.15);--shadow-soft:0 10px 28px rgba(16,24,32,.08);font-family:"Microsoft JhengHei","PingFang TC","Noto Sans TC",Arial,sans-serif}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--paper)}button,input,textarea{font:inherit}.hidden{display:none!important}button{transition:transform .16s ease,box-shadow .16s ease}button:hover:not(:disabled){transform:translateY(-1px)}.customer-page{min-height:100vh;background:linear-gradient(135deg,rgba(15,118,110,.12),transparent 32%),linear-gradient(315deg,rgba(185,147,84,.12),transparent 36%),#eef2f3}.customer-shell{min-height:100vh;display:grid;place-items:center;padding:24px}.customer-frame{width:min(100%,1080px);height:min(780px,calc(100vh - 48px));min-height:560px;display:grid;grid-template-columns:310px minmax(0,1fr);overflow:hidden;border:1px solid rgba(200,211,217,.9);border-radius:8px;background:rgba(255,255,255,.8);box-shadow:var(--shadow);backdrop-filter:blur(14px)}.service-profile{display:grid;align-content:space-between;gap:24px;padding:30px;color:#eef6f7;background:linear-gradient(180deg,rgba(15,118,110,.86),rgba(17,24,32,.94)),#111820}.service-profile img{width:76px;height:76px;border-radius:8px;box-shadow:0 16px 30px rgba(0,0,0,.22)}.service-profile p{margin:14px 0 6px;color:#b9d8d5;font-size:12px;text-transform:uppercase}.service-profile h1{margin:0;font-size:28px;line-height:1.16}.service-profile dl{display:grid;gap:10px;margin:0}.service-profile dl div{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid rgba(255,255,255,.14)}.service-profile dt{color:#b9c8ce;font-size:12px}.service-profile dd{margin:0;font-weight:700}.chat-window{min-width:0;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;background:#fff}.chat-header,.conversation-header{display:flex;align-items:center;gap:14px;padding:16px 20px;background:rgba(255,255,255,.94);border-bottom:1px solid var(--line)}.chat-header h1,.conversation-header h2,.brand-block h1,.info-panel h2{margin:0;font-size:18px;line-height:1.25;letter-spacing:0}.chat-header p,.conversation-header p,.profile-card p{margin:4px 0 0;color:var(--muted);font-size:13px}.agent-avatar,.selected-profile img,.customer-item img,.profile-card img{width:46px;height:46px;flex:0 0 auto;border-radius:8px;object-fit:cover;background:#dce7e5}.messages{display:flex;flex-direction:column;gap:12px;overflow-y:auto;padding:22px;background:linear-gradient(rgba(248,250,250,.82),rgba(248,250,250,.82)),repeating-linear-gradient(45deg,#f9fbfb 0,#f9fbfb 18px,#f2f5f5 18px,#f2f5f5 36px)}.system-notice{align-self:center;max-width:min(86%,560px);padding:8px 12px;color:#5f6f78;background:rgba(255,255,255,.82);border:1px solid var(--line);border-radius:999px;font-size:12px;line-height:1.5;text-align:center;box-shadow:0 6px 16px rgba(16,24,32,.05)}.message{max-width:min(76%,580px);display:grid;gap:6px}.message.agent{align-self:flex-start}.message.customer{align-self:flex-end}.bubble{padding:11px 14px;line-height:1.58;white-space:pre-wrap;word-break:break-word;border-radius:8px;background:#fff;border:1px solid var(--line);box-shadow:0 7px 18px rgba(16,24,32,.06)}.message.customer .bubble{color:#fff;background:linear-gradient(180deg,var(--brand),var(--brand-dark));border-color:var(--brand);box-shadow:0 10px 22px rgba(15,118,110,.22)}.time{color:var(--faint);font-size:12px}.message.customer .time{text-align:right}.composer{display:grid;grid-template-columns:1fr 92px;gap:12px;padding:14px;background:#fff;border-top:1px solid var(--line)}.composer textarea{min-height:46px;max-height:132px;resize:none;border:1px solid var(--line-strong);border-radius:8px;padding:12px 13px;color:var(--ink);background:#fbfcfc;outline:none}.composer textarea:focus,.login-box input:focus,.search-box input:focus,.settings-panel input:focus,.settings-panel textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(15,118,110,.16)}.composer button,.login-box button,.settings-panel button{min-height:46px;border:0;border-radius:8px;color:#fff;background:linear-gradient(180deg,var(--brand),var(--brand-dark));box-shadow:0 10px 18px rgba(15,118,110,.2);cursor:pointer}.composer button:disabled,.composer textarea:disabled,.login-box button:disabled,.settings-panel button:disabled{cursor:not-allowed;opacity:.55;transform:none}.admin-page{min-height:100vh;background:#eef2f4}.login-view{min-height:100vh;display:grid;place-items:center;padding:20px}.login-box{width:min(100%,390px);display:grid;gap:16px;padding:30px;background:rgba(255,255,255,.96);border:1px solid rgba(200,211,217,.95);border-radius:8px;box-shadow:var(--shadow)}.login-brand,.brand-block,.profile-card{display:flex;align-items:center;gap:14px}.login-brand img,.brand-block img{width:58px;height:58px;border-radius:8px;box-shadow:var(--shadow-soft)}.login-brand h1{margin:0;font-size:24px}.login-brand p{margin:5px 0 0;color:var(--muted)}.login-box input,.search-box input,.settings-panel input,.settings-panel textarea{width:100%;border:1px solid var(--line-strong);border-radius:8px;padding:10px 11px;color:var(--ink);background:#fbfcfc;outline:none}.login-box p{min-height:18px;margin:0;color:var(--danger);font-size:13px}.admin-shell{height:100vh;display:grid;grid-template-columns:340px minmax(460px,1fr) 330px;overflow:hidden}.sidebar{min-width:0;display:grid;grid-template-rows:auto auto auto 1fr;color:#eaf0f3;background:linear-gradient(180deg,var(--nav),var(--nav-2));border-right:1px solid rgba(255,255,255,.08)}.brand-block{min-height:92px;padding:18px;border-bottom:1px solid rgba(255,255,255,.1)}.brand-block h1{color:#fff}.brand-block span{display:inline-flex;align-items:center;gap:7px;margin-top:5px;color:#b9dcd7;font-size:13px}.brand-block span:before{content:"";width:7px;height:7px;border-radius:999px;background:#43d08f;box-shadow:0 0 0 4px rgba(67,208,143,.14)}.sidebar-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:14px 14px 6px}.sidebar-stats div{padding:12px 10px;border:1px solid rgba(255,255,255,.08);border-radius:8px;background:rgba(255,255,255,.06)}.sidebar-stats span{display:block;color:#fff;font-size:20px;font-weight:800}.sidebar-stats p{margin:3px 0 0;color:#aebdc4;font-size:12px}.search-box{padding:10px 14px 8px}.search-box input{color:#eaf0f3;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.12)}.search-box input::placeholder{color:#9fb0b8}.customer-list{min-height:0;overflow-y:auto;padding:8px}.customer-item{width:100%;display:grid;grid-template-columns:46px 1fr auto;gap:12px;align-items:center;margin-bottom:6px;padding:12px;border:1px solid transparent;border-radius:8px;color:#d9e4e8;background:transparent;text-align:left;cursor:pointer}.customer-item:hover,.customer-item.active{color:#fff;background:rgba(255,255,255,.09);border-color:rgba(255,255,255,.1);transform:none}.customer-item.active{box-shadow:inset 3px 0 0 var(--gold)}.customer-main{min-width:0}.customer-name-row{display:flex;align-items:center;gap:8px}.customer-name{overflow:hidden;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.customer-preview,.customer-location{overflow:hidden;color:#aebdc4;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.customer-preview{margin-top:5px}.customer-location{margin-top:3px;color:#80919a;font-size:12px}.dot{width:8px;height:8px;border-radius:999px;background:#78909b}.dot.online{background:#43d08f}.unread{min-width:22px;height:22px;display:inline-grid;place-items:center;padding:0 6px;color:#fff;background:var(--danger);border-radius:999px;font-size:12px}.admin-chat{min-width:0;display:grid;grid-template-rows:76px auto minmax(0,1fr) auto;background:#f3f6f7;min-height:0}.admin-messages{min-height:0}.admin-composer{position:sticky;bottom:0;z-index:3}.conversation-header{justify-content:space-between;height:76px;background:rgba(255,255,255,.92)}.selected-profile{min-width:0;display:flex;align-items:center;gap:12px}.selected-profile div{min-width:0}.selected-profile h2,.selected-profile p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge{flex:0 0 auto;padding:6px 10px;color:var(--muted);background:#edf2f3;border:1px solid var(--line);border-radius:999px;font-size:13px}.badge.online{color:#176344;background:var(--brand-soft);border-color:#c4e4df}.remark-strip{display:grid;grid-template-columns:auto minmax(180px,1fr) 96px;gap:10px;align-items:center;padding:10px 16px;background:#fff;border-bottom:1px solid var(--line)}.remark-strip label{color:var(--muted);font-size:12px}.remark-strip input{min-width:0;border:1px solid var(--line-strong);border-radius:8px;padding:9px 10px;outline:none;background:#fbfcfc}.remark-strip input:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(15,118,110,.16)}.remark-strip button{min-height:38px;border:0;border-radius:8px;color:#fff;background:linear-gradient(180deg,var(--brand),var(--brand-dark));cursor:pointer}.remark-strip button:disabled,.remark-strip input:disabled{opacity:.55;cursor:not-allowed}.info-panel{min-width:0;overflow-y:auto;padding:18px;background:#fbfcfc;border-left:1px solid var(--line)}.profile-card{padding:14px;border:1px solid var(--line);border-radius:8px;background:linear-gradient(180deg,#fff,#f7faf9);box-shadow:var(--shadow-soft)}.profile-card h2{font-size:17px}.settings-panel{display:grid;gap:12px;margin-top:14px;padding:15px;border:1px solid var(--line);border-radius:8px;background:#fff}.settings-panel label{display:grid;gap:6px;color:var(--muted);font-size:12px}.settings-panel textarea{min-height:74px;resize:vertical}.settings-panel button{box-shadow:none}.info-panel dl{margin:0}.info-panel dt{margin-top:13px;color:var(--faint);font-size:12px}.info-panel dd{margin:5px 0 0;overflow-wrap:anywhere;line-height:1.45}.empty{margin:auto;padding:22px;color:var(--muted);text-align:center}@media(max-width:1180px){.admin-shell{grid-template-columns:280px minmax(0,1fr) 300px}.info-panel{display:block}}@media(max-width:900px){.admin-shell{grid-template-columns:1fr;grid-template-rows:30vh minmax(360px,1fr) 22vh}.sidebar{border-right:0;border-bottom:1px solid rgba(255,255,255,.1)}.info-panel{display:block;border-left:0;border-top:1px solid var(--line);padding:12px}.settings-panel{margin-top:10px;padding:12px}.profile-card{display:none}.sidebar-stats{display:none}.customer-list{min-height:0}.admin-chat{min-height:0;grid-template-rows:66px auto minmax(0,1fr) auto}.conversation-header{height:66px}.remark-strip{grid-template-columns:1fr 86px}.remark-strip label{display:none}.composer{grid-template-columns:1fr 76px}}@media(max-width:820px){.customer-shell{padding:12px}.customer-frame{height:calc(100vh - 24px);min-height:520px;grid-template-columns:1fr}.service-profile{display:none}.brand-block{min-height:76px}}




@media(min-width:901px) and (max-width:1280px){.admin-shell{grid-template-columns:minmax(280px,300px) minmax(0,1fr)!important;overflow:hidden}.info-panel{display:none!important}.sidebar{min-width:0}.admin-chat{min-width:0}.conversation-header{height:72px;padding:12px 16px}.selected-profile{gap:10px}.selected-profile img{width:50px;height:50px}.remark-strip{grid-template-columns:auto minmax(0,1fr) 108px;padding:10px 16px}.remark-strip input{font-size:14px}.remark-strip button{min-width:108px}.messages{gap:8px;padding:14px 18px}.message{max-width:min(68%,520px)}.bubble{padding:9px 12px;line-height:1.48}.time{font-size:11px}.composer{grid-template-columns:minmax(0,1fr) 108px;gap:10px;padding:12px 14px}.composer textarea{min-height:44px}.composer button{min-width:108px}.customer-item{grid-template-columns:42px minmax(0,1fr) auto;padding:10px}.customer-item img{width:42px;height:42px}}@media(max-width:900px){.admin-shell{height:auto;min-height:100vh;display:grid;grid-template-columns:1fr!important;grid-template-rows:auto minmax(520px,70vh) auto!important;overflow:visible}.sidebar{min-height:260px}.customer-list{max-height:260px}.admin-chat{min-height:520px}.info-panel{display:block!important;max-height:none}.remark-strip{grid-template-columns:1fr 104px}.remark-strip label{display:none}.composer{grid-template-columns:minmax(0,1fr) 96px}}
.admin-composer{position:relative!important;bottom:auto!important}
@media(min-width:901px){.admin-shell{height:100vh!important;max-height:100vh!important;align-items:stretch}.sidebar,.admin-chat,.info-panel{height:100vh!important;max-height:100vh!important;min-height:0!important}.admin-chat{overflow:hidden!important}.admin-messages{overflow-y:auto!important}}

.composer{grid-template-columns:minmax(0,1fr) 62px 92px}
.composer .image-button{color:var(--brand);background:#eef6f5;border:1px solid rgba(15,118,110,.25);box-shadow:none}
.chat-image{display:block;max-width:min(260px,60vw);max-height:280px;border-radius:8px;object-fit:contain}
.message.customer .chat-image{background:#fff}
.chat-image{cursor:zoom-in}
.image-preview-overlay{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:24px;background:rgba(5,12,18,.82)}
.image-preview-overlay img{max-width:min(96vw,1200px);max-height:92vh;object-fit:contain;border-radius:8px;box-shadow:0 22px 70px rgba(0,0,0,.45);background:#fff}
.image-preview-close{position:fixed;top:18px;right:18px;width:42px;height:42px;border:0;border-radius:999px;color:#fff;background:rgba(255,255,255,.16);font-size:28px;line-height:1;cursor:pointer}
@media(max-width:900px){.composer{grid-template-columns:minmax(0,1fr) 58px 76px}}

.message-meta{display:flex;align-items:center;gap:8px;color:var(--faint);font-size:12px;line-height:1.2}.message.customer .message-meta{justify-content:flex-end;flex-wrap:wrap}.read-status{display:inline-flex;align-items:center;justify-content:center;min-width:34px;padding:2px 6px;border-radius:999px;color:#7f8b92;background:#eef2f3;font-size:11px;white-space:nowrap}.read-status.read{color:#0f766e;background:#e0f3f0}

.message.recalled .bubble{color:#7b8790!important;background:#f1f4f5!important;border-color:#d8e0e4!important;box-shadow:none!important;font-style:normal}.edit-message-button{min-height:0;border:0;border-radius:999px;padding:2px 7px;color:#0f766e;background:#e0f3f0;font-size:11px;line-height:1.4;cursor:pointer;box-shadow:none;white-space:nowrap}.edit-message-button:hover{color:#fff;background:#0f766e;transform:none}.message-meta .edit-message-button{margin-left:0}

.support-close-button{margin-left:auto;width:38px;height:38px;flex:0 0 auto;display:grid;place-items:center;border:1px solid var(--line);border-radius:999px;color:#61717a;background:#f5f8f8;font-size:25px;line-height:1;cursor:pointer;box-shadow:none}
.support-close-button:hover{color:#0f766e;background:#e0f3f0;transform:none}
.chat-header>div{min-width:0}
@media(max-width:820px){.support-close-button{width:36px;height:36px;font-size:23px}}

/* codex embedded layout fix start */
.embedded-page{min-height:100vh;background:#fff;overflow:hidden}
.embedded-page .customer-shell{min-height:100vh;padding:0;display:block;background:#fff}
.embedded-page .customer-frame{width:100%;height:100vh;min-height:0;display:block;border:0;border-radius:0;box-shadow:none;background:#fff}
.embedded-page .service-profile{display:none!important}
.embedded-page .chat-window{height:100vh;min-height:0;display:grid;grid-template-rows:auto 1fr auto;background:#fff}
.embedded-page .chat-header{min-height:72px;padding:14px 18px;background:#fff}
.embedded-page .messages{min-height:0;padding:18px;background:linear-gradient(rgba(248,250,250,.88),rgba(248,250,250,.88)),repeating-linear-gradient(45deg,#f9fbfb 0,#f9fbfb 18px,#f2f5f5 18px,#f2f5f5 36px)}
.embedded-page .composer{grid-template-columns:minmax(0,1fr) 74px 92px;padding:14px;background:#fff}
.embedded-page .support-close-button{margin-left:auto}
@media(max-width:720px){.embedded-page .chat-header{min-height:66px;padding:12px 14px}.embedded-page .messages{padding:14px}.embedded-page .composer{grid-template-columns:minmax(0,1fr) 60px 76px;gap:8px;padding:10px}.embedded-page .composer textarea{min-height:44px}.embedded-page .composer button{min-height:44px}.embedded-page .message{max-width:86%}}
/* codex embedded layout fix end */

.cs-notify-toast {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 99999;
  width: min(320px, calc(100vw - 32px));
  border: 1px solid rgba(20, 184, 166, 0.36);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
}
.cs-notify-toast strong {
  display: block;
  font-size: 15px;
  margin-bottom: 5px;
}
.cs-notify-toast span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .cs-notify-toast {
    left: 16px;
    right: 16px;
    top: 16px;
    width: auto;
  }
}

/* codex mobile admin polish start */
.mobile-back-button{display:none}
@media(max-width:900px){
  body.admin-page{width:100vw;max-width:100vw;height:100vh;margin:0;overflow:hidden;background:#eef2f4}
  .admin-page *{max-width:100%;min-width:0}
  .admin-shell{width:100vw!important;height:100vh!important;min-height:0!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;overflow:hidden!important;background:#eef2f4}
  .info-panel{display:none!important}.sidebar-stats{display:none!important}
  .admin-shell:not(.mobile-chat-open) .admin-chat{display:none!important}
  .admin-shell:not(.mobile-chat-open) .sidebar{width:100%!important;height:100vh!important;min-height:0!important;display:grid!important;grid-template-rows:62px 48px minmax(0,1fr)!important;color:#eaf0f3;border-right:0!important;overflow:hidden!important;background:linear-gradient(180deg,var(--nav),var(--nav-2))!important}
  .admin-shell.mobile-chat-open .sidebar{display:none!important}
  .brand-block{height:62px!important;min-height:62px!important;padding:9px 12px!important;gap:10px!important;border-bottom:1px solid rgba(255,255,255,.1)!important}.brand-block img{width:44px!important;height:44px!important}.brand-block h1{font-size:17px!important;line-height:1.15!important}.brand-block span{font-size:12px!important;margin-top:2px!important}
  .search-box{height:48px!important;padding:7px 10px!important}.search-box input{height:34px!important;padding:7px 10px!important;font-size:14px!important;border-radius:8px!important}
  .customer-list{height:100%!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;padding:8px 10px 14px!important;display:grid!important;grid-auto-rows:minmax(74px,auto)!important;align-content:start!important;gap:8px!important}.customer-item{width:100%!important;min-height:74px!important;margin:0!important;padding:10px!important;display:grid!important;grid-template-columns:44px minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important;border:1px solid rgba(255,255,255,.1)!important;border-radius:8px!important;background:rgba(255,255,255,.06)!important;overflow:hidden!important}.customer-item.active{box-shadow:inset 3px 0 0 var(--gold)!important;background:rgba(255,255,255,.09)!important}.customer-item img{width:44px!important;height:44px!important}.customer-main{min-width:0!important;overflow:hidden!important}.customer-name-row{min-width:0!important;display:grid!important;grid-template-columns:8px minmax(0,1fr)!important;gap:7px!important;align-items:center!important}.customer-name{display:block!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:15px!important;line-height:1.25!important;color:#fff!important}.customer-preview{display:block!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:13px!important;margin-top:5px!important;color:#b9c8ce!important}.customer-location{display:block!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:11px!important;margin-top:3px!important;color:#7f929d!important}.dot{width:7px!important;height:7px!important}.unread{min-width:20px;height:20px;font-size:11px;padding:0 6px!important}
  .admin-shell.mobile-chat-open .admin-chat{width:100%!important;height:100vh!important;min-height:0!important;display:grid!important;grid-template-rows:58px 44px minmax(0,1fr) 60px!important;overflow:hidden!important;background:#f6f8f9}.conversation-header{width:100%!important;height:58px!important;min-height:58px!important;padding:7px 9px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:8px!important;overflow:hidden!important;background:#fff!important}.mobile-back-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;height:34px!important;min-width:54px!important;border:1px solid var(--line)!important;border-radius:999px!important;color:var(--brand)!important;background:#eef6f5!important;font-size:13px!important;font-weight:700!important;box-shadow:none!important;padding:0 9px!important}.selected-profile{min-width:0!important;display:flex!important;align-items:center!important;gap:8px!important;overflow:hidden!important}.selected-profile img{width:38px!important;height:38px!important}.selected-profile h2{font-size:15px!important;line-height:1.2!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.selected-profile p{font-size:11px!important;margin-top:2px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.badge{flex:0 0 auto!important;padding:4px 7px!important;font-size:11px!important}
  .remark-strip{width:100%!important;height:44px!important;grid-template-columns:minmax(0,1fr) 58px!important;gap:7px!important;padding:6px 8px!important;overflow:hidden!important}.remark-strip label{display:none!important}.remark-strip input{height:32px!important;padding:6px 8px!important;font-size:12px!important}.remark-strip button{width:58px!important;min-width:58px!important;min-height:32px!important;font-size:0!important;padding:0!important}.remark-strip button::after{content:"\4fdd\5b58";font-size:12px!important}
  .admin-messages{width:100%!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:10px 8px!important}.message{max-width:84%!important;min-width:0!important}.message.customer{justify-items:end!important}.bubble{max-width:100%!important;padding:8px 10px!important;line-height:1.45!important;overflow-wrap:anywhere!important}.message-meta{max-width:100%!important;display:flex!important;flex-wrap:wrap!important;gap:4px!important;font-size:10px!important;line-height:1.2!important}.message.customer .message-meta{justify-content:flex-end!important}.time{font-size:10px!important}.read-status,.edit-message-button{font-size:10px!important;min-height:0!important;padding:2px 5px!important;line-height:1.25!important;white-space:nowrap!important}
  .admin-composer{width:100%!important;position:relative!important;bottom:auto!important;z-index:3!important;display:grid!important;grid-template-columns:minmax(0,1fr) 48px 58px!important;gap:6px!important;padding:7px 8px!important;background:#fff!important;border-top:1px solid var(--line)!important;overflow:hidden!important}.admin-composer textarea{width:100%!important;min-height:44px!important;max-height:64px!important;padding:9px!important;font-size:14px!important}.admin-composer button{min-width:0!important;min-height:44px!important;font-size:13px!important;padding:0!important}.admin-composer .image-button{padding:0!important;font-size:13px!important}.chat-image{max-width:180px!important;max-height:180px!important}.login-box{width:min(100%,360px)!important;padding:22px!important}
}
@media(max-width:430px){
  .admin-shell:not(.mobile-chat-open) .sidebar{grid-template-rows:58px 44px minmax(0,1fr)!important}.brand-block{height:58px!important;min-height:58px!important}.brand-block img{width:40px!important;height:40px!important}.brand-block h1{font-size:16px!important}.search-box{height:44px!important;padding:6px 8px!important}.search-box input{height:32px!important}.customer-list{grid-auto-rows:minmax(68px,auto)!important;padding:7px 8px 12px!important;gap:7px!important}.customer-item{min-height:68px!important;grid-template-columns:40px minmax(0,1fr) auto!important;padding:8px!important}.customer-item img{width:40px!important;height:40px!important}.customer-name{font-size:14px!important}.customer-preview{font-size:12px!important}.customer-location{font-size:10px!important}.admin-shell.mobile-chat-open .admin-chat{grid-template-rows:54px 42px minmax(0,1fr) 58px!important}.conversation-header{height:54px!important;min-height:54px!important}.mobile-back-button{height:32px!important;min-width:50px!important;font-size:12px!important;padding:0 8px!important}.selected-profile img{width:34px!important;height:34px!important}.selected-profile h2{font-size:14px!important}.selected-profile p{font-size:10px!important}.remark-strip{height:42px!important;grid-template-columns:minmax(0,1fr) 54px!important}.remark-strip button{width:54px!important;min-width:54px!important}.admin-composer{grid-template-columns:minmax(0,1fr) 46px 54px!important;gap:5px!important;padding:6px!important}.admin-composer textarea,.admin-composer button{min-height:42px!important}.message{max-width:82%!important}
}
/* codex mobile admin polish end */

/* codex customer mobile viewport fix start */
@media(max-width:820px){
  html,body.customer-page{width:100%;height:var(--app-height,100dvh);min-height:var(--app-height,100dvh);overflow:hidden}
  body.customer-page{background:#fff}
  .customer-page .customer-shell,.embedded-page .customer-shell{width:100%!important;height:var(--app-height,100dvh)!important;min-height:var(--app-height,100dvh)!important;padding:0!important;display:block!important;background:#fff!important}
  .customer-page .customer-frame,.embedded-page .customer-frame{width:100%!important;height:var(--app-height,100dvh)!important;min-height:0!important;display:block!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important}
  .customer-page .service-profile,.embedded-page .service-profile{display:none!important}
  .customer-page .chat-window,.embedded-page .chat-window{width:100%!important;height:var(--app-height,100dvh)!important;min-height:0!important;display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;overflow:hidden!important;background:#fff!important}
  .customer-page .chat-header,.embedded-page .chat-header{min-height:64px!important;padding:10px 14px!important;gap:10px!important;overflow:hidden!important;flex-shrink:0!important;background:#fff!important}
  .customer-page .agent-avatar,.embedded-page .agent-avatar{width:48px!important;height:48px!important}
  .customer-page .chat-header h1,.embedded-page .chat-header h1{font-size:18px!important;line-height:1.2!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .customer-page .chat-header p,.embedded-page .chat-header p{font-size:13px!important;line-height:1.25!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .customer-page .messages,.embedded-page .messages{min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:14px 14px 10px!important;-webkit-overflow-scrolling:touch!important}
  .customer-page .message,.embedded-page .message{max-width:86%!important}
  .customer-page .composer,.embedded-page .composer{grid-template-columns:minmax(0,1fr) 68px 82px!important;gap:8px!important;padding:10px 10px max(10px,env(safe-area-inset-bottom))!important;background:#fff!important;border-top:1px solid var(--line)!important;flex-shrink:0!important}
  .customer-page .composer textarea,.embedded-page .composer textarea{min-width:0!important;min-height:44px!important;max-height:86px!important;padding:10px 11px!important;font-size:16px!important}
  .customer-page .composer button,.embedded-page .composer button{min-width:0!important;min-height:44px!important;padding:0 8px!important;font-size:16px!important;white-space:nowrap!important}
  .customer-page .support-close-button,.embedded-page .support-close-button{width:38px!important;height:38px!important;font-size:24px!important}
}
@media(max-width:380px){
  .customer-page .composer,.embedded-page .composer{grid-template-columns:minmax(0,1fr) 58px 72px!important;gap:6px!important}
  .customer-page .composer button,.embedded-page .composer button{font-size:14px!important;padding:0 5px!important}
}
/* codex customer mobile viewport fix end */

/* codex mobile browser bottom bar fix start */
@media(max-width:820px){
  .customer-page .composer,.embedded-page .composer{
    padding-bottom:calc(8px + env(safe-area-inset-bottom) + var(--mobile-browser-bottom,0px))!important;
  }
  .customer-page .messages,.embedded-page .messages{
    scroll-padding-bottom:calc(78px + var(--mobile-browser-bottom,0px))!important;
  }
}
/* codex mobile browser bottom bar fix end */

/* codex mobile customer polish v6 start */
@media(max-width:820px){
  .customer-page .chat-header,.embedded-page .chat-header{
    height:68px!important;
    min-height:68px!important;
    padding:8px 14px!important;
    align-items:center!important;
    border-bottom:1px solid rgba(220,228,232,.95)!important;
  }
  .customer-page .agent-avatar,.embedded-page .agent-avatar{width:46px!important;height:46px!important}
  .customer-page .chat-header h1,.embedded-page .chat-header h1{font-size:18px!important;line-height:1.15!important;margin:0!important}
  .customer-page .chat-header p,.embedded-page .chat-header p{font-size:13px!important;line-height:1.25!important;margin-top:4px!important}
  .customer-page .messages,.embedded-page .messages{
    padding:18px 14px 12px!important;
    gap:14px!important;
  }
  .customer-page .composer,.embedded-page .composer{
    min-height:66px!important;
    align-items:center!important;
    padding-top:9px!important;
    padding-bottom:calc(9px + env(safe-area-inset-bottom) + var(--mobile-browser-bottom,0px))!important;
  }
  .customer-page .composer textarea,.embedded-page .composer textarea{min-height:42px!important;max-height:78px!important}
  .customer-page .composer button,.embedded-page .composer button{min-height:42px!important}
}
/* codex mobile customer polish v6 end */


/* codex mobile admin responsive final start */
@media(max-width:900px){
  html,body.admin-page{width:100%!important;height:var(--app-height,100dvh)!important;min-height:var(--app-height,100dvh)!important;margin:0!important;overflow:hidden!important;background:#0f1720!important}
  body.admin-page{position:fixed!important;inset:0!important;touch-action:manipulation!important}
  .admin-page .login-view{height:var(--app-height,100dvh)!important;min-height:var(--app-height,100dvh)!important;padding:16px!important;overflow:hidden!important;background:#eef2f4!important}
  .admin-page .login-box{width:min(100%,360px)!important;padding:22px!important;border-radius:10px!important}
  .admin-page .login-brand img{width:50px!important;height:50px!important}.admin-page .login-brand h1{font-size:21px!important}
  .admin-shell.hidden{display:none!important}
  .admin-shell{position:fixed!important;inset:0!important;width:100vw!important;height:var(--app-height,100dvh)!important;min-height:0!important;max-height:var(--app-height,100dvh)!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;overflow:hidden!important;background:#eef2f4!important}
  .admin-shell .info-panel,.admin-shell .sidebar-stats{display:none!important}
  .admin-shell:not(.mobile-chat-open) .admin-chat{display:none!important}
  .admin-shell.mobile-chat-open .sidebar{display:none!important}
  .admin-shell:not(.mobile-chat-open) .sidebar{width:100vw!important;height:var(--app-height,100dvh)!important;max-height:var(--app-height,100dvh)!important;display:grid!important;grid-template-rows:62px 48px minmax(0,1fr)!important;overflow:hidden!important;border:0!important;background:linear-gradient(180deg,#111820,#1b2630)!important;color:#eaf0f3!important}
  .brand-block{height:62px!important;min-height:62px!important;padding:9px 12px!important;gap:10px!important;overflow:hidden!important}.brand-block img{width:44px!important;height:44px!important}.brand-block h1{font-size:17px!important;line-height:1.15!important}.brand-block span{font-size:12px!important;margin-top:2px!important}
  .search-box{height:48px!important;padding:7px 10px!important;overflow:hidden!important}.search-box input{height:34px!important;padding:7px 10px!important;font-size:14px!important}
  .customer-list{min-height:0!important;height:100%!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;padding:8px 10px calc(16px + env(safe-area-inset-bottom))!important;display:grid!important;grid-auto-rows:minmax(72px,auto)!important;align-content:start!important;gap:8px!important}
  .customer-item{width:100%!important;min-height:72px!important;margin:0!important;padding:9px 10px!important;display:grid!important;grid-template-columns:42px minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important;overflow:hidden!important;border:1px solid rgba(255,255,255,.1)!important;border-radius:8px!important;background:rgba(255,255,255,.06)!important;color:#d9e4e8!important}.customer-item img{width:42px!important;height:42px!important}.customer-main{min-width:0!important;overflow:hidden!important}.customer-name-row{display:grid!important;grid-template-columns:8px minmax(0,1fr)!important;gap:7px!important;align-items:center!important;min-width:0!important}.customer-name{font-size:15px!important;line-height:1.22!important;color:#fff!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.customer-preview{font-size:12px!important;margin-top:5px!important;color:#b9c8ce!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.customer-location{font-size:11px!important;margin-top:3px!important;color:#7f929d!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.unread{min-width:20px!important;height:20px!important;font-size:11px!important;padding:0 6px!important}
  .admin-shell.mobile-chat-open .admin-chat{width:100vw!important;height:var(--app-height,100dvh)!important;max-height:var(--app-height,100dvh)!important;min-height:0!important;display:grid!important;grid-template-rows:56px 42px minmax(0,1fr) auto!important;overflow:hidden!important;background:#f6f8f9!important}
  .conversation-header{height:56px!important;min-height:56px!important;padding:6px 8px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:7px!important;align-items:center!important;overflow:hidden!important;background:#fff!important;border-bottom:1px solid var(--line)!important}.mobile-back-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;height:34px!important;min-width:50px!important;padding:0 8px!important;border:1px solid var(--line)!important;border-radius:999px!important;color:var(--brand)!important;background:#eef6f5!important;font-size:12px!important;font-weight:700!important;box-shadow:none!important}.selected-profile{min-width:0!important;display:flex!important;align-items:center!important;gap:8px!important;overflow:hidden!important}.selected-profile img{width:36px!important;height:36px!important}.selected-profile h2{font-size:14px!important;line-height:1.2!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.selected-profile p{font-size:10px!important;margin-top:2px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.badge{padding:4px 7px!important;font-size:11px!important;white-space:nowrap!important}
  .remark-strip{height:42px!important;grid-template-columns:minmax(0,1fr) 54px!important;gap:6px!important;padding:5px 8px!important;overflow:hidden!important;background:#fff!important}.remark-strip label{display:none!important}.remark-strip input{height:32px!important;padding:6px 8px!important;font-size:12px!important}.remark-strip button{width:54px!important;min-width:54px!important;min-height:32px!important;font-size:0!important;padding:0!important}.remark-strip button::after{content:"??";font-size:12px!important}
  .admin-messages{width:100%!important;min-height:0!important;height:100%!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;padding:10px 8px!important;scroll-padding-bottom:calc(80px + var(--mobile-browser-bottom,0px))!important}.admin-messages .empty{margin:auto!important;padding:14px!important;font-size:13px!important}.message{max-width:84%!important;min-width:0!important}.message.customer{justify-items:end!important}.bubble{max-width:100%!important;padding:8px 10px!important;line-height:1.45!important;overflow-wrap:anywhere!important;word-break:break-word!important}.message-meta{display:flex!important;flex-wrap:wrap!important;gap:4px!important;font-size:10px!important;line-height:1.2!important}.message.customer .message-meta{justify-content:flex-end!important}.time,.read-status,.edit-message-button{font-size:10px!important;line-height:1.25!important}.read-status,.edit-message-button{padding:2px 5px!important;white-space:nowrap!important}
  .admin-composer{width:100%!important;min-height:calc(58px + env(safe-area-inset-bottom) + var(--mobile-browser-bottom,0px))!important;position:relative!important;bottom:auto!important;z-index:3!important;display:grid!important;grid-template-columns:minmax(0,1fr) 46px 54px!important;gap:5px!important;align-items:start!important;padding:6px 6px calc(6px + env(safe-area-inset-bottom) + var(--mobile-browser-bottom,0px))!important;background:#fff!important;border-top:1px solid var(--line)!important;overflow:hidden!important}.admin-composer textarea{width:100%!important;min-width:0!important;min-height:42px!important;max-height:72px!important;padding:9px!important;font-size:14px!important}.admin-composer button{min-width:0!important;min-height:42px!important;padding:0!important;font-size:13px!important}.admin-composer .image-button{font-size:13px!important}.chat-image{max-width:180px!important;max-height:180px!important}
}
@media(max-width:380px){.admin-shell:not(.mobile-chat-open) .sidebar{grid-template-rows:58px 44px minmax(0,1fr)!important}.brand-block{height:58px!important;min-height:58px!important}.brand-block img{width:40px!important;height:40px!important}.brand-block h1{font-size:16px!important}.search-box{height:44px!important;padding:6px 8px!important}.customer-list{grid-auto-rows:minmax(66px,auto)!important;padding:7px 8px calc(14px + env(safe-area-inset-bottom))!important}.customer-item{min-height:66px!important;grid-template-columns:40px minmax(0,1fr) auto!important;padding:8px!important}.customer-item img{width:40px!important;height:40px!important}.admin-shell.mobile-chat-open .admin-chat{grid-template-rows:54px 40px minmax(0,1fr) auto!important}.conversation-header{height:54px!important;min-height:54px!important}.selected-profile img{width:34px!important;height:34px!important}.admin-composer{grid-template-columns:minmax(0,1fr) 44px 52px!important;gap:5px!important}}
/* codex mobile admin responsive final end */


/* codex customer mobile header final start */
@media(max-width:820px){
  html,body.customer-page{
    width:100%!important;
    height:var(--app-height,100dvh)!important;
    min-height:var(--app-height,100dvh)!important;
    overflow:hidden!important;
    background:#fff!important;
  }
  .customer-page .customer-shell,.embedded-page .customer-shell,
  .customer-page .customer-frame,.embedded-page .customer-frame{
    height:var(--app-height,100dvh)!important;
    min-height:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
  }
  .customer-page .chat-window,.embedded-page .chat-window{
    height:var(--app-height,100dvh)!important;
    min-height:0!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    overflow:hidden!important;
    background:#fff!important;
  }
  .customer-page .chat-header,.embedded-page .chat-header{
    height:92px!important;
    min-height:92px!important;
    max-height:92px!important;
    padding:18px 16px 12px!important;
    gap:11px!important;
    align-items:center!important;
    overflow:hidden!important;
    background:#fff!important;
    border-bottom:1px solid rgba(220,228,232,.95)!important;
  }
  .customer-page .agent-avatar,.embedded-page .agent-avatar{
    width:46px!important;
    height:46px!important;
    flex:0 0 46px!important;
    border-radius:8px!important;
    object-fit:cover!important;
  }
  .customer-page .chat-header>div,.embedded-page .chat-header>div{
    min-width:0!important;
    height:46px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    gap:3px!important;
    overflow:hidden!important;
  }
  .customer-page .chat-header h1,.embedded-page .chat-header h1{
    margin:0!important;
    padding:0!important;
    font-size:18px!important;
    line-height:22px!important;
    height:22px!important;
    font-weight:800!important;
    max-width:100%!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }
  .customer-page .chat-header p,.embedded-page .chat-header p{
    margin:0!important;
    padding:0!important;
    font-size:13px!important;
    line-height:18px!important;
    height:18px!important;
    max-width:100%!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }
  .customer-page .support-close-button,.embedded-page .support-close-button{
    width:40px!important;
    height:40px!important;
    flex:0 0 40px!important;
    align-self:center!important;
    margin-left:auto!important;
    font-size:25px!important;
  }
  .customer-page .messages,.embedded-page .messages{
    min-height:0!important;
    overflow-y:auto!important;
    padding-top:16px!important;
  }
}
@media(max-width:380px){
  .customer-page .chat-header,.embedded-page .chat-header{height:86px!important;min-height:86px!important;max-height:86px!important;padding:15px 12px 10px!important;gap:9px!important}
  .customer-page .agent-avatar,.embedded-page .agent-avatar{width:42px!important;height:42px!important;flex-basis:42px!important}
  .customer-page .chat-header>div,.embedded-page .chat-header>div{height:42px!important}
  .customer-page .chat-header h1,.embedded-page .chat-header h1{font-size:17px!important;line-height:21px!important;height:21px!important}
  .customer-page .chat-header p,.embedded-page .chat-header p{font-size:12px!important;line-height:17px!important;height:17px!important}
  .customer-page .support-close-button,.embedded-page .support-close-button{width:38px!important;height:38px!important;flex-basis:38px!important}
}
/* codex customer mobile header final end */
