.rp-page { --rp-blue:#0058ff; color:#1d2129; font-size:14px; }
.rp-page * { box-sizing:border-box; }
.rp-page > .el-container { min-height:100vh; }
.rp-main { min-width:0; background:#f2f3f5; }
.rp-content { flex:1 0 auto; min-width:0; padding:24px; }
.rp-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:20px; }
.rp-head h1,.rp-head h2 { margin:0 0 8px; font-size:24px; font-weight:600; }
.rp-head p,.rp-hint { margin:0; color:#697386; line-height:1.7; }
.rp-upgrade .rp-hint { margin-bottom:12px; }
.rp-panel { background:white; border:1px solid #e5e6eb; border-radius:4px; padding:20px; margin-bottom:16px; min-width:0; }
.rp-panel h2 { font-size:16px; font-weight:600; margin:0 0 16px; }
.rp-links { display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; }
.rp-page .rp-share-hint { margin-top:12px; font-size:14px; }
.rp-link { overflow-wrap:anywhere; line-height:1.7; color:#0058ff; }
.rp-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; }
.rp-metric { padding:16px 12px; border-bottom:1px solid #f2f3f5; min-width:0; }
.rp-metric span { display:block; color:#697386; margin-bottom:10px; }
.rp-metric strong { font-size:24px; font-weight:600; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.rp-toolbar { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin:16px 0; }
.rp-toolbar .el-input,.rp-toolbar .t-input__wrap { max-width:220px; }
.rp-scroll { overflow:auto; max-width:100%; }
.rp-page .el-tabs__content { overflow:visible; }
.rp-page .el-table { font-size:13px; }
.rp-page .el-pagination { margin-top:18px; white-space:normal; }
.rp-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.rp-full { grid-column:1/-1; }
.rp-rule-copy { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; }
.rp-detail { margin:0; }
.rp-detail>div { display:grid; grid-template-columns:160px minmax(0,1fr); gap:12px; padding:10px 0; border-bottom:1px solid #eee; }
.rp-detail dt { color:#697386; }.rp-detail dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.rp-error { margin:16px 0; color:#a32929; line-height:1.6; }
.rp-tabs { display:flex; overflow:auto; gap:0; border-bottom:1px solid #ddd; margin:20px 0; }
.rp-tabs button { border:0; border-bottom:2px solid transparent; background:none; padding:12px 16px; white-space:nowrap; cursor:pointer; color:#526070; }
.rp-tabs button[aria-selected="true"] { border-color:#0058ff; color:#0058ff; }
.rp-admin .t-table { max-width:100%; }
.rp-admin .t-dialog { max-width:calc(100vw - 24px); }
.rp-admin .t-dialog__body { max-height:65vh; overflow:auto; }
@media(max-width:1024px) { .rp-content {padding:16px;} .rp-metrics {grid-template-columns:repeat(3,minmax(0,1fr));} }
@media(max-width:600px) { .rp-content {padding:12px;} .rp-panel {padding:14px;} .rp-metrics {grid-template-columns:repeat(2,minmax(0,1fr));} .rp-metric strong{font-size:20px;} .rp-form-grid{grid-template-columns:1fr;} .rp-links{grid-template-columns:1fr;} .rp-detail>div{grid-template-columns:1fr;gap:6px;} .rp-head h1,.rp-head h2{font-size:21px;} .rp-toolbar>*{max-width:100%;} }
@media(max-height:500px) { .rp-admin .t-dialog__body{max-height:48vh;} }
.rp-page { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif; }
/* The theme appends its footer to el-main; only business content gets a gutter. */
.rp-page .el-main.rp-main { display:flex; flex-direction:column; padding:0; }
.rp-main > .tc-footer { flex-shrink:0; }
.rp-toolbar > .t-select__wrap,.rp-toolbar > .t-input__wrap { width:220px; flex:0 1 220px; }
.rp-links > div:last-child { display:flex; flex-wrap:wrap; gap:8px; }
.rp-links .el-button + .el-button { margin-left:0; }

/* Body-mounted dialogs need their own typography and form/button sizing. */
.rp-action-dialog.el-dialog,
.rp-page .safe-confirm-dialog.el-dialog {
  display:flex; flex-direction:column; width:560px; max-width:calc(100vw - 32px);
  max-height:88vh; margin:6vh auto!important; border-radius:2px;
  color:#1d2129; font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif;
  box-shadow:0 8px 32px rgba(0,0,0,.16); overflow:hidden;
}
.rp-page .safe-confirm-dialog.el-dialog { width:520px!important; }
.rp-action-dialog *, .rp-page .safe-confirm-dialog * { box-sizing:border-box; }
.rp-action-dialog .el-dialog__header {
  flex:none; padding:18px 24px; border-bottom:1px solid #e5e8ed;
}
.rp-action-dialog .el-dialog__title {
  display:block; padding-right:24px; font-size:18px; font-weight:600; line-height:24px; color:#1d2129;
}
.rp-action-dialog .el-dialog__headerbtn { top:19px; right:20px; font-size:20px; }
.rp-action-dialog .el-dialog__body,
.rp-page .safe-confirm-dialog .el-dialog__body {
  flex:1 1 auto; min-height:0; max-height:none; padding:20px 24px;
  overflow:auto; font-size:14px; color:#1d2129; line-height:1.6;
}
.rp-action-dialog .el-dialog__footer,
.rp-page .safe-confirm-dialog .el-dialog__footer {
  flex:none; padding:16px 24px; border-top:1px solid #e5e8ed; text-align:right;
}
.rp-dialog-actions, .rp-page .safe-confirm-dialog .dialog-footer {
  display:flex; flex-direction:row; align-items:center; justify-content:flex-end; gap:10px; width:100%;
}
.rp-page .safe-confirm-dialog .dialog-footer { flex-direction:row-reverse; justify-content:flex-start; }
.rp-dialog-actions .el-button,
.rp-page .safe-confirm-dialog .dialog-footer .el-button {
  display:inline-flex; flex:0 0 auto; width:auto; min-width:88px; height:36px;
  margin:0!important; padding:0 20px; border:1px solid #d9dfe7; border-radius:2px;
  background:#fff; color:#1d2129; font-size:14px; font-weight:400; line-height:34px;
}
.rp-dialog-actions .el-button span,
.rp-page .safe-confirm-dialog .dialog-footer .el-button span { font-size:14px; line-height:20px; }
.rp-dialog-actions .el-button:hover,
.rp-page .safe-confirm-dialog .dialog-footer .el-button:hover { border-color:#0058ff; color:#0058ff; }
.rp-dialog-actions .el-button.el-button--primary,
.rp-page .safe-confirm-dialog .dialog-footer .el-button.el-button--primary { color:#fff; background:#0058ff; border-color:#0058ff; }
.rp-dialog-actions .el-button.el-button--primary:hover,
.rp-page .safe-confirm-dialog .dialog-footer .el-button.el-button--primary:hover { background:#0048d9; border-color:#0048d9; }
.rp-dialog-description { margin:0 0 16px; color:#697386; font-size:14px; line-height:22px; }
.rp-dialog-summary { display:grid; grid-template-columns:1fr 1fr; gap:16px; padding:14px 16px; margin-bottom:20px; background:#f7f8fa; }
.rp-dialog-summary span { display:block; margin-bottom:4px; color:#697386; font-size:13px; }
.rp-dialog-summary strong { display:block; overflow-wrap:anywhere; font-size:18px; line-height:24px; font-weight:600; }
.rp-action-dialog .el-form-item, .rp-page .safe-confirm-dialog .el-form-item { margin-bottom:18px; }
.rp-action-dialog .el-form-item:last-child, .rp-page .safe-confirm-dialog .el-form-item:last-child { margin-bottom:0; }
.rp-action-dialog .el-form-item__label,
.rp-page .safe-confirm-dialog .el-form-item__label { float:none; padding:0 0 8px; font-size:14px; font-weight:400; line-height:22px; color:#1d2129; }
.rp-action-dialog .el-form-item__content, .rp-page .safe-confirm-dialog .el-form-item__content { line-height:36px; }
.rp-action-dialog .el-input, .rp-page .safe-confirm-dialog .el-input { width:100%; font-size:14px; }
.rp-action-dialog .el-input__inner,
.rp-page .safe-confirm-dialog .dialog-main .input-select .el-input__inner {
  height:36px; padding:0 12px; border:1px solid #d9dfe7; border-radius:2px;
  background:#fff; font-size:14px; line-height:36px; color:#1d2129;
}
.rp-action-dialog .el-input__inner:hover { border-color:#a8b3c2; }
.rp-action-dialog .el-input.is-disabled .el-input__inner { color:#697386; background:#f5f6f8; border-color:#d9dfe7; }
.rp-action-dialog .el-input__inner:focus,
.rp-page .safe-confirm-dialog .dialog-main .input-select .el-input__inner:focus { border-color:#0058ff; }
.rp-action-dialog .el-input--prefix .el-input__inner { padding-left:30px; }
.rp-currency-prefix { display:inline-block; width:24px; color:#697386; font-size:14px; line-height:36px; }
.rp-field-help { margin:6px 0 0; color:#697386; font-size:12px; line-height:20px; }
.rp-dialog-error { margin:14px 0 0; color:#b42318; font-size:13px; line-height:20px; overflow-wrap:anywhere; }
.rp-action-dialog .rp-detail dt, .rp-action-dialog .rp-detail dd { font-size:14px; line-height:22px; }
.rp-page .safe-confirm-dialog .el-dialog__header { display:none; }
.rp-page .safe-confirm-dialog .dialog-title { margin:0 0 20px; font-size:18px; font-weight:600; line-height:24px; }
.rp-page .safe-confirm-dialog .dialog-main { margin-top:0; }
@media(max-width:600px) {
  .rp-action-dialog .el-dialog__header { padding:16px; }
  .rp-action-dialog .el-dialog__body, .rp-page .safe-confirm-dialog .el-dialog__body { padding:16px; }
  .rp-action-dialog .el-dialog__footer, .rp-page .safe-confirm-dialog .el-dialog__footer { padding:12px 16px; }
  .rp-action-dialog .el-dialog__title { font-size:16px; }
  .rp-action-dialog .rp-detail>div { grid-template-columns:1fr; gap:6px; }
  .rp-dialog-actions .el-button, .rp-page .safe-confirm-dialog .dialog-footer .el-button { flex:1 1 0; min-width:0; padding:0 10px; }
}
@media(max-height:500px) {
  .rp-action-dialog.el-dialog, .rp-page .safe-confirm-dialog.el-dialog { margin:12px auto!important; max-height:calc(100vh - 24px); }
}
