/* Overdue notices — scoped to the component; the PDF source is rendered off-screen. */
.rn-shell, .rn-paper { font-family:'Cairo',Tahoma,Arial,sans-serif; color:#172e40; }
.rn-shell *, .rn-paper * { box-sizing:border-box; }
.rn-shell [hidden] { display:none !important; }
.rn-shell { width:100%; min-width:0; }
.rn-intro { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:24px 26px; background:#fff; border:1px solid #e7edf0; border-radius:14px; box-shadow:0 4px 16px rgba(29,56,71,.025); }
.rn-kicker { display:block; color:#aa8d56; font-size:11px; font-weight:800; line-height:1.6; }
.rn-intro h3 { margin:3px 0 4px; color:#102f48; font-size:20px; font-weight:800; line-height:1.5; }
.rn-intro p, .rn-editor-header p { margin:0; color:#758a98; font-size:12px; line-height:1.9; }
.rn-month { display:flex; flex:none; flex-direction:column; gap:3px; padding:8px 12px; border:1px solid #e6ecee; border-radius:9px; background:#f8fafb; color:#456376; font-size:11px; font-weight:800; }
.rn-month input { max-width:100%; min-height:32px; border:0; background:transparent; color:#163c59; font:700 12px 'Cairo',Tahoma,Arial,sans-serif; }
.rn-month input:focus-visible { outline:3px solid rgba(199,166,104,.65); outline-offset:2px; }
.rn-note, .rn-page-message { margin:14px 0 0; padding:12px 15px; border:1px solid #e2ebef; border-radius:10px; background:#f1f6f8; color:#506c7b; font-size:11px; line-height:1.9; }
.rn-page-message { border-color:#ecd9b6; background:#fff8e9; color:#775923; }
.rn-list-heading { display:flex; justify-content:space-between; align-items:end; gap:14px; margin:25px 0 12px; }
.rn-list-heading h4 { margin:1px 0 0; color:#233d50; font-size:16px; font-weight:800; }
.rn-count { padding:6px 11px; border-radius:20px; background:#f8eeea; color:#a55d50; font-size:11px; font-weight:800; white-space:nowrap; }
.rn-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:14px; }
.rn-card { display:flex; flex-direction:column; min-width:0; padding:18px; background:#fff; border:1px solid #e7edf0; border-radius:13px; box-shadow:0 4px 16px rgba(29,56,71,.025); }
.rn-card-head { display:flex; justify-content:space-between; align-items:start; gap:10px; }
.rn-card-heading { min-width:0; }
.rn-card-heading h4 { overflow-wrap:anywhere; margin:7px 0 2px; color:#16364d; font-size:15px; font-weight:800; line-height:1.6; }
.rn-card-heading p { overflow-wrap:anywhere; margin:0; color:#7d909b; font-size:11px; }
.rn-code { display:inline-block; max-width:100%; overflow-wrap:anywhere; padding:3px 8px; border-radius:6px; background:#edf3f7; color:#315c77; font-size:10px; font-weight:800; }
.rn-late { flex:none; padding:5px 8px; border-radius:7px; background:#fcf0ed; color:#ac5f50; font-size:10px; font-weight:800; white-space:nowrap; }
.rn-facts { display:flex; flex-wrap:wrap; gap:12px 22px; margin:16px 0; padding:13px 0; border-top:1px solid #eef2f3; border-bottom:1px solid #eef2f3; }
.rn-fact { display:flex; flex:1 1 110px; flex-direction:column; align-items:flex-start; gap:4px; min-width:0; }
.rn-fact span { color:#8b9ca6; font-size:10px; font-weight:700; }
.rn-fact strong { max-width:100%; overflow-wrap:anywhere; color:#28475b; font-size:12px; font-weight:800; }
.rn-fact:last-child strong { color:#a45445; }
.rn-card-button { width:100%; margin-top:auto; }
.rn-empty { grid-column:1/-1; padding:35px 20px; border:1px dashed #d6e3e8; border-radius:12px; background:#fff; text-align:center; }
.rn-empty strong { display:block; color:#36576b; font-size:14px; }
.rn-empty p { margin:5px 0 0; color:#83959f; font-size:11px; line-height:1.8; }
.rn-editor { scroll-margin-top:90px; margin-top:22px; padding:23px; border:1px solid #e4ebee; border-radius:14px; background:#fff; box-shadow:0 8px 25px rgba(29,56,71,.04); }
.rn-editor-header { display:flex; justify-content:space-between; align-items:flex-start; gap:15px; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid #edf1f2; }
.rn-editor-header h4 { margin:2px 0 4px; color:#102f48; font-size:18px; font-weight:800; }
.rn-editor-header p strong { color:#36576b; overflow-wrap:anywhere; }
.rn-editor-layout { display:grid; grid-template-columns:minmax(270px,0.9fr) minmax(300px,1.1fr); gap:24px; align-items:start; }
.rn-form { min-width:0; }
.rn-form > label:not(.rn-confirm) { display:block; margin:0 0 6px; color:#38576a; font-size:12px; font-weight:800; }
.rn-form > label:not(.rn-confirm) span { color:#9aabb4; font-size:10px; font-weight:600; }
.rn-form > input, .rn-form > textarea { display:block; width:100%; min-width:0; margin:0 0 15px; padding:10px 12px; border:1px solid #dce6ea; border-radius:9px; background:#fbfcfc; color:#1f3a4d; font-size:13px; line-height:1.7; }
.rn-form > input { min-height:44px; }
.rn-form > textarea { min-height:110px; resize:vertical; }
.rn-form > input[dir="ltr"] { text-align:left; }
.rn-form > input:disabled, .rn-form > textarea:disabled { opacity:.7; }
.rn-help { margin:-8px 0 15px; color:#8c9da7; font-size:10px; line-height:1.8; }
.rn-recipient-review { overflow-wrap:anywhere; margin:3px 0 13px; padding:11px 12px; border:1px solid #eadfc9; border-radius:9px; background:#fbf8f1; color:#75613e; font-size:11px; line-height:1.8; }
.rn-recipient-review strong { display:block; color:#473c2a; font-size:13px; text-align:right; unicode-bidi:plaintext; }
.rn-confirm { display:flex; align-items:flex-start; gap:9px; margin:0 0 16px; color:#3c586a; font-size:11px; font-weight:700; line-height:1.9; cursor:pointer; }
.rn-confirm input { flex:none; width:18px; height:18px; margin:2px 0 0; accent-color:#163c59; }
.rn-actions { display:flex; flex-wrap:wrap; gap:9px; }
.rn-button { display:inline-flex; justify-content:center; align-items:center; min-height:42px; padding:9px 15px; border:1px solid transparent; border-radius:9px; font-family:inherit; font-size:12px; font-weight:800; line-height:1.4; text-align:center; text-decoration:none; cursor:pointer; transition:background .15s ease,border-color .15s ease; }
.rn-button--primary { color:#fff; background:#163c59; border-color:#163c59; }
.rn-button--primary:hover:not(:disabled) { background:#244f69; }
.rn-button--outline { color:#244f69; background:#fff; border-color:#d7e3e8; }
.rn-button--outline:hover:not(:disabled):not(.rn-disabled) { background:#f1f6f8; border-color:#abc0ca; }
.rn-button--quiet { color:#607988; background:#f4f7f8; border-color:#edf2f3; }
.rn-button:disabled, .rn-button.rn-disabled { opacity:.48; cursor:not-allowed; }
.rn-button:focus-visible, .rn-form input:focus-visible, .rn-form textarea:focus-visible { outline:3px solid rgba(199,166,104,.65); outline-offset:2px; }
.rn-privacy { margin:13px 0 0; color:#8b9ca5; font-size:10px; line-height:1.9; }
.rn-status { margin:12px 0 0; padding:11px 12px; border:1px solid #dce9ef; border-radius:9px; background:#f1f7fa; color:#365a6f; font-size:11px; line-height:1.9; overflow-wrap:anywhere; }
.rn-status--success { background:#edf7f1; border-color:#d6ecdf; color:#316e51; }
.rn-status--error { background:#fff4f1; border-color:#f0d8d1; color:#a04e40; }
.rn-preview { min-width:0; overflow:hidden; padding:15px; border:1px solid #e4ebee; border-radius:11px; background:#f7f9fa; }
.rn-preview-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.rn-preview-heading strong { color:#28485d; font-size:13px; }
.rn-preview-heading p, .rn-preview-hint { margin:3px 0 0; color:#8a9ca7; font-size:10px; line-height:1.8; }
.rn-preview-heading .rn-button { flex:none; }
.rn-frame-wrap { min-height:520px; border:1px solid #dce5e9; border-radius:8px; background:#eef2f4; overflow:hidden; }
.rn-frame-wrap iframe { display:block; width:100%; height:620px; border:0; background:#fff; }
.rn-preview-placeholder { display:flex; align-items:center; justify-content:center; min-height:520px; margin:0; padding:25px; color:#879aa6; font-size:12px; text-align:center; }
.rn-preview-hint { margin-top:8px; }

/* The capture source remains in the DOM and paintable; html2pdf clones it into its own container. */
.rn-pdf-stage { position:fixed; top:0; left:-10000px; width:690px; z-index:-1; pointer-events:none; }
.rn-paper { width:690px; min-height:780px; padding:35px 38px 30px; border:1px solid #dce5e9; border-top:6px solid #163c59; border-radius:12px; background:#fff; font-size:13px; direction:rtl; text-align:right; }
.rn-paper-header { display:flex; align-items:center; justify-content:space-between; gap:14px; padding-bottom:18px; border-bottom:1px solid #e5ecef; }
.rn-paper-brand { display:flex; align-items:center; gap:12px; min-width:0; }
.rn-paper-logo { display:block; flex:none; width:76px; height:71px; object-fit:contain; }
.rn-paper-brand-text { min-width:0; }
.rn-paper-brand-text strong, .rn-paper-brand-text span { display:block; }
.rn-paper-brand-text strong { color:#102f48; font-size:14px; font-weight:800; line-height:1.8; }
.rn-paper-brand-text span { color:#899aa5; font-size:11px; }
.rn-paper-badge { flex:none; padding:7px 12px; border:1px solid #e9dfca; border-radius:7px; background:#fbf8f1; color:#977b47; font-size:11px; font-weight:800; }
.rn-paper-title { padding:25px 0 18px; }
.rn-paper-kicker { display:block; color:#b19760; font-size:11px; font-weight:800; }
.rn-paper-title h1 { margin:5px 0 4px; color:#102f48; font-size:23px; font-weight:800; line-height:1.6; }
.rn-paper-title p { margin:0; color:#8296a1; font-size:11px; }
.rn-paper-greeting { overflow-wrap:anywhere; margin:0 0 12px; color:#213e51; font-size:14px; font-weight:800; line-height:1.9; }
.rn-paper-intro, .rn-paper-note { margin:0 0 19px; color:#536d7d; font-size:12px; line-height:2.1; }
.rn-paper-details { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 20px; }
.rn-paper-field { flex:1 1 46%; min-width:0; padding:11px 14px; border:1px solid #e7eef1; border-radius:8px; background:#f8fafb; }
.rn-paper-field--amount { flex-basis:100%; border-color:#e8dfcd; background:#fcfaf5; }
.rn-paper-label, .rn-paper-value { display:block; overflow-wrap:anywhere; }
.rn-paper-label { color:#8295a0; font-size:10px; font-weight:700; }
.rn-paper-value { margin-top:3px; color:#1c394d; font-size:13px; font-weight:800; line-height:1.9; }
.rn-paper-field--amount .rn-paper-value { color:#163c59; font-size:17px; }
.rn-paper-note { margin:0; padding:13px 15px; border-right:3px solid #c7a668; background:#fbf9f4; }
.rn-paper-footer { margin-top:22px; padding-top:16px; border-top:1px dashed #d6e0e5; color:#8b9da7; font-size:10px; line-height:1.8; }

@media (max-width:900px) {
  .rn-editor-layout { grid-template-columns:1fr; }
  .rn-preview { max-width:100%; }
}
@media (max-width:600px) {
  .rn-intro { align-items:flex-start; flex-direction:column; padding:19px; }
  .rn-intro h3 { font-size:18px; }
  .rn-editor { padding:17px; }
  .rn-editor-header h4 { font-size:16px; }
  .rn-actions { flex-direction:column; }
  .rn-actions .rn-button { width:100%; }
  .rn-preview { padding:10px; }
  .rn-preview-heading { align-items:flex-start; flex-direction:column; }
  .rn-preview-heading .rn-button { width:100%; }
  .rn-frame-wrap, .rn-preview-placeholder { min-height:400px; }
  .rn-frame-wrap iframe { height:480px; }
}
