.rma-shell { padding: 28px; margin-bottom: 22px; }
.content .rma-shell.rma-internal-shell {
    box-sizing: border-box;
    width: min(1480px, 100%);
    max-width: 1480px;
    margin-inline: auto;
}
.rma-shell h2 { margin: 10px 0; }
.rma-shell .panel-head { gap: 18px; flex-wrap: wrap; }
.rma-shell .rma-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; }
.rma-section { margin: 22px 0; min-width: 0; }
.rma-section > h3 { border-bottom: 1px solid #d9e3ed; padding-bottom: 12px; margin-bottom: 20px; font-size: 15px; }
.rma-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin-bottom: 12px; }
.rma-field > span { font-size: 13px; font-weight: 600; color: #64748b; }
.rma-shell input:not([type=checkbox]):not([type=hidden]), .rma-shell textarea, .rma-shell select { width: 100%; box-sizing: border-box; background: #f7f9fb; border: 1px solid #d9e3ed; border-radius: 7px; padding: 11px 12px; color: #18253a; font: inherit; }
.rma-shell input:focus, .rma-shell textarea:focus, .rma-shell select:focus { outline: 2px solid var(--portal-theme-primary, #ffbc00); outline-offset: 1px; }
.rma-shell fieldset { border: 0; padding: 20px 0 0; margin: 0; }
.rma-shell [hidden] { display: none !important; }
.rma-shell .rma-wide { grid-column: 1 / -1; }
.rma-shell .auth-checkbox { display: flex; align-items: start; gap: 10px; margin: 14px 0; line-height: 1.6; }
.rma-shell .auth-checkbox input { margin-top: 6px; flex-shrink: 0; }
.rma-device-card { border: 1px solid #dae3ed; border-radius: 12px; padding: 18px 20px; margin: 14px 0; }
.rma-device-card summary { cursor: pointer; padding: 4px 0 12px; }
.rma-device-card summary .pill { margin-left: 10px; }
.rma-device-card p { overflow-wrap: anywhere; }
.rma-address { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.rma-review { background: #f7f9fb; border: 1px solid #d9e3ed; border-radius: 10px; padding: 20px; white-space: pre-wrap; }
.rma-review p + p { padding-top: 12px; border-top: 1px solid #d9e3ed; }
.rma-notice { padding: 16px 20px; background: #fff8e5; border-left: 4px solid #ffbc00; border-radius: 8px; line-height: 1.6; }
.rma-terms { padding: 14px 20px; background: #f7f9fb; border-radius: 10px; font-size: 13px; line-height: 1.7; }
.rma-progress { display: flex; flex-wrap: wrap; gap: 10px; }
.rma-shell td small { display: block; margin-top: 5px; }
.rma-filters { display: flex; gap: 10px; margin-bottom: 20px; }
.rma-filters input[type=search] { flex: 1; }
.rma-filters select { max-width: 220px; }
.rma-print { font: 12px/1.5 Arial, sans-serif; color: #142033; max-width: 190mm; margin: 24px auto; padding: 12px; background: white; }
.rma-print-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 3px solid #ffbc00; padding-bottom: 16px; }
.rma-print-header img { width: 92px; height: 92px; object-fit: contain; }
.rma-print-qr { width: 32mm; height: 32mm; flex: 0 0 32mm; }
.rma-print-qr svg { width: 100%; height: 100%; display: block; }
.rma-print h1 { font-size: 23px; }
.rma-print h2 { font-size: 14px; margin: 22px 0 8px; }
.rma-print-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.rma-print table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.rma-print th, .rma-print td { border-bottom: 1px solid #ccd5df; padding: 12px 8px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.rma-print th:first-child { width: 25%; }
.rma-print th { background: #f4f6f8; }
.rma-print footer { border-top: 1px solid #ccd5df; margin-top: 24px; padding-top: 12px; font-size: 10px; }
.rma-print-controls { text-align: right; margin-bottom: 20px; }
.rma-print-controls button { border: 0; background: #ffbc00; border-radius: 7px; padding: 12px 18px; cursor: pointer; }
@media (max-width: 720px) { .rma-shell { padding: 18px; } .rma-shell .rma-grid { grid-template-columns: 1fr; } .rma-filters { flex-wrap: wrap; } .rma-filters select { max-width: none; } }
@media print { @page { size: A4; margin: 15mm; } .rma-print { padding: 0; margin: 0; max-width: none; } .rma-print-controls { display: none; } .rma-print thead { display: table-header-group; } .rma-print tr { break-inside: avoid; } .rma-print-header { break-inside: avoid; } }

/* Internal RMA order review. */
.rma-order-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.rma-order-dialog { width:min(960px,calc(100vw - 32px)); max-height:90vh; overflow:auto; border:1px solid var(--planion-border,#dce5ed); border-radius:16px; padding:24px; color:var(--text,#173047); background:#fff; }
.rma-order-dialog::backdrop { background:rgba(15,30,45,.4); }
.rma-order-dialog .panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.rma-order-dialog h2 { margin:0; font-size:22px; }
.rma-order-dialog .rma-field { margin-bottom:10px; }
.rma-order-feedback { white-space:pre-wrap; overflow-wrap:anywhere; padding:8px 0; }
.rma-order-product { padding:12px 0; border-bottom:1px solid #e2e9ef; }
.rma-order-product strong { display:block; margin-bottom:8px; }
.rma-order-dialog [hidden] { display:none!important; }
@media(max-width:640px) { .rma-order-dialog { padding:16px; } .rma-order-dialog .rma-grid { grid-template-columns:1fr; } }
.rma-order-dialog [data-order-form] { display:block; }
.rma-order-dialog .rma-section { margin:16px 0; }
.rma-order-dialog .rma-section > h3 { margin:0 0 12px; padding-bottom:8px; }
.rma-order-dialog .rma-order-feedback:empty { display:none; }
.rma-order-dialog .rma-field { gap:5px; }
.rma-order-dialog input { padding:8px 10px!important; }
.rma-internal-shell > .panel-head { gap:16px; margin-bottom:20px; }

.rma-internal-shell > .panel-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.rma-internal-shell .rma-order-actions { display:flex; width:auto; flex:0 1 auto; align-items:center; gap:8px; }
.rma-internal-shell .rma-order-actions > form { display:inline-flex; flex:0 0 auto; flex-direction:column; width:auto; min-width:0; margin:0; padding:0; gap:0; }
.rma-internal-shell .rma-order-actions .small-btn { display:inline-flex; align-items:center; justify-content:center; width:auto; min-height:38px; margin:0; padding:8px 12px; white-space:nowrap; }
.rma-internal-shell .rma-order-actions button.danger-btn { background:#fff3f3; color:#b42332; border:1px solid #edc5ca; box-shadow:none; }
.rma-internal-shell .rma-order-actions button.danger-btn:hover { background:#ffe7ea; }
.rma-internal-shell .rma-order-actions [data-rma-feedback] { max-width:280px; margin:6px 0 0; font-size:12px; overflow-wrap:anywhere; }
.rma-internal-shell .rma-order-actions [data-rma-feedback]:empty { display:none; }
