/* LF Audio RMA admin — shell owns html/body. Scope everything to .rma-root. */

.rma-root {
  font-size: 14px;
}
.error { color: var(--lf-error); margin-top: 12px; font-size: 13px; }

.btn {
  background: var(--lf-btn-bg);
  color: var(--lf-text);
  border: 1px solid var(--lf-border);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.btn:hover { background: var(--lf-btn-hover); border-color: var(--lf-border-strong); }
.btn:disabled { cursor: wait; opacity: 0.75; }
.btn.busy { pointer-events: none; }
.btn-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: lf-spin 0.7s linear infinite;
}
@keyframes lf-spin { to { transform: rotate(360deg); } }
.btn-primary {
  background: var(--lf-accent);
  color: var(--lf-accent-contrast);
  border-color: var(--lf-accent);
}
.btn-primary:hover {
  background: var(--lf-accent-hover);
  border-color: var(--lf-accent-hover);
}
.btn-small { padding: 5px 11px; font-size: 12px; }

/* --- Top bar --- */
.top-bar {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: var(--lf-panel-alt);
  border-bottom: 1px solid var(--lf-border);
  gap: 12px;
}
.top-bar h1 { font-size: 15px; font-weight: 600; margin: 0; color: var(--lf-text); }
.top-bar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-email { color: var(--lf-text-muted); font-size: 12px; }
.rma-filter {
  background: var(--lf-btn-bg);
  color: var(--lf-text-muted);
  border: 1px solid var(--lf-border);
  border-radius: 999px;
  padding: 5px 28px 5px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa0a6' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}
.rma-filter:hover {
  background-color: var(--lf-btn-hover);
  color: var(--lf-text);
}
.rma-filter:focus {
  outline: none;
  border-color: var(--lf-accent);
}

/* ── Top card: identity left, return info right ────────────────── */
.lf-card.lf-card-header {
  padding: 14px 18px;
  margin-bottom: 12px;
}
/* Grid is used here instead of flex because flex-wrap + stretch was
   inflating the card to ~270px on wide screens for reasons that
   weren't reproducible locally. Grid with auto rows is predictable
   and sizes to content. */
.lf-card.lf-card-header .rma-top-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .lf-card.lf-card-header .rma-top-row {
    grid-template-columns: 1fr;
  }
}
.rma-top-identity {
  min-width: 0;
}
.rma-top-identity > * { margin: 0; }
.rma-top-identity h2 {
  font-size: 18px;
  line-height: 1.2;
}
.rma-top-identity .muted {
  font-size: 12px;
  line-height: 1.4;
  margin-top: 3px;
}
.rma-top-identity .rma-pill {
  margin-top: 6px;
}
.rma-top-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.rma-top-return {
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid var(--lf-border);
}
.rma-top-return > * { margin: 0; }
.rma-top-return .rma-return-col + .rma-return-col {
  margin-top: 10px;
}

/* ── Combined items + reason card ────────────────────────────── */
.rma-items-reason-row {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.rma-items-col {
  flex: 1 1 260px;
  min-width: 0;
}
.rma-reason-col {
  flex: 2 1 280px;
  min-width: 0;
  padding-left: 20px;
  border-left: 1px solid var(--lf-border);
}
@media (max-width: 900px) {
  .rma-reason-col {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--lf-border);
    padding-top: 14px;
  }
}

/* ── Unified workflow card (status + label + outbound order) ── */
.rma-workflow-row {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.rma-workflow-col {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rma-workflow-col + .rma-workflow-col {
  padding-left: 20px;
  border-left: 1px solid var(--lf-border);
}
@media (max-width: 900px) {
  .rma-workflow-col + .rma-workflow-col {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--lf-border);
    padding-top: 14px;
  }
}

/* ── Combined internal notes + photos card ───────────────────── */
.rma-internal-row {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.rma-internal-col {
  flex: 1 1 280px;
  min-width: 0;
}
.rma-internal-col + .rma-internal-col {
  padding-left: 20px;
  border-left: 1px solid var(--lf-border);
}
@media (max-width: 900px) {
  .rma-internal-col + .rma-internal-col {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--lf-border);
    padding-top: 14px;
  }
}

.rma-col-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lf-text-muted);
  margin-bottom: 8px;
}
@media (max-width: 900px) {
  .rma-top-return {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--lf-border);
    padding-top: 12px;
    margin-top: 12px;
  }
}

/* Legacy .rma-return-row (return info as its own card) — still used
   elsewhere; keep the flex layout. */
.rma-return-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.rma-return-col {
  flex: 1 1 220px;
  min-width: 0;
}
.rma-return-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lf-text-muted);
  margin-bottom: 4px;
}

/* ── Create RMA dialog items list ─────────────────────────────── */

.rma-create-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  background: var(--lf-panel-alt);
  border: 1px solid var(--lf-border);
  border-radius: 8px;
}
.rma-create-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--lf-text);
  cursor: pointer;
}
.rma-create-item input[type="checkbox"] {
  flex-shrink: 0;
}

/* Primary "+ Create" button in the RMA filter bar — uses the accent
   color to draw attention vs. the neutral filter chips next to it. */
.filter-bar .btn-primary {
  background: var(--lf-accent);
  color: var(--lf-accent-contrast);
  border-color: var(--lf-accent);
  margin-left: auto;
}
.filter-bar .btn-primary:hover {
  background: var(--lf-accent-hover);
  border-color: var(--lf-accent-hover);
}

/* ── RMA photos card ──────────────────────────────────────────── */

.rma-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.rma-photo-cell {
  position: relative;
  background: var(--lf-panel-alt);
  border: 1px solid var(--lf-border);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
}
.rma-photo-cell a {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}
.rma-photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rma-photo-cell:hover { border-color: var(--lf-accent); }
.rma-photo-failed {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lf-error);
  font-size: 11px;
}
.rma-photo-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
  padding: 0;
}
.rma-photo-delete:hover {
  background: var(--lf-error);
}

.rma-photo-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rma-photo-upload label.btn {
  cursor: pointer;
  user-select: none;
}

/* ── Create RMA dialog: staged photo thumbnails ───────────────── */
.rma-create-photo-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.rma-create-photo-preview:empty {
  margin-top: 0;
}
.rma-create-photo-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--lf-border);
  background: var(--lf-panel-alt);
}
.rma-create-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rma-create-photo-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rma-create-photo-remove:hover {
  background: var(--lf-error);
}

/* ── Outbound order card ──────────────────────────────────────── */

.rma-outbound-current {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rma-outbound-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.rma-outbound-items {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--lf-text);
}
.rma-outbound-items li {
  line-height: 1.6;
}
.rma-outbound-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* ── Outbound order picker dialog ─────────────────────────────── */

.rma-outbound-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}
.rma-outbound-candidate {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--lf-panel-alt);
  border: 1px solid var(--lf-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.rma-outbound-candidate:hover {
  border-color: var(--lf-accent);
  background: var(--lf-panel-hover);
}
.rma-outbound-candidate input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
}
.rma-outbound-candidate-body {
  flex: 1;
  min-width: 0;
}
.rma-outbound-candidate-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.rma-outbound-candidate-top strong {
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--lf-text);
}
.rma-outbound-candidate-items {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
  font-size: 11px;
  color: var(--lf-text-muted);
  line-height: 1.5;
}

/* Sticky quick-filter bar at the top of the list panel. Matches the
   CRM inbox filter bar visually so switching views stays consistent. */
.filter-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--lf-panel);
  border-bottom: 1px solid var(--lf-border);
  flex-wrap: wrap;
}
.filter-bar .filter-chip {
  background: var(--lf-btn-bg);
  color: var(--lf-text-muted);
  border: 1px solid var(--lf-border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.filter-bar .filter-chip:hover {
  background: var(--lf-btn-hover);
  color: var(--lf-text);
}
.filter-bar .filter-chip.active {
  background: var(--lf-accent-bg);
  color: var(--lf-accent);
  border-color: var(--lf-accent);
}
/* "Needs attention" chip uses the error palette as an idle hint that
   it surfaces something urgent (RMAs with new customer replies). */
.filter-bar .filter-chip-attention {
  border-color: var(--lf-error-border);
  color: var(--lf-error);
}
.filter-bar .filter-chip-attention:hover {
  background: var(--lf-error-bg);
  color: var(--lf-error);
}
.filter-bar .filter-chip-attention.active {
  background: var(--lf-error-bg);
  color: var(--lf-error);
  border-color: var(--lf-error);
}

/* Red dot next to an RMA list row title when there's a new customer
   reply we haven't acknowledged yet. Cleared when the operator opens
   that RMA (mark-read on select, same pattern as CRM inbox). */
.rma-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lf-error);
  margin-right: 8px;
  vertical-align: 1px;
  box-shadow: 0 0 0 2px var(--lf-panel);
}
.rma-list-item.has-unread strong {
  color: var(--lf-error);
}
.filter-bar .rma-filter {
  margin-left: auto;
}

/* --- Main layout --- */
.main-layout {
  display: grid;
  grid-template-columns: var(--lf-list-w) 1fr var(--lf-sidebar-w);
  min-height: calc(100dvh - var(--lf-nav-h) - 53px);
}
.list-panel {
  border-right: 1px solid var(--lf-border);
  overflow-y: auto;
  max-height: calc(100dvh - var(--lf-nav-h) - 53px);
}
.detail-panel {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: calc(100dvh - var(--lf-nav-h) - 53px);
}
.rma-sidebar {
  border-left: 1px solid var(--lf-border);
  background: var(--lf-panel-alt, rgba(0, 0, 0, 0.12));
  overflow-y: auto;
  max-height: calc(100dvh - var(--lf-nav-h) - 53px);
  /* 24px top/bottom, 22px left. Right gets the 22px gutter PLUS the
     ~16px a typical desktop scrollbar eats out of the content area, so
     the card edges sit the same visual distance from the scrollbar
     track regardless of whether overflow is active. */
  padding: 24px 22px 24px 22px;
  scrollbar-gutter: stable;
}
.rma-sidebar-placeholder {
  text-align: center;
  padding-top: 40px;
  color: var(--lf-text-dim);
}
@media (max-width: 1200px) {
  .main-layout { grid-template-columns: var(--lf-list-w) 1fr 280px; }
}
@media (max-width: 1000px) {
  .main-layout { grid-template-columns: var(--lf-list-w) 1fr; }
  .rma-sidebar { display: none; }
}
.detail-placeholder {
  color: var(--lf-text-muted);
  font-size: 14px;
  padding-top: 40px;
  text-align: center;
}
.mobile-back { display: none; }

/* --- List items --- */
#rma-list { padding: 8px; }
.rma-list-item {
  padding: 12px 14px;
  margin-bottom: 6px;
  background: var(--lf-panel);
  border: 1px solid var(--lf-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.rma-list-item:hover {
  border-color: var(--lf-border-strong);
  background: var(--lf-panel-hover);
}
.rma-list-item.active {
  border-color: var(--lf-accent);
  background: var(--lf-accent-bg);
}
.rma-list-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3px;
}
.rma-list-item-head strong { color: var(--lf-text); font-size: 13px; }
.muted { color: var(--lf-text-muted); }
.small { font-size: 11px; }

.empty {
  padding: 24px;
  text-align: center;
  color: var(--lf-text-muted);
  font-size: 13px;
}

/* --- Status pills --- */
.rma-pill {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  background: var(--lf-btn-bg);
  color: var(--lf-text);
}
.rma-pill.rma-status-submitted { background: var(--lf-info-bg); color: var(--lf-info); }
.rma-pill.rma-status-awaiting_unit { background: var(--lf-warn-bg); color: var(--lf-warn); }
.rma-pill.rma-status-received { background: var(--lf-info-bg); color: var(--lf-info); }
.rma-pill.rma-status-resolved { background: var(--lf-success-bg); color: var(--lf-success); }
.rma-pill.rma-status-denied { background: var(--lf-error-bg); color: var(--lf-error); }

/* --- Detail --- */
.detail-header h2 {
  font-size: 18px;
  margin: 0 0 4px 0;
  color: var(--lf-text);
}
.detail-header .muted { font-size: 12px; }

#rma-detail h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--lf-text-muted);
  margin: 20px 0 6px 0;
}
#rma-detail p { margin: 6px 0; line-height: 1.5; }
#rma-detail ul {
  list-style: none;
  padding: 0;
  margin: 6px 0;
}
#rma-detail ul li {
  padding: 6px 0;
  border-bottom: 1px solid var(--lf-border);
  font-size: 13px;
}
#rma-detail ul li:last-child { border-bottom: none; }

.rma-unlisted-banner {
  margin: 14px 0;
  padding: 10px 14px;
  background: var(--lf-warn-bg);
  border-left: 3px solid var(--lf-warn);
  color: var(--lf-warn);
  font-size: 12px;
  border-radius: 4px;
}

.detail-header code {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--lf-accent);
}

.admin-msg-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 10px;
}
/* Message cards — mirrors CRM .msg / .msg-header / .msg-body / .quoted */
.admin-msg-list .msg {
  border: 1px solid var(--lf-border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.admin-msg-list .msg.inbound { background: var(--lf-panel-alt); }
.admin-msg-list .msg.outbound {
  background: var(--lf-success-bg);
  border-color: var(--lf-success-border);
}
.admin-msg-list .msg-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--lf-text-muted);
  margin-bottom: 10px;
}
.admin-msg-list .msg-header .from {
  color: var(--lf-text);
  font-weight: 600;
}
.admin-msg-list .msg-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.55;
  color: var(--lf-text);
}
.admin-msg-list .msg-body .quoted {
  display: block;
  margin-top: 12px;
}
.admin-msg-list .msg-body .quoted summary {
  color: var(--lf-text-dim);
  cursor: pointer;
  font-size: 12px;
  list-style: none;
  user-select: none;
  padding: 4px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  display: inline-block;
}
.admin-msg-list .msg-body .quoted summary::-webkit-details-marker { display: none; }
.admin-msg-list .msg-body .quoted summary::before { content: "··· "; color: var(--lf-text-dim); }
.admin-msg-list .msg-body .quoted summary:hover { background: rgba(255, 255, 255, 0.06); }
.admin-msg-list .msg-body .quoted[open] summary::before { content: "▾ "; }
.admin-msg-list .msg-body .quoted pre {
  margin: 10px 0 0 0;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.15);
  border-left: 2px solid var(--lf-border);
  border-radius: 0 6px 6px 0;
  color: var(--lf-text-muted);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
}
.admin-msg-compose {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.admin-msg-compose textarea {
  width: 100%;
}
.admin-msg-compose-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-msg-compose-actions > .btn:last-child {
  margin-left: auto;
}
.admin-msg-compose-actions label.btn {
  cursor: pointer;
  user-select: none;
}

/* ── Image attachments inside a message card ─────────────────── */
.admin-msg-list .msg-body .rma-msg-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.admin-msg-list .msg-body .rma-msg-image {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  width: 160px;
  max-width: 100%;
  border: 1px solid var(--lf-border);
  text-decoration: none;
}
.admin-msg-list .msg-body .rma-msg-image img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.admin-msg-list .msg-body .rma-msg-image-loading {
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lf-panel-alt);
}
.admin-msg-list .msg-body .rma-msg-image-failed {
  padding: 12px;
  color: var(--lf-error);
  background: var(--lf-error-bg);
  border-radius: 8px;
  font-size: 12px;
  width: auto;
}

/* Staged thumbnails in the compose row before the message is sent */
.rma-msg-staged-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rma-msg-staged-row:empty {
  display: none;
}
.rma-msg-staged-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--lf-border);
  background: var(--lf-panel-alt);
}
.rma-msg-staged-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rma-msg-staged-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rma-msg-staged-remove:hover { background: var(--lf-error); }

.internal-notes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.internal-note {
  padding: 8px 12px;
  border: 1px solid var(--lf-border);
  border-left: 3px solid var(--lf-purple);
  border-radius: 4px;
  background: var(--lf-panel-alt);
  font-size: 13px;
}
.internal-note-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.internal-note-body {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.4;
}
.internal-note-compose {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.internal-note-compose textarea { width: 100%; }
.internal-note-compose .btn { align-self: flex-end; }

.rma-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.rma-label-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.rma-label-form input,
#rma-status-note,
#rma-internal-notes {
  background: var(--lf-input-bg);
  color: var(--lf-text);
  border: 1px solid var(--lf-border);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}
#rma-status-note { width: 100%; margin-top: 6px; min-height: 60px; }
#rma-internal-notes { width: 100%; margin-top: 6px; }

@media (max-width: 760px) {
  .main-layout { grid-template-columns: 1fr; }
  .rma-root.rma-selected .list-panel { display: none; }
  .rma-root:not(.rma-selected) .detail-panel { display: none; }
  .list-panel { border-right: none; }
  .mobile-back { display: inline-block; margin-bottom: 12px; }
}
