/* Finance › Sales › Renewals (#renewals). Colours come from styles.css's tokens, so light and dark both work; the review
   panel reuses the Leads & Proposals drawer (.ld-panel, .ld-ph, .ld-dl, .ld-psec, .ld-notes from leads.css). */
[data-page="renewals"] .page-actions { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
#rn-body { display: grid; gap: 18px; min-width: 0; }
.rn-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rn-kpis .kpi b { font-size: 32px; }

.rn-filters { display: grid; gap: 10px; padding: 14px 20px 4px; }
.rn-filters-2 { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.rn-lbl { align-self: center; margin-right: 2px; }
.rn-count { margin: 6px 20px 8px; }

.rn-tbl td { vertical-align: top; }
.rn-tbl td small { display: block; font-size: 11.5px; margin-top: 2px; }
.rn-tbl tr.rn-over td:first-child { box-shadow: 3px 0 0 var(--red) inset; }
.rn-tbl tr.rn-soon td:first-child { box-shadow: 3px 0 0 var(--amber) inset; }
.rn-tbl tr.rn-done { opacity: .7; }
.rn-client { min-width: 180px; }
.rn-client > a { font-weight: 600; }
.rn-open { display: block; margin-top: 3px; font-size: 12px; }
.rn-next { color: var(--ink-2); }
.rn-next.today { color: var(--amber); font-weight: 600; }
.rn-next.late { color: var(--red); font-weight: 600; }
.rn-svc { display: block; max-width: 220px; font-size: 12.5px; color: var(--ink-2); }
.rn-fee b { font-variant-numeric: tabular-nums; }
.rn-diff { color: var(--amber); font-weight: 600; }
.rn-due { display: block; white-space: nowrap; }
.rn-due.amber { color: var(--amber); font-weight: 600; }
.rn-due.red { color: var(--red); font-weight: 600; }
.rn-due small { font-weight: 500; }
.rn-stc { min-width: 150px; }
.rn-stage { width: 100%; max-width: 180px; min-height: 30px; padding: 4px 8px; font-size: 12px; }
.rn-auto { color: var(--violet); font-weight: 600; }
.rn-chg span { font-variant-numeric: tabular-nums; }
.rn-note { max-width: 240px; }
.rn-sock { white-space: nowrap; }
.rn-note span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; }
@media (max-width: 1360px) { .rn-xl { display: none; } }
@media (max-width: 1250px) { .rn-lg { display: none; } }

/* The review panel */
.rn-linkbtn { border: 0; cursor: pointer; font-family: inherit; }
.rn-linkbtn:hover { text-decoration: underline; }
.rn-sod input { font: 13px var(--font); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 36px; width: 100%; }
.rn-hits { margin-top: 2px; }
.rn-psub { margin: -4px 0 0; }
.rn-fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.rn-fgrid .span2 { grid-column: 1 / -1; }
.rn-fgrid input, .rn-noteform textarea { font: 13px var(--font); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 36px; width: 100%; }
.rn-fgrid small { font-weight: 500; }
.rn-noteform { display: grid; gap: 8px; }
.rn-noteform .btn { justify-self: start; }
.rn-prop { display: grid; gap: 6px; padding: 10px 12px; border-radius: 8px; background: var(--line-2); }
.rn-prop-h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.rn-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.rn-lines li { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; }
.rn-lines .num { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }

@media (max-width: 1100px) {
  .rn-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rn-md { display: none; }
}
@media (max-width: 760px) {
  .rn-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rn-kpis .kpi b { font-size: 24px; }
  .rn-filters { padding: 12px 14px 4px; }
  .rn-count { margin: 6px 14px 8px; }
  .rn-filters-2 .search { width: 100%; }
  .rn-filters-2 .search input { min-width: 0; width: 100%; }
  .rn-tbl th:first-child, .rn-tbl td:first-child { padding-left: 14px; }
  .rn-tbl th, .rn-tbl td { padding-left: 8px; padding-right: 8px; }
  .rn-client { min-width: 120px; }
  .rn-stc { min-width: 120px; }
  .rn-due { white-space: normal; }
  .rn-fgrid { grid-template-columns: minmax(0, 1fr); }
}
