/* Payment Request page (Kissflow monitor) — standalone, matches app chrome */
.pr-page { padding: 4px 8px 24px; }
.pr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.pr-title { margin: 0 0 2px; font-size: 20px; font-weight: 700; color: #1e293b; }
.pr-sub { margin: 0; font-size: 13px; color: #64748b; }
.pr-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pr-search {
  width: 260px; padding: 8px 12px; font-size: 13px;
  border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #1e293b; outline: none;
}
.pr-search:focus { border-color: #c1121f; box-shadow: 0 0 0 2px rgba(193, 18, 31, .12); }
.pr-filter {
  padding: 8px 10px; font-size: 13px; border: 1px solid #cbd5e1; border-radius: 8px;
  background: #fff; color: #1e293b;
}
.pr-refresh {
  padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid #c1121f; border-radius: 8px; background: #c1121f; color: #fff;
  transition: background .15s ease;
}
.pr-refresh:hover { background: #a50f1a; }
.pr-refresh:active { background: #8f0d17; }

/* Summary cards */
.pr-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pr-card {
  min-width: 110px; padding: 12px 16px; border-radius: 10px;
  background: #fff; border: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 2px;
}
.pr-card-num { font-size: 22px; font-weight: 700; color: rgb(23, 32, 26); line-height: 1.2; }
.pr-card-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #64748b; }
.pr-card-total { background: #fdf6f6; border-color: rgb(233, 207, 207); }

/* Table */
.pr-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
.pr-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; }
.pr-table thead th {
  position: sticky; top: 0; text-align: left; padding: 10px 12px;
  background: #f8fafc; color: #475569; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .02em;
  border-bottom: 1px solid #e2e8f0; white-space: nowrap;
}
.pr-table tbody td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; color: #1e293b; vertical-align: top; }
.pr-table tbody tr:hover { background: #f8fafc; }
.pr-no { white-space: nowrap; }
.pr-remarks { max-width: 260px; }
.pr-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pr-empty { padding: 40px; text-align: center; color: #64748b; font-size: 14px; }
.pr-error { padding: 24px; text-align: center; color: #b91c1c; font-size: 14px; }
.pr-foot { margin-top: 10px; font-size: 12px; color: #94a3b8; }

@media (max-width: 768px) {
  .pr-page { padding: 0 4px 20px; }
  .pr-head { flex-direction: column; }
  .pr-search { width: 100%; }
  .pr-cards { gap: 8px; }
  .pr-card { flex: 1 1 40%; min-width: 0; padding: 10px 12px; }
  .pr-card-num { font-size: 18px; }
}

/* Public header (matches home public page brand) */
.pr-public-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; margin-bottom: 10px;
  background: #fff; border-bottom: 1px solid #e2e8f0;
}
.pr-public-head .brand { display: flex; align-items: center; gap: 12px; }
.pr-public-head .brand-logo { height: 34px; }
.pr-public-head .brand-divider { width: 1px; height: 28px; background: #e2e8f0; }
.pr-public-head strong { display: block; font-size: 15px; color: #1e293b; }
.pr-public-head small { font-size: 12px; color: #64748b; }

body.pr-public-mode { background: #f8fafc; }

/* Table container + pagination */
.pr-page { max-width: 1200px; margin: 0 auto; }
@media (min-width: 769px) {
  body.pr-public-mode, body:has(.pr-public-head) { background: #f1f5f9; }
}
.pr-public-head { margin-bottom: 14px; }
.pr-page .pr-summary, .pr-page .pr-table-wrap { box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.pr-gates { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; white-space: nowrap; color: #334155; }

.pr-pager {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 12px 16px; background: #fff;
  border: 1px solid #e2e8f0; border-top: none; border-radius: 0 0 10px 10px;
}
.pr-pager button {
  padding: 6px 12px; font-size: 13px; cursor: pointer;
  border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #1e293b;
}
.pr-pager button:hover { background: #f1f5f9; }
.pr-pager .pr-pg-info { font-size: 13px; color: #475569; padding: 0 6px; }
.pr-pg-size {
  margin-left: 8px; padding: 6px 8px; font-size: 13px;
  border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #1e293b;
}
.pr-foot { margin-top: 8px; }

/* Assigned-to filter toggle */
.pr-assigned-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; font-size: 13px; color: #1e293b;
  background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 8px;
  cursor: pointer; user-select: none; font-weight: 500;
}
.pr-assigned-toggle input { accent-color: #6366f1; cursor: pointer; }

/* Export dropdown button */
.pr-export-wrap { position: relative; display: inline-block; }
.pr-export-btn {
  padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid #c1121f; border-radius: 8px; background: #fff; color: #c1121f;
  transition: background .15s ease, color .15s ease;
}
.pr-export-btn:hover { background: #fef2f2; }
.pr-export-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 50;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12); min-width: 160px; overflow: hidden;
}
.pr-export-menu.open { display: block; }
.pr-export-item {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  font-size: 13px; color: #1e293b; background: #fff; border: none; cursor: pointer;
}
.pr-export-item:hover { background: #fef2f2; color: #c1121f; }
.pr-export-item + .pr-export-item { border-top: 1px solid #f1f5f9; }

/* ===== Match home public page styling exactly ===== */
body:has(.pr-public-head) {
  background: rgb(252, 250, 250);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.pr-public-head {
  position: sticky; top: 0; z-index: 100;
  padding: 14px 24px; background: #fff;
  border-bottom: 1px solid rgb(233, 207, 207);
  margin: 0 0 0 0;
}
.pr-public-head .brand-logo { height: 34px; width: auto; }
.pr-public-head .brand-divider { width: 1px; height: 30px; background: rgb(233, 207, 207); }
.pr-public-head .brand { display: flex; align-items: center; gap: 12px; }
.pr-public-head .brand strong { font-size: 15px; font-weight: 700; color: rgb(23, 32, 26); display: block; line-height: 1.3; }
.pr-public-head .brand small { font-size: 11px; color: rgb(151, 139, 139); display: block; }
.pr-public-body {
  max-width: 1500px; margin: 0 auto; padding: 20px 24px 32px;
}
.pr-public-foot {
  max-width: 1500px; margin: 0 auto; padding: 12px 24px 20px;
  font-size: 11px; color: rgb(151, 139, 139);
  display: flex; gap: 6px; align-items: center;
}
.pr-page { max-width: 100%; padding: 0; margin: 0; }
.pr-title { font-size: 18px; font-weight: 700; color: rgb(23, 32, 26); margin: 0 0 2px; }
.pr-sub { font-size: 12px; color: rgb(151, 139, 139); margin: 0 0 16px; }
.pr-head { margin-bottom: 16px; }

/* GATES inline edit */
.pr-gates { white-space: nowrap; }
.pr-gates .pr-gates-edit {
  margin-left: 6px; padding: 2px 6px; font-size: 11px; cursor: pointer;
  border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #475569;
}
.pr-gates .pr-gates-edit:hover { border-color: #c1121f; color: #c1121f; }
.pr-gates .pr-gates-input {
  width: 150px; padding: 4px 8px; font-size: 12.5px;
  border: 1px solid #c1121f; border-radius: 4px; outline: none;
  font-family: ui-monospace, monospace;
}
.pr-gates .pr-gates-save, .pr-gates .pr-gates-cancel {
  margin-left: 4px; padding: 3px 8px; font-size: 11px; cursor: pointer; border-radius: 4px;
}
.pr-gates .pr-gates-save { border: 1px solid #16a34a; background: #16a34a; color: #fff; }
.pr-gates .pr-gates-cancel { border: 1px solid #cbd5e1; background: #fff; color: #475569; }

/* Budget Name inline edit */
.pr-budget { white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.pr-budget .pr-budget-edit {
  margin-left: 6px; padding: 2px 6px; font-size: 11px; cursor: pointer;
  border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #475569;
}
.pr-budget .pr-budget-edit:hover { border-color: #c1121f; color: #c1121f; }
.pr-budget .pr-budget-input {
  width: 200px; padding: 4px 8px; font-size: 12.5px;
  border: 1px solid #c1121f; border-radius: 4px; outline: none; background: #fff;
}
.pr-budget .pr-budget-save, .pr-budget .pr-budget-cancel {
  margin-left: 4px; padding: 3px 8px; font-size: 11px; cursor: pointer; border-radius: 4px;
}
.pr-budget .pr-budget-save { border: 1px solid #16a34a; background: #16a34a; color: #fff; }
.pr-budget .pr-budget-cancel { border: 1px solid #cbd5e1; background: #fff; color: #475569; }
