.mp-provider-messages-page {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  height: calc(100vh - 120px);
  padding: 24px;
  background: #f8fafc;
  font-family: Inter, Arial, sans-serif;
  color: #0f172a;
}

.mp-provider-chat-list,
.mp-provider-chat-panel {
  background: #fff;
  height: 92vh;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  overflow: hidden;
}

.mp-provider-chat-list {
  padding: 18px;
  overflow-y: auto;
}

.mp-provider-chat-list h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.mp-provider-chat-list-item {
  display: block;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 16px;
  text-decoration: none;
  color: #0f172a;
  border: 1px solid transparent;
}

.mp-provider-chat-list-item:hover,
.mp-provider-chat-list-item.active {
  background: #eff6ff;
  border-color: #dbeafe;
}

.mp-provider-chat-list-item strong {
  display: block;
  color: #2563eb;
  font-size: 15px;
}

.mp-provider-chat-list-item span,
.mp-provider-chat-list-item small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.mp-provider-chat-panel {
  display: flex;
  flex-direction: column;
}

.mp-provider-chat-header {
  padding: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.mp-provider-chat-header h2 {
  margin: 0;
  font-size: 32px;
}

.mp-provider-chat-header p {
  margin: 8px 0 0;
  color: #64748b;
}

.mp-provider-chat-products {
  padding: 14px 24px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.mp-provider-chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: #fff;
}

.mp-provider-messages-page {
  margin-left: 315px;
  width: calc(100% - 315px);
  padding: 30px;
  box-sizing: border-box;
}

.mp-provider-message-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  align-items: flex-end;
}

.mp-provider-message-row.provider {
  justify-content: flex-end;
}

.mp-provider-message-row.provider .mp-provider-message-avatar {
  order: 2;
  background: #2563eb;
  color: #fff;
}

.mp-provider-message-row.customer .mp-provider-message-avatar {
  background: #e2e8f0;
  color: #334155;
}

.mp-provider-message-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.mp-provider-message-bubble {
  max-width: 420px;
}

.mp-provider-message-meta {
  margin-bottom: 6px;
  font-size: 12px;
  color: #64748b;
}

.mp-provider-message-row.provider .mp-provider-message-meta {
  text-align: right;
}

.mp-provider-message-text {
  display: inline-block;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f1f5f9;
  color: #0f172a;
  line-height: 1.45;
}

.mp-provider-message-row.provider .mp-provider-message-text {
  background: #dbeafe;
  color: #1d4ed8;
  border-top-right-radius: 6px;
}

.mp-provider-message-row.customer .mp-provider-message-text {
  border-top-left-radius: 6px;
}

.mp-provider-chat-form {
  padding: 18px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.mp-provider-chat-form textarea {
  flex: 1;
  min-height: 56px;
  max-height: 140px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
}

.mp-provider-chat-form textarea:focus {
  border-color: #2563eb;
}

.mp-provider-chat-form button {
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 14px;
  padding: 16px 26px;
  font-weight: 800;
  cursor: pointer;
}

.mp-provider-chat-form button:hover {
  background: #1d4ed8;
}

.mp-chat-error {
  margin: 16px 24px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fee2e2;
  color: #991b1b;
}

.mp-provider-empty-chat {
  padding: 40px;
  color: #64748b;
}

.mp-provider-chat-form,
.mp-chat-form {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
}

.mp-provider-chat-form textarea,
.mp-chat-form textarea {
    flex: 1;
    max-width: 480px;
    min-height: 130px;
    padding: 18px 20px;
    border: 1px solid #cfd8ea;
    border-radius: 18px;
    resize: none;
    font-size: 16px;
    outline: none;
}

.mp-chat-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mp-file-upload input[type="file"] {
    display: none;
}

.mp-file-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #d8e0ef;
    border-radius: 999px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
}

.mp-file-upload:hover {
    background: #eef4ff;
    border-color: #bcd0ff;
}

.mp-selected-file-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 190px;
}

.mp-selected-file {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-remove-file {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    font-weight: 700;
    padding: 0;
    flex-shrink: 0;
}

.mp-remove-file:hover {
    background: #dc2626;
}

.mp-provider-chat-form button[type="submit"],
.mp-chat-form button[type="submit"] {
    min-width: 120px;
    height: 48px;

    border: none;
    border-radius: 14px;

    background: #2563eb;
    color: white;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-provider-chat-form button[type="submit"]:hover,
.mp-chat-form button[type="submit"]:hover {
    background: #1d4ed8;
}

@media (max-width: 900px) {
  .mp-provider-messages-page {
    grid-template-columns: 1fr;
    height: auto;
  }
}