/* Puane CRM — fixed, non-overlapping message composer */
.pc-panel {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.pc-panel > .pc-messages {
  min-height: 0;
  overflow-y: auto;
}
.pc-panel > .pc-composer-host {
  min-height: 0;
  border-top: 1px solid #e6e8ef;
  background: #fff;
}
.pc-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
}
.pc-row { display: flex; align-items: flex-end; gap: 8px; }
.pc-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  max-height: 160px;
  resize: none;
  padding: 10px 12px;
  border: 1px solid #d9dce6;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  background: #fff;
}
.pc-input:focus { outline: 2px solid #4f46e5; outline-offset: 1px; border-color: transparent; }
.pc-input:disabled { background: #f4f5f8; cursor: not-allowed; }
.pc-icon, .pc-send {
  flex: 0 0 auto;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #d9dce6;
  background: #fff;
  cursor: pointer;
  font: inherit;
}
.pc-icon { width: 42px; font-size: 18px; }
.pc-send { padding: 0 18px; background: #4f46e5; border-color: #4f46e5; color: #fff; font-weight: 600; }
.pc-icon:disabled, .pc-send:disabled { opacity: .5; cursor: not-allowed; }
.pc-notice {
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff7e6;
  border: 1px solid #f5d48a;
  color: #7a5200;
  font-size: 13px;
}
.pc-error {
  padding: 8px 12px;
  border-radius: 8px;
  background: #fdecec;
  border: 1px solid #f3b4b4;
  color: #9b1c1c;
  font-size: 13px;
}
.pc-notice[hidden], .pc-error[hidden], .pc-previews[hidden] { display: none; }
.pc-previews { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 6px 8px;
  border: 1px solid #e6e8ef;
  border-radius: 10px;
  background: #f8f9fc;
  font-size: 12px;
}
.pc-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }
.pc-fileicon { font-size: 20px; }
.pc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.pc-size { color: #6b7280; white-space: nowrap; }
.pc-remove { border: 0; background: none; font-size: 16px; cursor: pointer; color: #6b7280; }
.pc-dragging { outline: 2px dashed #4f46e5; outline-offset: -6px; }
@media (max-width: 640px) {
  .pc-composer { padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .pc-send { padding: 0 12px; }
  .pc-chip { max-width: 100%; }
}
