:root{--yile-blue:#073467;--yile-green:#398900;--yile-teal:#075567;--yile-paper:#f3f7fa}
body{background:var(--yile-paper)}
.sidebar {
  width:234px;
  min-height:0;
  flex-shrink:0;
  display:flex;
  flex-direction:column;
  background:#fff;
  color:#20354b;
  border-right:1px solid #d9e4ed;
}
.sidebar-brand {
  display:grid;
  justify-items:start;
  gap:4px;
  padding:14px 17px 13px;
  background:#f6f9fc;
  border-bottom:1px solid #d9e4ed;
  color:var(--yile-blue);
  font-size:16px;
  font-weight:750;
}
.sidebar-brand img{display:block;width:min(100%,175px);border-radius:7px;margin-bottom:3px}
.sidebar-brand small{color:#435970;font-size:11px;letter-spacing:.06em}
.sidebar-nav{flex:1;min-height:0;padding:9px 10px 12px;overflow-y:auto}
.sidebar-nav .nav-group {
  margin:14px 0 5px;
  padding:4px 9px;
  border-radius:6px;
  background:#edf4fa;
  color:#284b6a;
  font-size:12px;
  font-weight:750;
  letter-spacing:.07em;
}
.sidebar-nav .nav-group:first-child{margin-top:2px}
.sidebar-nav a {
  display:flex;
  align-items:center;
  gap:9px;
  min-height:36px;
  margin-bottom:2px;
  padding:5px 8px;
  border:1px solid transparent;
  border-radius:7px;
  color:#20354b;
  text-decoration:none;
  font-size:14px;
  font-weight:620;
}
.sidebar-nav .nv-ico {
  width:23px;
  height:23px;
  display:grid;
  place-items:center;
  flex-shrink:0;
  border-radius:6px;
  background:#eef3f8;
  color:#244e75;
  font-size:14px;
}
.sidebar-nav a:hover{background:#f1f6fa;color:var(--yile-blue)}
.sidebar-nav a.active {
  background:#e4effb;
  border-color:#b9cee5;
  box-shadow:inset 3px 0 var(--yile-green);
  color:var(--yile-blue);
  font-weight:750;
}
.sidebar-nav a.active .nv-ico{background:#cfe2f7}
.sidebar a:focus-visible{outline:2px solid var(--yile-blue);outline-offset:-2px}
.sidebar-footer {
  padding:10px 15px;
  border-top:1px solid #d9e4ed;
  background:#f6f9fc;
  color:#3c5269;
  font-size:11px;
}
.sidebar-footer #sidebarCompany{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-footer #sidebarUser,.sidebar-footer #appVersion{margin-top:6px}
.sidebar-account{font-weight:700;color:#20354b}
.sidebar-role{font-weight:500;color:#435970}
.sidebar-footer #appVersion{display:flex;gap:10px;align-items:center}
.sidebar-footer a{color:var(--yile-blue);text-decoration:none}
.sidebar-footer a:hover{text-decoration:underline}
.btn-pri{background:var(--yile-blue)}
input:focus,select:focus,textarea:focus{border-color:var(--yile-teal);box-shadow:0 0 0 3px #07556722}
.yl{max-width:1180px;margin:0 auto;color:#173148}
.yl [hidden]{display:none}
.yl-hero{display:flex;justify-content:space-between;align-items:center;gap:18px;background:var(--yile-blue);border-radius:16px;padding:26px 32px;color:#fff;border-bottom:5px solid var(--yile-green)}
.yl-hero img{width:min(29%,180px);border-radius:9px}
.yl-hero small{letter-spacing:.18em;color:#d4e7f6;font-size:10px;font-weight:750}
.yl-hero h1{font-size:28px;margin:4px 0}
.yl-hero p{color:#d4e7f6}
.yl-body{margin-top:16px}
.yl-tiles,.yl-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}
.yl-tiles{margin-bottom:14px}
.yl-tiles button{background:#fff;border:1px solid #dce7ee;border-radius:12px;text-align:left;padding:14px 16px;color:var(--yile-blue);cursor:pointer}
.yl-tiles button[aria-pressed=true]{border-color:var(--yile-green);box-shadow:inset 0 3px var(--yile-green);background:#f4faee}
.yl-tiles strong,.yl-tiles span{display:block}
.yl-tiles strong{font-size:15px}
.yl-tiles span,.yl-muted{font-size:12px;color:#50667b}
.yl-card{padding:16px;background:white;border:1px solid #dce7ee;border-radius:12px;margin-bottom:12px}
.yl-card h2{font-size:16px;color:var(--yile-blue)}
.yl-form,.yl-output .yl-card{display:grid;gap:12px}
.yl label{display:grid;gap:4px;font-weight:600}
.yl input,.yl textarea,.yl select{font:inherit;font-weight:400}
.yl .btn{justify-self:start}
.yl-actions,.yl-pagination{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.yl-pagination{margin:14px 0}
.yl-pagination strong{margin-right:auto}
.yl-keyword{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 14px;align-items:start}
.yl-keyword details{grid-column:1/-1;overflow-wrap:anywhere}
.yl-keyword li{margin-left:18px}
.yl-document pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;margin-top:12px}
@media(max-width:700px){.sidebar{width:158px}.sidebar-brand{padding:9px}.sidebar-nav{padding-inline:6px}.sidebar-nav a{font-size:13px;gap:5px}#mainPane{padding:12px!important}.yl-hero{padding:15px}.yl-hero h1{font-size:20px}}
.yl-draft{background:#f2f8ed;border-left:3px solid var(--yile-green);padding:10px 12px;border-radius:6px}
.yl .yl-check{display:flex;align-items:center;gap:8px}.yl .yl-check[hidden]{display:none}.yl-check input{width:auto}

.yl-list-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.yl-guide{inset:0;margin:auto;width:min(620px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow:auto;border:0;border-top:5px solid var(--yile-blue);border-radius:14px;padding:24px;color:#173148;background:#fff;box-shadow:0 16px 46px #071a3340}
.yl-guide::backdrop{background:#14253c80}
.yl-guide h2{font-size:20px;color:var(--yile-blue);margin:0 0 5px}
.yl-guide p{color:#50667b;margin:0 0 12px}
.yl-guide section{border:1px solid #dce7ee;border-radius:10px;background:#f4f8fa;padding:12px 14px;margin-top:9px}
.yl-guide h3{font-size:14px;margin:0 0 3px}
.yl-guide-footer{display:flex;justify-content:flex-end;margin-top:14px}

.yl-external-details{margin:0 18px 5px;border:1px solid #dce5f0;border-radius:8px;background:#f8fbff}
.yl-external-details>summary{cursor:pointer;color:#315484;font-size:12px;font-weight:650;padding:7px 10px}
.yl-external-search{padding:4px 10px 12px;max-height:min(60vh,520px);overflow:auto;display:grid;gap:8px}
.yl-external-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.yl-external-search label{display:grid;gap:3px;color:#27394e;font-size:12px}
.yl-external-search p{margin:0;color:#526176;font-size:11px}
.yl-external-search p:empty{display:none}
.yl-external-actions{display:flex;flex-wrap:wrap;gap:7px}
.yl-external-search textarea{resize:vertical}
.yl-external-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}

.yl-reception pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f2f6fa;border-radius:8px;padding:12px;font:inherit}
.yl-reception details,.yl-reception [data-matches]{margin-top:12px}
.yl-reception [data-recent] .btn,.yl-reception [data-matches] .btn,.yl-reception [data-rows] .btn{margin:6px 8px 0 0}
.yl-reception summary{cursor:pointer;font-weight:650}
.yl-reception [role=status]{white-space:pre-wrap}
@media(max-width:640px){
  body>div:first-of-type{flex-direction:column;height:100dvh!important}
  .sidebar{width:100%;border-right:0;border-bottom:1px solid #d9e4ed;flex-shrink:0}
  .sidebar-brand,.sidebar-footer{display:none}
  .sidebar-nav{display:flex;padding:5px;overflow-x:auto;gap:4px;white-space:nowrap}
  .sidebar-nav .nav-group{display:none}
  .sidebar-nav a{flex-shrink:0;padding:7px 9px;margin-bottom:0;min-height:40px}
  #mainPane{min-width:0;padding:12px!important}
  .yl-hero{padding:14px}
  .yl-hero h1{font-size:22px}
  .yl-reception .yl-fields{grid-template-columns:1fr}
  .yl-reception input,.yl-reception select,.yl-reception textarea{max-width:100%;font-size:16px}
  .yl-reception .btn{min-height:42px}
}

.yl-source-entry{display:grid;gap:6px;min-width:0}
.yl-source-header{display:flex;align-items:center;justify-content:space-between;gap:8px}
.yl-source-header .btn{flex:none}
.yl-source-entry textarea{width:100%}
.yl-upload-name{overflow-wrap:anywhere}
.yl-upload-name:empty{display:none}
.yl-reception [data-ocr] label{margin-block:8px}
.yl-reception .yl-form details .yl-fields{margin-block:8px}
@media(max-width:640px){
  .yl-reception .yl-card{min-width:0}
  .yl-reception .btn{min-height:44px;white-space:normal}
  .yl-reception form>button[type=submit]{width:100%}
  .yl-reception .yl-tiles{gap:5px}
  .yl-reception .yl-tiles button{min-height:52px;padding:6px}
  .yl-reception .yl-tiles button span{display:none}
}

#mobileLogout{display:none}
@media(max-width:640px){
  #mobileLogout:not([hidden]){display:block;order:1;min-height:44px;flex:none;padding:6px 10px;background:white;border:1px solid #d9e4ed;border-radius:8px;color:#103d64;font-weight:650}
  .yl-login input{font-size:16px;min-height:44px}
  .yl-login button{min-height:44px}
}

.yl-detail-form{display:grid;gap:10px}
.yl-detail-form label{display:grid;gap:4px}
.yl-detail-form button{justify-self:start}
.yl-product-set{padding:8px 10px;border:1px solid #dce7ee;border-radius:8px}
.yl-product-set div{display:flex;gap:10px;flex-wrap:wrap}
.yl-product-set label{display:flex;align-items:center;gap:5px}
.yl-product-set input{width:auto}
.yl-next-summary{max-width:min(480px,100%);overflow-wrap:anywhere;color:#183c54;font-weight:600}
.yl-legacy-marker{background:#fff8e7;color:#704b15;padding:8px 10px;border-radius:8px;margin-bottom:8px}
.yl-legacy-text{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:640px){
  .yl-detail-form .yl-fields{grid-template-columns:minmax(0,1fr)}
  .yl-detail-form input,.yl-detail-form select,.yl-detail-form textarea{font-size:16px}
}

.yl-flow-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 15px}
.btn.yl-flow-step{
  min-height:46px;
  padding:9px 14px;
  background:#fff;
  color:#103d64;
  border-color:#819ab1;
  text-align:left;
  white-space:normal;
  font-size:15px;
  font-weight:700;
  line-height:1.4;
}
.btn.yl-flow-step:hover:not([aria-pressed=true]){background:#e7eff8;border-color:#6b8aa9}
.btn.yl-flow-step[aria-pressed=true]{background:#103d64;border-color:#103d64;color:#fff}
:is(button,a,summary,[role=button]):focus-visible{outline:2px solid #1268a0;outline-offset:2px}
.drawer-tabs button:focus-visible{outline-offset:-3px}
.yl-list-flow{display:flex;gap:4px;justify-content:flex-end;flex-wrap:wrap;margin-top:4px}
.yl-list-missing{color:#805519}
[data-flow-detail]>label{display:grid;margin-bottom:6px;gap:4px}
[data-flow-detail] details textarea{max-width:100%}
@media(max-width:640px){
  input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px}
  .btn.yl-flow-step{padding-inline:10px}
  .yl-list-flow .btn{min-height:36px}
}

/* WhatsApp intake: one prominent upload and readable mobile review. */
.yl-chat-upload h2{color:#103d64;margin-bottom:8px}
.yl-chat-picker{padding:20px;background:#f0f8f3;border:2px dashed #2e7c42;border-radius:12px;color:#173d26;gap:12px}
.yl-chat-picker input{background:#fff;width:100%;min-width:0;min-height:46px;color:#172b40}
.yl-chat-files{white-space:normal;margin:12px 0;font-weight:400;font-family:inherit}
.yl-chat-files pre{max-height:320px;overflow:auto;overflow-wrap:anywhere;white-space:pre-wrap;background:#f3f6f9;padding:12px;border-radius:8px;color:#182e44}
.yl-chat-files [data-attachments]{display:grid;gap:5px;max-height:300px;overflow:auto}
.yl-chat-files button{white-space:normal;overflow-wrap:anywhere;text-align:left}
.yl-reception [data-ai-connection]{margin:8px 0 16px}
.yl-reception [data-matches]{display:flex;flex-wrap:wrap;gap:10px}
.yl-reception [data-inbound]{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:640px){.yl-chat-picker{padding:12px}.yl-reception .btn{min-height:44px}.yl-chat-upload input{font-size:16px}}

/* Customer materials: legible on mobile, filenames never widen the page. */
.yl-material-upload, .yl-material-panel, .yl-material-file {min-width:0;overflow-wrap:anywhere;}
.yl-material-upload .yl-chat-picker {display:grid;gap:12px;}
.yl-material-upload textarea, .yl-material-file textarea {width:100%;min-height:100px;font-size:16px;color:#16324a;background:#fff;}
.yl-material-selected {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;}
.yl-material-selected span {min-width:0;overflow-wrap:anywhere;}
.yl-material-file {padding:12px;border:1px solid #c8d9e8;border-radius:10px;background:#fff;margin:10px 0;}
.yl-material-file summary {color:#123c5b;font-weight:650;cursor:pointer;}
.yl-material-file label {display:grid;gap:8px;margin-top:12px;}
.yl-material-file .yl-material-check {display:flex;align-items:center;gap:10px;}
.yl-material-check input {width:22px;height:22px;flex:none;}
.yl-material-panel pre {white-space:pre-wrap;overflow-wrap:anywhere;}
@media(max-width:640px){.yl-material-upload .yl-actions {display:flex;flex-wrap:wrap;}.yl-material-upload .btn {min-height:44px;white-space:normal;}.yl-material-file .yl-actions {display:flex;flex-wrap:wrap;}}

/* Unified reception: legible progress and one reply workspace, on phone and desktop. */
.yl-assistant p {white-space:pre-wrap;overflow-wrap:anywhere;color:#20364d;line-height:1.7}
.yl-assistant h2,.yl-assistant h3 {color:#103b63}
.yl-assistant-progress {border-left:4px solid #358318;padding:12px 16px;background:#edf7ed;font-weight:600}
.yl-assistant-reply {padding:20px;border:1px solid #b5c9df;background:#f4f9fe;border-radius:12px;margin:20px 0}
.yl-assistant textarea,.yl-assistant input {box-sizing:border-box;width:100%;color:#16324b;background:white;border:1px solid #9bb2cc;border-radius:8px;padding:12px;font:inherit;line-height:1.6}
.yl-assistant details {margin-top:18px;border-top:1px solid #d7e2ef;padding-top:12px}
.yl-assistant-context {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 0 18px;color:#143f66}
.yl-reception [data-recent] {display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
@media(max-width:600px){.yl-assistant-reply{padding:12px}.yl-assistant .yl-actions{display:flex;flex-direction:column;align-items:stretch}.yl-assistant .yl-actions>*{min-height:44px}.yl-assistant h2{font-size:20px}}
