.comm-error{color:#9c303a;white-space:pre-wrap}.comm-error:empty{display:none}.comm-workspace{display:grid;grid-template-columns:300px minmax(0,1fr);min-height:580px;border:1px solid #dce3eb;border-radius:16px;background:#fff;overflow:hidden}.comm-inbox{background:#f7f9fc;border-right:1px solid #dce3eb;padding:20px 12px;min-width:0}.comm-inbox>label{padding:0 8px}.comm-list{max-height:650px;overflow:auto;margin-top:20px}.comm-customer{display:flex;flex-direction:column;gap:6px;width:100%;text-align:left;border:0;border-radius:10px;background:transparent;padding:16px 12px;color:#18324f}.comm-customer:hover,.comm-customer.selected{background:#e7eef7}.comm-customer-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.comm-customer time{font-size:10px;color:#65768b}.comm-customer small{font-size:12px}.comm-preview{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;font-size:13px;color:#52657a}.comm-detail{min-width:0}.comm-empty{padding:36px;color:#62758b}.comm-empty h2{color:#18324f}.messenger{height:650px;max-height:calc(100dvh - 150px);min-height:400px;display:flex;flex-direction:column;background:#f3f6fa}.chat-header{display:flex;gap:14px;align-items:center;padding:20px 24px;background:white;border-bottom:1px solid #e0e6ef}.chat-heading h2{font-size:23px;margin:3px 0}.chat-contact-photo{display:flex;align-items:center;justify-content:center;background:#1b3655;color:white;width:44px;height:44px;border-radius:50%;font-size:20px}.chat-history{flex:1;min-height:160px;overflow:auto;padding:24px;scrollbar-gutter:stable}.chat-day{text-align:center;color:#69798c;font-size:11px;margin:18px 0}.chat-message{display:flex;margin:8px 0}.chat-message-own{justify-content:flex-end}.chat-bubble{background:white;border:1px solid #e1e7ee;border-radius:15px 15px 15px 4px;padding:12px 16px;max-width:min(82%,600px);min-width:95px;box-shadow:0 2px 4px #18324f05}.chat-message-own .chat-bubble{background:#183956;color:#fff;border:0;border-radius:15px 15px 4px 15px}.chat-author{font-size:11px;font-weight:700;margin-bottom:6px;opacity:.7}.chat-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;font-size:14px}.chat-time{display:block;font-size:10px;text-align:right;margin-top:7px;opacity:.65}.chat-attachment{display:block;margin-top:10px;color:inherit;overflow-wrap:anywhere}.chat-composer{background:#fff;border-top:1px solid #e0e6ef;padding:18px 24px}.chat-input-row{display:flex;gap:12px;align-items:flex-end}.chat-input-row textarea{flex:1;resize:vertical;min-height:54px;max-height:140px}.chat-composer-tools{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-top:10px;font-size:11px;color:#65768b}.chat-composer-tools details{max-width:60%}.chat-send-status{font-size:12px;margin:8px 0 0;min-height:16px}.chat-new{align-self:center;margin:4px}.chat-load-older{display:block;margin:0 auto 20px}.chat-empty{text-align:center;color:#64748b;padding:35px 10px}.comm-filters{display:flex;align-items:end;gap:18px;flex-wrap:wrap;margin-bottom:20px}.comm-filters>label:first-child{flex:1;min-width:200px}.comm-check{display:flex!important;flex-direction:row!important;align-items:center;gap:9px}.comm-check input{width:auto}.comm-ticket-row{display:grid;grid-template-columns:minmax(220px,1fr) 160px 90px 160px;align-items:center;gap:18px;width:100%;border:0;border-bottom:1px solid #e1e7ef;background:#fff;text-align:left;padding:20px;color:#18324f}.comm-ticket-row:hover{background:#f6f8fc}.comm-ticket-row>span:first-child{display:flex;flex-direction:column;gap:6px}.comm-ticket-row small,.comm-ticket-row time{font-size:12px;color:#687c92}.comm-ticket-detail{padding:28px;margin-top:24px}.comm-ticket-head{display:flex;align-items:start;justify-content:space-between;gap:18px}.comm-ticket-head h2{margin:8px 0}.comm-ticket-edit fieldset{border:0;margin:0;padding:0}.comm-ticket-edit .form-grid{margin:20px 0}.comm-ticket-detail h3{margin-top:30px}.ticket-comment{border-bottom:1px solid #e0e6ed;padding:18px 0}.ticket-comment header{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.ticket-comment time{font-size:11px;color:#62758b}.ticket-comment p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}.ticket-comment-internal{background:#fff6df;padding:18px;border-radius:8px}.comm-comment-form{display:grid;gap:16px;margin-top:25px}.comm-more{margin:16px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:1000px){.comm-workspace{grid-template-columns:240px minmax(0,1fr)}.comm-ticket-row{grid-template-columns:1fr 120px}.comm-ticket-row>time{display:none}}
@media(max-width:650px){.comm-workspace{display:block}.comm-inbox{border-right:0;border-bottom:1px solid #dce3eb;padding:12px}.comm-list{max-height:170px;margin-top:8px}.comm-customer{padding:10px}.comm-detail .messenger{height:600px;max-height:none;min-height:450px}.chat-history{padding:14px}.chat-header,.chat-composer{padding:16px}.chat-heading h2{font-size:20px}.chat-composer-tools>small{display:none}.chat-bubble{max-width:90%}.comm-ticket-detail{padding:18px}.comm-ticket-head{display:block}.comm-ticket-row{padding:16px;gap:8px;grid-template-columns:1fr 100px}.comm-ticket-row>span:nth-child(3){display:none}.chat-input-row{gap:8px}.chat-send{padding:14px 12px!important}}
.chat-back{display:none}.chat-heading{min-width:0}.chat-heading h2,.chat-heading small{overflow-wrap:anywhere}.chat-contact-photo{flex-shrink:0}
@media(max-width:650px){
  .jauns-chat-open,.jauns-chat-open body{overflow:hidden}
  .comm-workspace{min-height:calc(100dvh - 220px)}
  .comm-workspace:not(.is-chat-open)>.comm-detail{display:none}
  .comm-inbox{border:0;padding:16px 12px}
  .comm-list{max-height:none;margin-top:16px}
  .comm-customer{padding:16px 12px;gap:8px;border-bottom:1px solid #e7ecf3;border-radius:0;min-height:92px}
  .comm-customer-top strong{font-size:16px}.comm-preview{font-size:14px}
  .comm-workspace.is-chat-open{position:fixed;z-index:150;top:var(--chat-top,0px);left:0;right:0;height:var(--chat-height,100dvh);min-height:0;border:0;border-radius:0;overscroll-behavior:none}
  .comm-workspace.is-chat-open>.comm-inbox{display:none}
  .comm-workspace.is-chat-open>.comm-detail{display:block;height:100%}
  .comm-workspace.is-chat-open .messenger{height:100%;max-height:none;min-height:0}
  .chat-back{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex-shrink:0;border:0;background:transparent;color:#18324f;font-size:14px;min-height:44px;min-width:64px;padding:6px 8px;margin-left:-8px}
  .chat-back span:first-child{font-size:25px}.chat-back:focus-visible{outline:2px solid #4355dc;outline-offset:2px;border-radius:8px}
  .chat-header{flex-shrink:0;gap:10px;padding:calc(10px + env(safe-area-inset-top)) 16px 10px}
  .chat-header .eyebrow{display:none}.chat-heading h2{font-size:17px;line-height:1.2;margin:0 0 3px}
  .chat-heading small{font-size:12px}.chat-contact-photo{width:36px;height:36px;font-size:16px}
  .chat-history{min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:auto;padding:16px 12px}
  .chat-composer{flex-shrink:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
  .chat-input-row textarea{font-size:16px;min-height:44px;max-height:100px;resize:none;border-radius:14px}
  .chat-input-row .chat-send{min-height:44px;border-radius:12px}
  .chat-composer-tools{margin-top:7px}.chat-composer-tools button{min-height:32px}
  .chat-send-status:empty{display:none}
}
/* Let desktop chats use the remaining viewport instead of a fixed 650px. */
@media (min-width:651px) {
  .app-body:has(#main > .comm-workspace) {
    display:flex;
    flex-direction:column;
    height:100dvh;
    min-height:0;
  }
  .app-body:has(#main > .comm-workspace) > .topbar { flex-shrink:0; }
  .app-body:has(#main > .comm-workspace) > .app-footer { display:none; }
  #main:has(> .comm-workspace) {
    display:flex;
    flex-direction:column;
    flex:1;
    min-height:0;
    width:100%;
    margin:0 auto;
  }
  #main:has(> .comm-workspace) > .page-head { flex-shrink:0; }
  #main > .comm-workspace {
    flex:1;
    min-height:0;
    grid-template-rows:minmax(0,1fr);
  }
  .comm-workspace > .comm-inbox {
    display:flex;
    flex-direction:column;
    min-height:0;
  }
  .comm-inbox > label { flex-shrink:0; }
  .comm-inbox > .comm-list { flex:1; min-height:0; max-height:none; }
  .comm-workspace > .comm-detail { min-height:0; overflow:hidden; }
  .comm-detail > .messenger { height:100%; min-height:0; max-height:none; }
  .messenger > .chat-header, .messenger > .chat-composer { flex-shrink:0; }
  .messenger > .chat-history { min-height:0; }
}
