/* UlimiLink Chat: in-app messaging. All selectors prefixed .uc- */
.uc-root{
  --uc-ink:var(--text-primary,#111827);--uc-sub:var(--text-secondary,#4B5563);--uc-mute:var(--text-tertiary,#9CA3AF);
  --uc-line:var(--border,#E5E7EB);--uc-bg:var(--bg-app,#F1F5F3);--uc-dark:var(--soil,#1B2C1A);--uc-green:var(--leaf,#3D6B38);
  position:fixed;inset:0;z-index:10010;display:none;flex-direction:column;background:var(--uc-bg);color:var(--uc-ink);
  font-family:var(--font-sans,system-ui,-apple-system,'Segoe UI',sans-serif);font-size:14px;line-height:1.4}
.uc-root.uc-open{display:flex;animation:uc-in .26s cubic-bezier(.16,1,.3,1)}
@keyframes uc-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.uc-root *{box-sizing:border-box}.uc-root button{font-family:inherit}
.uc-ico{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.uc-ico.sm{width:14px;height:14px}.uc-ico.xl{width:44px;height:44px;stroke-width:1.5}

.uc-head{background:var(--uc-dark);color:#fff;padding:12px 16px;padding-top:calc(12px + env(safe-area-inset-top,0px));display:flex;align-items:center;gap:12px;flex:none}
.uc-head h2{margin:0;flex:1;font-size:18px;font-weight:800}
.uc-iconbtn{width:38px;height:38px;border-radius:10px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.08);color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:none;text-decoration:none}
.uc-iconbtn:hover{background:rgba(255,255,255,.18)}

.uc-body{flex:1;min-height:0;display:flex}
.uc-list{width:100%;display:flex;flex-direction:column;min-height:0;background:#fff}
.uc-thread{width:100%;display:none;flex-direction:column;min-height:0;background:var(--uc-bg)}
.uc-root.uc-in-thread .uc-list{display:none}
.uc-root.uc-in-thread .uc-thread{display:flex}
.uc-root.uc-in-thread .uc-head{display:none}
@media(min-width:860px){
  .uc-list{width:340px;flex:none;border-right:1px solid var(--uc-line)}
  .uc-thread{display:flex;flex:1;width:auto}
  .uc-root.uc-in-thread .uc-list{display:flex}
  .uc-root.uc-in-thread .uc-head{display:flex}
  .uc-back{display:none!important}
}

.uc-search{padding:10px 12px;border-bottom:1px solid var(--uc-line);position:relative}
.uc-search .uc-ico{position:absolute;left:24px;top:50%;transform:translateY(-50%);color:var(--uc-mute)}
.uc-search input{width:100%;padding:10px 12px 10px 38px;border:1px solid var(--uc-line);border-radius:10px;font-size:14px;font-family:inherit;outline:none;background:var(--uc-bg)}
.uc-tabs{display:flex;gap:6px;padding:8px 12px;border-bottom:1px solid var(--uc-line)}
.uc-tab{border:1px solid var(--uc-line);background:#fff;border-radius:99px;padding:5px 13px;font-size:12.5px;font-weight:700;color:var(--uc-sub);cursor:pointer}
.uc-tab.active{background:#EDF7EB;border-color:#5B9B53;color:var(--uc-green)}
.uc-items{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}
.uc-item{display:flex;gap:12px;padding:12px 14px;border-bottom:1px solid var(--uc-line);cursor:pointer;align-items:center;outline:none}
.uc-item:hover,.uc-item:focus-visible,.uc-item.active{background:#F3F8F2}
.uc-av{width:44px;height:44px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:15px;background:var(--c,#3D6B38)}
.uc-av.sm{width:36px;height:36px;font-size:13px}
.uc-meta{flex:1;min-width:0}
.uc-row{display:flex;align-items:baseline;gap:8px}
.uc-name{font-weight:700;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.uc-time{font-size:11.5px;color:var(--uc-mute);flex:none}
.uc-prev{font-size:13px;color:var(--uc-sub);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
.uc-item.unread .uc-name,.uc-item.unread .uc-prev{color:var(--uc-ink);font-weight:700}
.uc-dot{min-width:20px;height:20px;border-radius:99px;background:#2f8f1e;color:#fff;font-size:11.5px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;padding:0 6px;flex:none}
.uc-role{font-size:11px;font-weight:700;color:var(--uc-green);text-transform:uppercase;letter-spacing:.3px}

.uc-thead{background:#fff;border-bottom:1px solid var(--uc-line);padding:10px 12px;padding-top:calc(10px + env(safe-area-inset-top,0px));display:flex;align-items:center;gap:10px;flex:none}
.uc-thead .uc-meta b{display:block}
.uc-btn{width:38px;height:38px;border-radius:10px;border:1px solid var(--uc-line);background:#fff;color:var(--uc-ink);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none;flex:none}
.uc-btn:hover{background:#f3f4f6}
.uc-ctx{margin:10px 12px 0;padding:9px 12px;border-radius:10px;background:#fff;border:1px solid var(--uc-line);font-size:12.5px;display:flex;gap:8px;align-items:center;color:var(--uc-sub)}
.uc-ctx b{color:var(--uc-ink)}
.uc-safe{margin:10px 12px 0;padding:8px 12px;border-radius:10px;background:#EFF6FF;color:#1E3A8A;font-size:12px;display:flex;gap:8px;align-items:flex-start}
.uc-msgs{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:6px;-webkit-overflow-scrolling:touch}
.uc-day{align-self:center;font-size:11.5px;color:var(--uc-sub);background:rgba(0,0,0,.05);border-radius:99px;padding:2px 10px;margin:6px 0}
.uc-m{max-width:78%;padding:8px 12px;border-radius:14px;word-wrap:break-word;overflow-wrap:anywhere;white-space:pre-wrap;box-shadow:0 1px 1px rgba(0,0,0,.05)}
.uc-m.them{align-self:flex-start;background:#fff;border-bottom-left-radius:4px}
.uc-m.me{align-self:flex-end;background:#DDF2D6;border-bottom-right-radius:4px}
.uc-m small{display:flex;gap:4px;justify-content:flex-end;align-items:center;font-size:10.5px;color:var(--uc-sub);margin-top:2px}
.uc-typing{align-self:flex-start;background:#fff;border-radius:14px;padding:10px 14px;display:flex;gap:4px}
.uc-typing i{width:6px;height:6px;border-radius:50%;background:var(--uc-mute);animation:uc-b 1s infinite}
.uc-typing i:nth-child(2){animation-delay:.15s}.uc-typing i:nth-child(3){animation-delay:.3s}
@keyframes uc-b{0%,60%,100%{transform:none;opacity:.5}30%{transform:translateY(-4px);opacity:1}}
.uc-quick{display:flex;gap:6px;overflow-x:auto;padding:6px 12px 0;scrollbar-width:none;flex:none}
.uc-quick::-webkit-scrollbar{display:none}
.uc-quick button{flex:none;border:1px solid var(--uc-line);background:#fff;border-radius:99px;padding:6px 12px;font-size:12.5px;font-weight:600;color:var(--uc-sub);cursor:pointer;white-space:nowrap}
.uc-comp{display:flex;gap:8px;align-items:flex-end;padding:10px 12px;padding-bottom:calc(10px + env(safe-area-inset-bottom,0px));background:var(--uc-bg);flex:none}
.uc-comp textarea{flex:1;resize:none;max-height:110px;min-height:42px;padding:10px 14px;border:1px solid var(--uc-line);border-radius:21px;font-size:14.5px;font-family:inherit;outline:none;background:#fff;line-height:1.35}
.uc-comp textarea:focus,.uc-search input:focus{border-color:#5B9B53;box-shadow:0 0 0 3px rgba(91,155,83,.18)}
.uc-send{width:42px;height:42px;border-radius:50%;border:none;background:linear-gradient(135deg,#5db83a,#2f8f1e);color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:none}
.uc-send:disabled{opacity:.45;cursor:default}
.uc-empty{margin:auto;text-align:center;padding:32px 20px;color:var(--uc-sub)}
.uc-empty .uc-ico{color:var(--uc-mute);margin-bottom:8px}.uc-empty h4{margin:0 0 4px;color:var(--uc-ink);font-size:16px}

/* entry points / badge */
.uc-badge{min-width:18px;height:18px;border-radius:99px;background:#DC2626;color:#fff;font-size:11px;font-weight:800;display:none;align-items:center;justify-content:center;padding:0 5px;margin-left:auto}
.uc-badge.show{display:inline-flex}
.uc-nav-ico{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(prefers-reduced-motion:reduce){.uc-root.uc-open{animation:none}.uc-typing i{animation:none}}
