/*
 * Claim record: a read-only continuation of the new-claim form.
 * The same numbered sections are used on screen, Word export and A4 print.
 */
.collection-claim-record-page{
  width:min(100%,1220px);
  max-width:1220px;
  min-width:0;
  margin:0 auto 48px;
}
.collection-claim-record-hero{
  width:min(100%,1220px);
  margin-inline:auto;
}
.collection-claim-record-form{gap:22px}
.collection-claim-record-section{
  min-width:0;
  overflow:hidden;
  border-color:#d3e2dc;
  background:linear-gradient(145deg,#fff 0%,#fbfdfc 100%);
  box-shadow:0 12px 34px rgba(6,69,57,.07);
}
.collection-claim-record-section>header{
  align-items:flex-start;
  padding-bottom:17px;
  border-bottom:1px solid #deebe6;
}
.collection-claim-record-section>header>div{min-width:0;flex:1}
.collection-claim-record-section>header h3{margin:0;color:#0b493e;font-size:1.04rem}
.collection-claim-record-section>header p{
  margin:5px 0 0;
  color:#6b7f79;
  font-size:.78rem;
  line-height:1.65;
}
.collection-claim-record-section>header>.collection-card-number{
  display:grid;
  min-width:34px;
  min-height:29px;
  place-items:center;
  margin-inline-start:auto;
  padding:4px 8px;
  border:1px solid #c9dfd6;
  border-radius:999px;
  background:#f0f8f5;
  color:#0c6656;
  font-size:.76rem;
}
.collection-claim-record-field{
  display:grid;
  align-content:start;
  gap:7px;
  min-width:0;
  min-height:76px;
  padding:13px 15px;
  border:1px solid #dbe7e2;
  border-radius:13px;
  background:#fff;
}
.collection-claim-record-field>span{
  color:#6c7f79;
  font-size:.72rem;
  font-weight:800;
}
.collection-claim-record-field>strong{
  min-width:0;
  color:#172e29;
  font-size:.87rem;
  font-weight:760;
  line-height:1.75;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}
.collection-claim-parties-document{gap:16px}
.collection-claim-party-card{
  margin:0;
  border-color:#d4e4de;
  background:#fbfdfc;
  box-shadow:none;
}
.collection-claim-party-card>header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:15px;
  padding-bottom:13px;
  border-bottom:1px solid #dfebe7;
}
.collection-claim-party-card>header div{min-width:0}
.collection-claim-party-card>header span{display:block;color:#71857e;font-size:.7rem;font-weight:800}
.collection-claim-party-card>header h4{margin:4px 0 0;color:#123e35;font-size:.96rem;overflow-wrap:anywhere}
.collection-claim-client-card{border-inline-start:4px solid #0b6f5d}
.collection-claim-record-section .collection-data-divider{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:18px 0 12px;
  padding:10px 13px;
  border:1px solid #dbe8e3;
  border-radius:11px;
  background:#edf6f2;
  color:#155648;
}
.collection-claim-record-section .collection-data-divider:first-child{margin-top:0}
.collection-claim-record-section .collection-data-divider span{
  display:grid;
  min-width:27px;
  min-height:23px;
  place-items:center;
  border-radius:999px;
  background:#fff;
  color:#0b6f5d;
  font-size:.68rem;
  font-weight:900;
}
.collection-claim-record-actions{gap:10px}
.collection-claim-record-action{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  align-items:stretch;
  padding:12px;
}
.collection-claim-record-action>div{
  display:grid;
  align-content:start;
  gap:6px;
  min-width:0;
  padding:10px 11px;
  border:1px solid #e0e9e6;
  border-radius:10px;
  background:#fff;
}
.collection-claim-record-action span{color:#71827d;font-size:.68rem;font-weight:800}
.collection-claim-record-action strong{font-size:.79rem;line-height:1.65;overflow-wrap:anywhere;white-space:pre-wrap}
.collection-claim-record-table{
  width:100%;
  max-width:100%;
  margin:0;
  overflow:visible;
  border-color:#d8e4e0;
  border-radius:11px;
}
.collection-claim-record-table table{
  width:100%;
  min-width:0;
  table-layout:fixed;
  white-space:normal;
}
.collection-claim-record-table :is(th,td){
  min-width:0;
  max-width:none;
  padding:10px 11px;
  white-space:normal;
  vertical-align:top;
  overflow-wrap:anywhere;
  line-height:1.6;
  text-align:start;
}
.collection-claim-record-table th{
  background:#edf6f2;
  color:#155648;
  font-size:.71rem;
}
.collection-claim-record-table td{font-size:.76rem}
.collection-claim-record-table tbody tr:nth-child(even) td{background:#fbfdfc}
.collection-record-decision{
  display:block;
  width:max-content;
  margin-top:7px;
  padding:5px 10px!important;
  font-size:.68rem!important;
}
.collection-claim-record-empty{margin:0;border:1px dashed #d3e1dc;border-radius:11px;background:#fbfdfc}
.collection-claim-record-timeline{margin-top:4px}
.collection-claim-record-timeline article{break-inside:avoid}

@media screen and (max-width:980px){
  .collection-claim-record-action{grid-template-columns:repeat(2,minmax(0,1fr))}
  .collection-claim-record-action>div:nth-child(3),
  .collection-claim-record-action>div:nth-child(4){grid-column:span 2}
}
@media screen and (max-width:720px){
  .collection-claim-record-page{margin-top:15px}
  .collection-claim-record-section{padding:17px}
  .collection-claim-record-section>header{display:grid;grid-template-columns:auto minmax(0,1fr)}
  .collection-claim-record-section .collection-claim-form-grid{grid-template-columns:1fr}
  .collection-claim-record-section .collection-claim-form-grid>.wide{grid-column:auto}
  .collection-claim-record-action{grid-template-columns:1fr}
  .collection-claim-record-action>div:nth-child(3),
  .collection-claim-record-action>div:nth-child(4){grid-column:auto}
  .collection-claim-record-table{border:0;background:transparent}
  .collection-claim-record-table table,
  .collection-claim-record-table tbody{display:block}
  .collection-claim-record-table thead{display:none}
  .collection-claim-record-table tr{
    display:grid;
    gap:0;
    margin-bottom:10px;
    overflow:hidden;
    border:1px solid #d5e3de;
    border-top:3px solid #0b6f5d;
    border-radius:11px;
    background:#fff;
  }
  .collection-claim-record-table tr:last-child{margin-bottom:0}
  .collection-claim-record-table td{
    display:grid;
    grid-template-columns:minmax(105px,.7fr) minmax(0,1fr);
    gap:10px;
    padding:9px 11px;
    border-bottom:1px solid #e3ebe8;
  }
  .collection-claim-record-table td:last-child{border-bottom:0}
  .collection-claim-record-table td:before{content:attr(data-label);color:#687d76;font-size:.67rem;font-weight:850}
}

@page collection-claim-detail-a4{size:A4 portrait;margin:12mm 10mm 15mm}
@media print{
  body.hasad-standard-print:has(.collection-claim-record-page) #view{page:collection-claim-detail-a4}
  body.hasad-standard-print .collection-claim-record-page{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    overflow:visible!important;
  }
  body.hasad-standard-print .collection-claim-record-form{display:block!important}
  body.hasad-standard-print .collection-claim-record-hero{
    width:100%!important;
    max-width:none!important;
    margin:0 0 4mm!important;
    padding:4mm!important;
    border:1px solid #9dbbb1!important;
    box-shadow:none!important;
    break-inside:avoid;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  body.hasad-standard-print .collection-actionbar,
  body.hasad-standard-print .collection-approval-actions,
  body.hasad-standard-print .collection-record-decision{display:none!important}
  body.hasad-standard-print .collection-claim-record-section{
    display:block!important;
    margin:0 0 4mm!important;
    padding:4mm!important;
    overflow:visible!important;
    border:1px solid #b8ccc5!important;
    border-radius:2.5mm!important;
    background:#fff!important;
    box-shadow:none!important;
  }
  body.hasad-standard-print .collection-claim-record-section>header{
    display:grid!important;
    grid-template-columns:10mm minmax(0,1fr)!important;
    gap:2.5mm!important;
    margin:0 0 3mm!important;
    padding:0 0 2.5mm!important;
    border-bottom:1px solid #b8ccc5!important;
    break-after:avoid;
  }
  body.hasad-standard-print .collection-claim-record-section>header>span{
    width:9mm!important;
    height:9mm!important;
    background:#0b6f5d!important;
    color:#fff!important;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  body.hasad-standard-print .collection-claim-record-section>header h3{font-size:11pt!important}
  body.hasad-standard-print .collection-claim-record-section>header p{font-size:7pt!important;line-height:1.45!important}
  body.hasad-standard-print .collection-claim-record-section>header>.collection-card-number{font-size:7pt!important}
  body.hasad-standard-print .collection-claim-form-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:2.2mm!important;
  }
  body.hasad-standard-print .collection-claim-form-grid>.wide{grid-column:1/-1!important}
  body.hasad-standard-print .collection-claim-record-field{
    min-height:0!important;
    padding:2.2mm 2.5mm!important;
    border:1px solid #d5e1dd!important;
    border-radius:1.8mm!important;
    break-inside:avoid;
  }
  body.hasad-standard-print .collection-claim-record-field>span{font-size:6.5pt!important}
  body.hasad-standard-print .collection-claim-record-field>strong{font-size:8pt!important;line-height:1.55!important}
  body.hasad-standard-print .collection-claim-party-card{
    margin:0 0 3mm!important;
    padding:3mm!important;
    border:1px solid #c6d7d1!important;
    border-radius:2mm!important;
    box-shadow:none!important;
    break-inside:auto;
  }
  body.hasad-standard-print .collection-claim-party-card>header{margin-bottom:2.5mm!important;padding-bottom:2mm!important;break-after:avoid}
  body.hasad-standard-print .collection-data-divider{
    margin:3mm 0 2mm!important;
    padding:1.8mm 2.2mm!important;
    border-radius:1.6mm!important;
    background:#edf6f2!important;
    font-size:8pt!important;
    break-after:avoid;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  body.hasad-standard-print .collection-claim-record-action{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:1.2mm!important;
    margin-bottom:2mm!important;
    padding:2mm!important;
    break-inside:avoid;
  }
  body.hasad-standard-print .collection-claim-record-action>div{padding:1.5mm!important;border-radius:1.4mm!important}
  body.hasad-standard-print .collection-claim-record-action span{font-size:6pt!important}
  body.hasad-standard-print .collection-claim-record-action strong{font-size:7pt!important;line-height:1.4!important}
  body.hasad-standard-print .collection-claim-record-table{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
    border:1px solid #becfc9!important;
    border-radius:0!important;
  }
  body.hasad-standard-print .collection-claim-record-table table{
    display:table!important;
    width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
    font-size:7pt!important;
  }
  body.hasad-standard-print .collection-claim-record-table thead{display:table-header-group!important}
  body.hasad-standard-print .collection-claim-record-table tbody{display:table-row-group!important}
  body.hasad-standard-print .collection-claim-record-table tr{display:table-row!important;break-inside:avoid;page-break-inside:avoid}
  body.hasad-standard-print .collection-claim-record-table :is(th,td){
    display:table-cell!important;
    padding:1.5mm!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    line-height:1.4!important;
  }
  body.hasad-standard-print .collection-claim-record-table td:before{display:none!important;content:none!important}
  body.hasad-standard-print .collection-claim-record-table th{
    background:#0b6f5d!important;
    color:#fff!important;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  body.hasad-standard-print .collection-claim-record-empty{padding:3mm!important;font-size:8pt!important;break-inside:avoid}
  body.hasad-standard-print .collection-claim-record-timeline article{break-inside:avoid;page-break-inside:avoid}
}

/* الأقسام التشغيلية داخل صفحة المطالبة */
.collection-claim-operations-bar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.collection-claim-operations-bar button{min-height:40px}
.collection-claim-timeline{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.collection-claim-timeline li{border-inline-start:3px solid var(--accent,#0f766e);padding:8px 12px;background:var(--surface-2,#f8fafc);border-radius:8px}
.collection-claim-timeline-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.collection-claim-timeline li small{color:var(--muted,#6b7280)}
.collection-claim-timeline li p{margin:6px 0 0}
@media print{.collection-claim-operations-bar{display:none}}

/* لوحة حالة التحصيل داخل صفحة المطالبة */
.claim-dashboard{display:grid;gap:14px}
.claim-dashboard article{display:flex;flex-direction:column;justify-content:center;gap:6px;min-height:96px;padding:15px 16px;border:1px solid #dce6e2;border-radius:15px;background:linear-gradient(145deg,#fff,#f1f8f5);box-shadow:0 7px 18px rgba(20,63,52,.05)}
.claim-dashboard article span{color:var(--muted);font-size:.78rem}
.claim-dashboard article strong{color:var(--navy);font-size:1.3rem;line-height:1.3}
.claim-dashboard article small{color:var(--muted);font-size:.74rem}
.claim-dashboard article.ok{border-color:#bfe0d3;background:linear-gradient(145deg,#fff,#eaf6f1)}
.claim-dashboard article.ok strong{color:var(--green)}
.claim-dashboard article.attention{border-color:var(--gold-light);background:linear-gradient(145deg,#fff,#fdf7ea)}
.claim-dashboard article.attention strong{color:var(--gold)}
.claim-dashboard-financial{display:grid;grid-template-columns:minmax(0,2.1fr) minmax(220px,1fr);gap:14px;align-items:stretch}
.claim-dashboard-financial-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.claim-dashboard-progress{display:flex;flex-direction:column;justify-content:center;gap:10px;padding:15px 16px;border:1px solid #dce6e2;border-radius:15px;background:linear-gradient(145deg,#fff,#f1f8f5)}
.claim-dashboard-progress-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.claim-dashboard-progress-head span{color:var(--muted);font-size:.78rem}
.claim-dashboard-progress-head b{color:var(--green);font-size:1.3rem}
.claim-dashboard-bar{block-size:10px;border-radius:99px;background:#e4ece9;overflow:hidden}
.claim-dashboard-bar i{display:block;width:0;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--green2),var(--green))}
.claim-dashboard-counters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.claim-dashboard-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.claim-dashboard-facts>div{padding:11px 13px;border:1px solid var(--line);border-radius:12px;background:var(--white)}
.claim-dashboard-facts span{display:block;color:var(--muted);font-size:.74rem;margin-block-end:3px}
.claim-dashboard-facts b{color:var(--navy);font-size:.94rem;font-weight:600}
.claim-dashboard-facts>div.ok{border-color:#bfe0d3;background:#f2faf7}
.claim-dashboard-facts>div.ok b{color:var(--green)}
.claim-dashboard-facts>div.danger{border-color:#e8c3c6;background:#fdf3f3}
.claim-dashboard-facts>div.danger b{color:var(--red)}
.claim-dashboard-flag b{font-weight:700}
@media(max-width:1050px){.claim-dashboard-financial{grid-template-columns:1fr}.claim-dashboard-counters{grid-template-columns:repeat(2,minmax(0,1fr))}.claim-dashboard-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.claim-dashboard-financial-cards{grid-template-columns:1fr}.claim-dashboard-counters,.claim-dashboard-facts{grid-template-columns:1fr}}
@media print{.claim-dashboard article,.claim-dashboard-progress,.claim-dashboard-facts>div{box-shadow:none;background:#fff!important;border-color:#bbb}.claim-dashboard-bar{border:1px solid #bbb}}

/* مساحة عمل إجراءات التحصيل */
.claim-contact-points{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-block-end:14px}
.claim-contact-points>div{padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--white)}
.claim-contact-points span{display:block;color:var(--muted);font-size:.74rem;margin-block-end:3px}
.claim-contact-points b{color:var(--navy);font-size:.94rem}
.claim-action-buttons{display:flex;flex-wrap:wrap;gap:9px;margin-block-end:12px}
.claim-action-buttons button{min-height:44px}
.claim-action-buttons.secondary-row{padding-block-start:10px;border-block-start:1px dashed var(--line)}
.claim-attempt-reply td{background:#f4f9f7}
.claim-attempt-reply td:first-child{padding-inline-start:26px}
.claim-action-form .claim-dial-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.claim-action-form .claim-outcome-group{display:contents}
/* display:contents يتغلّب على قاعدة [hidden] المدمجة، فيلزم إخفاء المجموعة صراحة */
.claim-action-form .claim-outcome-group[hidden]{display:none}
.claim-action-form textarea{min-height:74px}
.claim-action-stage{margin-top:4px;padding:10px 12px;border-radius:10px;background:linear-gradient(135deg,#123f34,#0b2f27);border:1px solid #123f34;color:#fff}
.claim-action-stage b{font-size:.82rem;color:inherit}
.creditor-mode .claim-action-stage{background:linear-gradient(135deg,#6b4e14,#4a360c);border-color:#6b4e14;color:#fff}
.claim-action-field-label{display:flex!important;align-items:center;gap:6px}
.claim-action-field-label svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
@media(max-width:900px){.claim-contact-points{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.claim-contact-points{grid-template-columns:1fr}}
@media print{.claim-action-buttons{display:none}}

/* بيانات التسجيل الجديدة */
.claim-instrument-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.claim-instrument-option{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;padding:9px 11px;border:1px solid var(--line);border-radius:11px;background:var(--white);cursor:pointer}
.claim-instrument-option input{inline-size:17px;block-size:17px;margin:0}
.claim-instrument-option span{color:var(--navy);font-size:.88rem}
.claim-instrument-option:has(input:checked){border-color:var(--green);background:#f1f9f6}
.claim-superseded{margin-block-start:14px;border:1px dashed var(--line);border-radius:12px;padding:10px 12px;background:var(--paper)}
.claim-superseded summary{cursor:pointer;color:var(--muted);font-size:.86rem}
@media(max-width:900px){.claim-instrument-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.claim-instrument-list{grid-template-columns:1fr}}

/* المتابعات */
.follow-up-origin{display:block;margin-top:4px;font-size:.66rem;font-weight:700;color:#6b7d74;white-space:nowrap}
.follow-up-badge{display:inline-flex;align-items:center;padding:3px 10px;border-radius:99px;font-size:.78rem;border:1px solid var(--line);background:var(--paper);color:var(--navy)}
.follow-up-badge.due{border-color:var(--gold-light);background:#fdf7ea;color:var(--gold)}
.follow-up-badge.overdue{border-color:#e8c3c6;background:#fdf3f3;color:var(--red)}
.follow-up-badge.completed{border-color:#bfe0d3;background:#f2faf7;color:var(--green)}
.follow-up-badge.cancelled{color:var(--muted)}
tr.follow-up-overdue td{background:#fdf6f6}
tr.follow-up-cancelled td{color:var(--muted)}

/* لوحة عمل المحصل: منتقي المطالبة وأجندة اليوم وبطاقة التعريف */
.workspace-picker{margin:12px 0;border:1px solid var(--line,#e5e7eb);border-radius:12px;background:var(--surface,#fff);padding:10px 12px}
.workspace-picker>summary{cursor:pointer;font-weight:600;list-style:none}
.workspace-picker>summary::-webkit-details-marker{display:none}
.workspace-picker>summary .badge{margin-inline-start:6px}
.workspace-search{width:100%;margin:10px 0;padding:8px 10px;border:1px solid var(--line,#e5e7eb);border-radius:8px;font:inherit}
.workspace-claim-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px;max-height:320px;overflow-y:auto}
.workspace-claim{display:block;width:100%;text-align:inherit;padding:9px 11px;border:1px solid var(--line,#e5e7eb);border-radius:10px;background:var(--surface,#fff);cursor:pointer}
.workspace-claim b{display:block;font-size:14px}
.workspace-claim small,.workspace-claim span{display:block;font-size:12px;color:var(--muted,#6b7280);margin-top:2px}
.workspace-claim.active{border-color:var(--brand,#0f766e);box-shadow:0 0 0 1px var(--brand,#0f766e) inset}
.workspace-claim[hidden]{display:none}
.workspace-flag{display:inline-block;margin-top:4px;padding:1px 8px;border-radius:999px;font-size:11px;background:#f3f4f6;color:#374151}
.workspace-flag.overdue{background:#fee2e2;color:#991b1b}
.workspace-flag.today{background:#fef3c7;color:#92400e}
.workspace-flag.upcoming{background:#e0f2fe;color:#075985}
.workspace-identity-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.workspace-identity-head h2{margin:0}
.workspace-identity-head small{color:var(--muted,#6b7280)}
.workspace-identity-figures{display:flex;gap:18px;flex-wrap:wrap}
.workspace-identity-figures article{display:flex;flex-direction:column}
.workspace-identity-figures span{font-size:12px;color:var(--muted,#6b7280)}
.workspace-identity-figures strong{font-size:16px}
.workspace-identity-contact{display:flex;gap:18px;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid var(--line,#e5e7eb)}
.workspace-identity-contact span{display:flex;gap:6px;align-items:baseline;font-size:13px}
.workspace-identity-contact b{color:var(--muted,#6b7280);font-weight:500}
.workspace-identity-contact em{font-style:normal}
.collection-scope-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}

/* لوحة عمل المحصل: الملف في عمود، وكونسول الإجراء ثابت في عمود لا يغادر الشاشة */
.collector-shell{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:16px;align-items:start}
.collector-main{min-width:0}
.collector-aside{position:sticky;top:16px}
.collector-identity-head{display:flex;align-items:flex-start;gap:14px}
.collector-identity-head i{font-style:normal;display:grid;place-items:center;flex:0 0 52px;width:52px;height:52px;border-radius:15px;background:var(--mint,#e8f4ef);color:var(--green,#0f5d48);font-size:1.3rem;font-weight:900}
.collector-identity-head h2{margin:6px 0 4px;font-size:1.25rem}
.collector-identity-head small{color:var(--muted,#69766f)}
.collector-origin{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:7px;font-size:.72rem;color:var(--muted,#69766f);line-height:1.7}
.collector-origin span{display:inline-flex;gap:5px;align-items:baseline}
.collector-origin b{color:#3e4f47;font-weight:800}
.collector-identity-pills{display:flex;gap:6px;flex-wrap:wrap}
.collector-pill{display:inline-block;padding:4px 11px;border-radius:20px;background:#edf2ef;color:#496057;font-size:.7rem;font-weight:800}
.collector-pill.danger{background:#fdeaea;color:var(--red,#ad3f3f)}
.collector-figures{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
.collector-figures>div{flex:1;min-width:140px;padding:11px 13px;border:1px solid var(--line,#dfe6e2);border-radius:11px;background:#fbfcfb}
.collector-figures span{display:block;color:var(--muted,#69766f);font-size:.7rem}
.collector-figures strong{display:block;margin-top:4px;font-size:1.05rem}
.collector-figures>div.hi{background:#fff8ea;border-color:#f0e0be}
.collector-figures>div.warn strong{color:var(--red,#ad3f3f)}
.collector-bar{height:7px;border-radius:7px;background:#edf2ef;overflow:hidden;margin-top:8px}
.collector-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#1a8062,#75b89e)}
.collector-contact{display:flex;gap:10px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line,#dfe6e2);flex-wrap:wrap}
.collector-contact span{display:flex;gap:7px;align-items:baseline;padding:8px 12px;border:1px solid var(--line,#dfe6e2);border-radius:10px;background:#fff;font-size:.8rem}
.collector-contact b{color:var(--muted,#69766f);font-weight:600;font-size:.72rem}
.collector-contact em{font-style:normal}
.collector-console{background:#fff;border:1px solid #e4eae6;border-radius:14px;overflow:hidden;box-shadow:0 6px 20px rgba(25,45,38,.06)}
.collector-console>header{padding:14px 16px;background:linear-gradient(135deg,#123f34,#0b2f27);color:#fff}
.collector-console>header span{display:block;font-size:.7rem;color:#bcd6cc}
.collector-console>header b{display:block;margin-top:2px;font-size:1rem}
.collector-console>.notice{margin:14px 16px}
.collector-attempt{display:flex;gap:8px;margin:12px 16px 0}
.collector-attempt>div{flex:1;padding:9px;border:1px solid #f0e0be;border-radius:10px;background:#fff8ea;text-align:center}
.collector-attempt span{display:block;color:#8b641d;font-size:.65rem}
.collector-attempt b{display:block;margin-top:3px;font-size:.9rem;color:#7a5a15}
.collector-attempt>div.done{border-color:#bfded1;background:#e9f4ef}
.collector-attempt>div.done span,.collector-attempt>div.done b{color:#0d4f3d}
.collector-channels{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px 16px 0}
.collector-channels button{border-radius:10px;padding:11px;font-size:.8rem}
.collector-channels button:last-child:nth-child(odd){grid-column:1/-1}
.collector-channels button.active{background:#0a4b3a;box-shadow:inset 0 0 0 2px #d8bc7c}
.collector-console-form:empty{display:none}
.collector-console-hint{margin:12px 16px 16px;color:var(--muted,#69766f);font-size:.75rem;line-height:1.7}
.collector-console-form:not(:empty)+.collector-console-hint{display:none}
.console-form{padding:14px 16px 16px}
.console-form>header{display:flex;align-items:baseline;gap:8px;margin-bottom:10px}
.console-form>header span{color:var(--muted,#69766f);font-size:.7rem}
.console-form>header b{font-size:.9rem}
.console-form-close{margin-inline-start:auto;border:0;background:transparent;color:var(--muted,#69766f);font-size:1.3rem;line-height:1;padding:0 4px}
.console-form .modal-form{grid-template-columns:1fr;gap:10px}
.console-form .modal-form .wide{grid-column:auto}
.console-form .modal-form .actions{justify-content:stretch}
.console-form .modal-form .actions button{width:100%}
.collector-commitments{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px;padding:12px 15px;background:#fff;border:1px solid var(--line,#dfe6e2);border-radius:13px}
.collector-commitments>span{font-size:.72rem;font-weight:800;color:var(--muted,#69766f)}
.collector-commitments button{padding:8px 13px;font-size:.76rem}
.collector-decision{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px;padding:13px 16px;border-radius:13px;background:#e9f4ef;border:1px solid #bfded1}
.collector-decision b{color:#0d4f3d}
.collector-decision>span{flex:1;min-width:220px;color:#2c6c58;font-size:.8rem}
.collector-details{padding:0}
.collector-details>summary{cursor:pointer;padding:16px 20px;font-weight:700;list-style:none}
.collector-details>summary::-webkit-details-marker{display:none}
.collector-details[open]>summary{border-bottom:1px solid var(--line,#dfe6e2)}
.collector-details .claim-dashboard{padding:18px 20px}
@media(max-width:1150px){.collector-shell{grid-template-columns:1fr}.collector-aside{position:static}}

/*
 * قاعدة [hidden] المدمجة يتغلّب عليها .modal-form label{display:grid}، فكانت
 * مجموعات الكشف التدريجي في نموذج التسجيل ظاهرة دائمًا وإن كانت حقولها معطَّلة:
 * عدد الأقساط، وسابقة التحصيل، وتوصيف السند الآخر — سبعة حقول بلا دور.
 */
.modal-form [data-claim-group][hidden],
.collection-claim-registration-form [data-claim-group][hidden]{display:none}
.collection-claim-registration-form label>small,
.modal-form label>small{display:block;margin:-2px 0 5px;color:var(--muted,#69766f);font-weight:400;font-size:.72rem;line-height:1.7}
.collection-data-divider>small{display:block;margin-top:3px;color:var(--muted,#69766f);font-weight:400;font-size:.72rem}
.claim-instrument-other{margin-top:-4px}

.leadership-icons{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.leadership-icon{display:flex;min-height:98px;flex-direction:column;justify-content:center;gap:7px;padding:16px;border:1px solid #dce6e2;border-radius:15px;background:linear-gradient(145deg,#fff,#f1f8f5);box-shadow:0 7px 18px rgba(20,63,52,.05);text-align:right;cursor:pointer;transition:.18s}
.leadership-icon:hover,.leadership-icon:focus-visible{border-color:#b9d3c8;box-shadow:0 10px 24px rgba(20,63,52,.09)}
.leadership-icon b{color:var(--muted,#69766f);font-size:.78rem;font-weight:600}
.leadership-icon em{font-style:normal;color:var(--navy,#12303f);font-size:1.35rem;font-weight:800}
.leadership-icon small{color:var(--muted,#69766f);font-size:.66rem;line-height:1.6;opacity:.85}
.leadership-axes{display:flex;gap:7px;flex-wrap:wrap;margin-inline-start:auto}
.leadership-axis{padding:6px 13px;border-radius:99px;border:1px solid var(--line,#dfe7e4);background:#fff;font-size:.7rem;font-weight:800;color:#4a6a5c;cursor:pointer}
.leadership-axis.on{background:var(--green,#0f5d48);color:#fff;border-color:var(--green,#0f5d48)}
.leadership-analytics .cf-bar-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.leadership-analytics .cf-bar-group{display:grid;gap:7px;align-content:start;padding:13px;border:1px solid var(--line,#dfe7e4);border-radius:13px;background:#fbfdfc}
.leadership-analytics .cf-bar-group>header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:2px 10px;margin-bottom:4px}
.leadership-analytics .cf-bar-group>header h3{margin:0;font-size:.79rem}
.leadership-analytics .cf-bar-group>header small{grid-column:1;color:var(--muted,#69766f);font-size:.63rem}
.leadership-analytics .cf-bar-group>header b{grid-row:1/3;font-size:1.05rem;color:var(--green,#0f5d48)}
.leadership-analytics .cf-bar{display:grid;grid-template-columns:minmax(90px,.6fr) minmax(0,1fr) auto;align-items:center;gap:9px;padding:6px 8px;border-radius:9px}
.leadership-analytics .cf-bar span{font-size:.69rem;font-weight:700}
.leadership-analytics .cf-bar i{display:block;height:9px;border-radius:99px;background:#eaf1ee;overflow:hidden}
.leadership-analytics .cf-bar i b{display:block;height:100%;border-radius:99px;background:var(--green,#0f5d48)}
.leadership-analytics .cf-bar.a i b{background:#7f9c93}
.leadership-analytics .cf-bar.w i b{background:var(--gold,#b6832d)}
.leadership-analytics .cf-bar em{font-style:normal;font-size:.71rem;font-weight:900;font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:900px){.leadership-analytics .cf-bar-groups{grid-template-columns:1fr}}
.leadership-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:13px}
.leadership-tile{display:grid;gap:5px;text-align:right;padding:16px;border:1px dashed #d7e3dd;border-radius:16px;background:#fbfdfc;cursor:pointer;transition:.18s}
.leadership-tile:hover{border-style:solid;border-color:var(--green,#0f5d48);background:#fff;transform:translateY(-2px)}
.leadership-tile b{font-size:.9rem}
.leadership-tile small{color:var(--muted,#69766f);font-size:.72rem;line-height:1.7}
.leadership-tile span{margin-top:4px;color:var(--green,#0f5d48);font-size:.74rem;font-weight:800}
.leadership-own{background:#fdf6ea}
.leadership-escalated{display:block;margin-top:3px;font-size:.66rem;font-weight:800;color:var(--gold,#b6832d)}
.panel-head .badge.warn{background:#fdf6ea;color:var(--gold,#b6832d)}

/* نافذة الاستيفاء التاريخي — شاشة استثنائية مؤقتة، ووسمها البصري يفارق شاشات العمل
   المعتادة عمداً حتى لا يُظنّ أنها منها. */
.backfill-banner{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;border:1px solid #e6cfae;background:linear-gradient(145deg,#fffaf1,#fdf3e3)}
.backfill-banner strong{color:var(--gold,#b6832d);font-size:.86rem}
.backfill-banner b{color:var(--navy,#12303f)}
.backfill-banner small{display:block;margin-top:4px;color:var(--muted,#69766f);font-size:.68rem;line-height:1.7}
.backfill-closed p.muted{color:var(--muted,#69766f);font-size:.74rem;line-height:1.9;margin:0 0 12px}
.backfill-grid{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1.1fr) minmax(0,1.2fr);gap:14px;align-items:start}
.backfill-col{display:grid;gap:9px;align-content:start;min-width:0}
.backfill-col>h3{margin:0;font-size:.78rem;color:var(--muted,#69766f)}
.backfill-people,.backfill-claims{list-style:none;margin:0;padding:0;display:grid;gap:6px;max-height:460px;overflow:auto}
.backfill-person{display:grid;gap:3px;width:100%;text-align:right;padding:10px 12px;border:1px solid var(--line,#dfe7e4);border-radius:11px;background:#fff;cursor:pointer;transition:.16s}
.backfill-person:hover{border-color:#b9d3c8}
.backfill-person.on{border-color:var(--green,#0f5d48);background:#f2f8f5}
.backfill-person b{font-size:.78rem}
.backfill-person small{color:var(--muted,#69766f);font-size:.65rem}
.backfill-search{width:100%;padding:8px 12px;border:1px solid var(--line,#dfe7e4);border-radius:10px;font-size:.73rem}
.backfill-claim{display:grid;grid-template-columns:auto minmax(0,1fr);gap:9px;align-items:start;padding:9px 11px;border:1px solid var(--line,#dfe7e4);border-radius:11px;background:#fff;cursor:pointer;transition:.16s}
.backfill-claim:hover{border-color:#b9d3c8}
.backfill-claim.on{border-color:var(--green,#0f5d48);background:#f2f8f5}
.backfill-claim>span{display:grid;gap:2px;min-width:0}
.backfill-claim b{font-size:.75rem}
.backfill-claim small{color:var(--muted,#69766f);font-size:.64rem;overflow-wrap:anywhere}
.backfill-warn{font-style:normal;color:var(--gold,#b6832d);font-weight:800}
.backfill-done{font-style:normal;color:var(--green,#0f5d48);font-weight:800}
.backfill-kinds{display:flex;gap:7px;flex-wrap:wrap}
.backfill-kind{padding:6px 13px;border-radius:99px;border:1px solid var(--line,#dfe7e4);background:#fff;font-size:.7rem;font-weight:800;color:#4a6a5c;cursor:pointer}
.backfill-kind.on{background:var(--green,#0f5d48);color:#fff;border-color:var(--green,#0f5d48)}
.backfill-form{border:1px solid #e6cfae;border-radius:13px;padding:13px;background:#fffdf8}
.backfill-form textarea{min-height:60px}
@media(max-width:1000px){.backfill-grid{grid-template-columns:1fr}.backfill-people,.backfill-claims{max-height:280px}}
.backfill-evidence{display:grid;gap:6px;padding:13px;border:1px dashed #d8c49c;border-radius:12px;background:#fffdf7;cursor:text}
.backfill-evidence:focus{outline:2px solid var(--gold,#b6832d);outline-offset:2px}
.backfill-evidence.drop{border-style:solid;border-color:var(--gold,#b6832d);background:#fdf6e8}
.backfill-evidence.on{border-style:solid;border-color:#b9d3c8;background:#f7fbf9}
.backfill-evidence>b{font-size:.74rem;color:var(--navy,#12303f)}
.backfill-evidence>span{font-size:.66rem;color:var(--muted,#69766f);line-height:1.8}
.backfill-pick{color:var(--green,#0f5d48);font-weight:800;cursor:pointer;text-decoration:underline}
.backfill-evidence figure{margin:0;display:grid;gap:5px;justify-items:start}
.backfill-evidence img{max-width:100%;max-height:190px;border:1px solid var(--line,#dfe7e4);border-radius:9px}
.backfill-evidence figcaption,.backfill-evidence p{margin:0;font-size:.64rem;color:var(--muted,#69766f)}
.backfill-evidence [data-evidence-clear]{margin-inline-start:6px;padding:2px 9px;border:1px solid var(--line,#dfe7e4);border-radius:99px;background:#fff;font-size:.62rem;color:#a33;cursor:pointer}

/* بحث السجلّ وبطاقة الموظف: صفٌّ واحد يتكيّف، فلا يزاحم الجدول ولا ينكسر على الشاشة الضيقة. */
.collection-claims-search{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 12px}
.collection-claims-search .collection-search-input{flex:1 1 320px;min-width:0;padding:10px 12px;border:1px solid var(--line,#d8dfe6);border-radius:10px;background:#fff;font:inherit}
.collection-claims-search .collection-search-input:focus{outline:2px solid var(--brand,#0f5132);outline-offset:1px}
.collection-employee-filter{display:inline-flex;align-items:center;gap:8px;padding:4px 10px 4px 4px;border:1px solid var(--line,#d8dfe6);border-radius:10px;background:#fff;white-space:nowrap}
.collection-employee-filter>span{font-size:12.5px;font-weight:700;color:var(--muted,#69766f)}
.collection-employee-filter select{border:0;background:transparent;font:inherit;font-size:13.5px;color:var(--ink,#17231f);padding:6px 4px;max-width:220px}
.collection-employee-filter select:focus{outline:2px solid var(--brand,#0f5132);outline-offset:1px;border-radius:6px}
.collection-employee-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:#eef5f0;color:#0f5132;font-weight:600}
.collection-employee-chip button{border:0;background:transparent;color:inherit;font-size:16px;line-height:1;cursor:pointer;padding:0 2px}

/* لوحة الفريق: الصفّ بابٌ يُنقر، فيُظهر ذلك في المؤشر والتظليل لا في نصٍّ يشرحه. */
.collection-team-panel .collection-team-hint{margin:0 0 10px;font-size:13px}
.collection-team-row{cursor:pointer}
.collection-team-row:hover,.collection-team-row:focus-visible{background:#f4f8f5}
.collection-team-row small{display:block;color:var(--muted,#6b7a86);font-weight:400}
.collection-team-row .collection-team-open{color:#0f5132;font-weight:600;white-space:nowrap}
.collection-team-overdue{color:#a4262c;font-weight:700}
.collection-team-self b::after{content:" (أنت)";color:var(--muted,#6b7a86);font-weight:400}
.cf-bar.cf-bar-open{cursor:pointer}
.cf-bar.cf-bar-open:hover span,.cf-bar.cf-bar-open:focus-visible span{text-decoration:underline}

/* الوسم يُقرأ ولا يُزاحم: سطرٌ تحت البيان بلونٍ هادئ، والموقفُ يتميّز بحافةٍ لا بلونِ صفٍّ صارخ. */
.claim-attempt-note{display:block;margin-top:4px;color:var(--muted,#6b7a86);font-size:12px}
.claim-attempt-note b{color:#8a6d1f}
.claim-attempt-instruction{background:#fbf8ef}
.claim-attempt-instruction td:first-child{border-inline-start:3px solid #c8a84b}

/* جدول ما استُوفي: الصفُّ بابٌ يُنقر، والمصحَّح منه مميَّز، وبيانه يُقرأ قبل فتحه. */
.backfill-entry-row{cursor:pointer}
.backfill-entry-row:hover{background:#f6f8f7}
.backfill-entry-row.on{background:#eef5f0;box-shadow:inset 3px 0 0 #0f5132}
.backfill-entry-summary{max-width:320px;color:var(--muted,#4a5a66)}
.backfill-entry-actions{white-space:nowrap;display:flex;gap:6px}
.backfill-editing-banner{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 10px;border-radius:10px;background:#fbf8ef;border:1px solid #e6d9ad;margin-bottom:8px}
.backfill-editing-banner small{color:var(--muted,#6b7a86)}
.backfill-editing-banner button{margin-inline-start:auto}
.backfill-form-editing{outline:2px solid #c8a84b;outline-offset:4px;border-radius:12px}

/* ═════ مسارا لوحة العمل: تجاه المدين، وموقف الموكّل ═════
 * المسار يُعرف بلونه قبل قراءة سطره: الأخضر للمدين والذهبي للموكّل، في الكونسول
 * وفي السجل وفي شريط الإجراء القادم. */
.collector-tracks{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px 16px 0}
.collector-track{padding:10px 9px;border:1px solid var(--line,#dfe6e2);border-radius:11px;background:#fbfcfb;color:#4e5d56;text-align:center;transition:.15s}
.collector-track b{display:block;font-size:.82rem;font-weight:800}
.collector-track small{display:block;margin-top:3px;font-size:.66rem;color:var(--muted,#69766f)}
.collector-track.debtor.on{border-color:#8ab7a7;background:var(--mint,#e8f4ef);color:var(--green,#0f5d48)}
.collector-track.creditor.on{border-color:#ddc48a;background:#fff8ea;color:#8b641d}
.collector-track.on small{color:inherit;opacity:.82}
.collector-console.creditor-mode>header{background:linear-gradient(135deg,#6b4e14,#4a360c)}
.collector-console.creditor-mode>header span{color:#e8d4a6}
.collector-console.creditor-mode .collector-channels .primary{background:#8b641d;box-shadow:0 7px 16px #8b641d2b}
.collector-console.creditor-mode .collector-channels .primary.active{background:#6b4e14}

/* كتلة الإجراء القادم داخل نموذج الإجراء */
.collector-next-action{margin-top:4px;padding:0 13px 13px;border:1px solid #dfe6e2;border-radius:12px;background:#fff;overflow:hidden}
.creditor-mode .collector-next-action{border-color:#ead9b3;background:#fff}
.collector-next-action>b{display:block;margin:0 -13px 11px;padding:10px 12px;background:linear-gradient(135deg,#123f34,#0b2f27);color:#fff;font-size:.82rem}
.creditor-mode .collector-next-action>b{background:linear-gradient(135deg,#6b4e14,#4a360c)}
.collector-next-action>b em{display:none}
.workflow-next-text{margin:6px 0 2px;font-weight:600;line-height:1.8;color:#123f34}
.creditor-mode .workflow-next-text{color:#4a360c}
.workflow-next-when{margin:0 0 8px;color:#0f6b52;font-size:.92rem}
.workflow-next-when[hidden]{display:none}
.workflow-custom-type{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.workflow-custom-type[hidden]{display:none}
.workflow-save-type{grid-column:1/-1;display:flex;align-items:center;gap:8px}
.workflow-save-type[hidden]{display:none}
@media screen and (max-width:760px){.workflow-custom-type{grid-template-columns:1fr}}
.next-action-chips{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.next-action-chip{padding:6px 11px;border:1px solid var(--line,#dfe6e2);border-radius:20px;background:#fff;font-size:.74rem;font-weight:700;color:#4e5d56}
.next-action-chip.on{border-color:#178060;background:var(--mint,#e8f4ef);color:var(--green,#0f5d48)}
.creditor-mode .next-action-chip.on{border-color:#ddc48a;background:#fff8ea;color:#8b641d}
.next-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.next-action-grid .wide{grid-column:1/-1}
.next-action-grid label{display:grid;gap:5px;font-size:.75rem;font-weight:700}
.next-action-off .next-action-grid{display:none}

/* شريط الإجراء القادم — المتابعات داخل لوحة التشغيل */
.collector-next-strip .next-action-row{display:grid;grid-template-columns:118px minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:11px 0;border-bottom:1px solid #edf1ef}
.collector-next-strip .next-action-row:last-child{border-bottom:0}
.collector-next-strip .what b{display:block;font-size:.84rem}
.collector-next-strip .what small{display:block;margin-top:2px;color:var(--muted,#69766f);font-size:.73rem;line-height:1.7}
.collector-next-strip .when{text-align:center;font-size:.75rem;font-variant-numeric:tabular-nums}
.collector-next-strip .when b{display:block}
.collector-next-strip .when small{color:var(--muted,#69766f)}
.collector-next-strip .next-action-row.late .when b{color:var(--red,#ad3f3f)}
.collector-next-strip .next-action-row.late{border-inline-start:3px solid var(--red,#ad3f3f);padding-inline-start:10px}
.collector-next-strip .next-action-row.late .when small{color:var(--red,#ad3f3f);font-weight:600}
.collector-next-strip .next-action-buttons{display:flex;gap:6px}
.track-chip{display:inline-block;padding:4px 10px;border-radius:8px;font-size:.7rem;font-weight:800;white-space:nowrap;text-align:center}
.track-chip.debtor{background:var(--mint,#e8f4ef);color:var(--green,#0f5d48)}
.track-chip.creditor{background:#fff8ea;color:#8b641d;border:1px solid #f0e0be}

/* سجل مواقف الموكّل — التوصيف يُقرأ كما كُتب، لا يُقصّ */
.collector-creditor-record{border-inline-start:3px solid var(--gold,#b6832d)}
.collector-creditor-record table{white-space:normal}
.collector-creditor-record .creditor-position{display:inline-block;padding:3px 9px;border-radius:7px;background:#fff8ea;color:#8b641d;font-size:.73rem;font-weight:750}
.collector-creditor-record .creditor-summary{max-width:52ch;line-height:1.75;color:#4a564f}
@media(max-width:760px){
  .collector-tracks,.next-action-grid{grid-template-columns:1fr}
  .collector-next-strip .next-action-row{grid-template-columns:1fr;gap:7px}
}

/* تبويبا حالة الملف داخل «مطالباتي»: المتداول والمعلّق كلاهما يُعمل عليه */
.workspace-lifecycle-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 8px}
.workspace-lifecycle{display:flex;align-items:center;justify-content:center;gap:7px;padding:8px 10px;
  border:1px solid var(--line,#dfe6e2);border-radius:10px;background:#fbfcfb;color:#4e5d56;font-size:.78rem;font-weight:750}
.workspace-lifecycle b{display:grid;place-items:center;min-width:26px;padding:1px 6px;border-radius:7px;background:#eef3f0;font-size:.74rem}
.workspace-lifecycle.on{border-color:#8ab7a7;background:var(--mint,#e8f4ef);color:var(--green,#0f5d48)}
.workspace-lifecycle.on b{background:#fff}
.workspace-claim .workspace-flag.suspended{background:#fff3da;color:#8b641d}


/* Collection workspace v2: parties first, operations separate from report. */
.collection-parties-identity{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}
.collection-party-card{border:1px solid #dce3e9;border-radius:14px;padding:17px 18px;background:#fff;min-width:0}
.collection-party-card.client{border-inline-start:4px solid var(--gold,#bd9852)}
.collection-party-card.opponent{border-inline-start:4px solid var(--navy,#142d49)}
.collection-party-card>span{display:block;color:#607184;font-size:12px;font-weight:700;margin-bottom:5px}
.collection-party-card h2{margin:0;color:#142d49;font-size:19px;overflow-wrap:anywhere}
.collection-party-card small{display:block;margin-top:6px;color:#607184;overflow-wrap:anywhere}
.collection-claim-strip,
.collection-parties-identity .collector-figures{grid-column:1/-1}
.collection-claim-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 2px}
.collection-claim-report-page .collection-claim-form-section{margin-block:14px}
.collection-claim-report-page .collection-claim-record-field{padding-block:10px}
.collection-claim-report-page .collection-claim-record-form{gap:12px}
.claim-plan-card{border:1px solid #dce3e9;border-radius:12px;padding:14px;margin-block:10px;background:#fff}
.claim-plan-head,
.claim-plan-summary,
.claim-plan-payments{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.claim-plan-summary{margin-block:12px}
.claim-plan-summary span,
.claim-plan-payments span{color:#526477}
.claim-plan-summary b{color:#142d49}
@media(max-width:700px){.collection-parties-identity{grid-template-columns:1fr}}


.targeting-workspace.collection-workspace{width:100%;max-width:none;margin-inline:0}
.collection-workspace-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;background:#fff;border-bottom:1px solid #dce3e9}
.collection-workspace-toolbar .collection-workspace-tabs{flex:1;min-width:0}
.collection-workspace-toolbar .targeting-workspace-actions{gap:6px}
.collection-workspace-toolbar .targeting-workspace-actions>.secondary{padding:8px 11px;min-height:36px}
.collection-workspace-tabs{display:flex;gap:4px;overflow-x:auto;margin:0;padding:0;background:transparent;border:0;border-radius:0}
.collection-workspace-tabs button{flex:0 0 auto;border:0;background:transparent;color:#526477;padding:8px 12px;border-radius:8px;font:inherit;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
.collection-workspace-tabs button[aria-current=page],.collection-workspace-tabs button.active{background:var(--navy,#142d49);color:#fff;box-shadow:none}
.collection-workspace-tabs button:focus-visible{outline:2px solid var(--hasad-green-700,#0c7259);outline-offset:2px}
.collection-workspace .targeting-workspace-sections[hidden]{display:none!important}
.collection-workspace [data-workspace-body]{padding:10px 12px 16px}
.collection-hub-claims{min-width:0}
.collection-hub-claims .collection-claims-status-tabs{display:flex;gap:6px;flex:1 1 430px;overflow-x:auto;margin:0;padding:4px;background:#f4f6f8;border:1px solid #dce3e9;border-radius:10px}
.collection-hub-claims .collection-claims-status-tabs button{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:1 0 auto;min-width:max-content;min-height:36px;padding:7px 11px;border-radius:7px}
.collection-hub-claims .collection-claims-status-tabs button span{font-size:13px;font-weight:700;white-space:nowrap}
.collection-hub-claims .collection-claims-status-tabs button b{font-size:13px;line-height:1;padding:3px 6px;border-radius:999px;background:#fff;color:#314b63}
.collection-hub-claims .collection-claims-status-tabs button.active b{background:#ffffff26;color:inherit}
.collection-hub-claims .collection-claims-search{margin:0 0 10px;padding:8px 10px;border:1px solid #dce3e9;border-radius:12px;background:#fff}
.collection-hub-claims .collection-claims-index{margin-top:0}
.collection-hub-claims .collection-claims-index-head{flex-wrap:wrap;margin-bottom:0;padding:10px 12px;border-bottom:1px solid #e1e8e5}
.collection-hub-claims .collection-claims-index-head>h2{flex:0 0 auto}
.collection-hub-claims .collection-claims-index-head .results-sort-menu{min-width:215px;min-height:44px}
@media(max-width:800px){
  .collection-workspace-toolbar{align-items:stretch;flex-direction:column}
  .collection-workspace-toolbar .targeting-workspace-actions{justify-content:flex-end}
  .collection-workspace [data-workspace-body]{padding:8px 8px 14px}
  .collection-hub-claims .collection-claims-status-tabs button{flex:0 0 auto}
  .collection-hub-claims .collection-claims-index-head>*{flex-basis:100%}
}
/* الطباعة داخل مركز التحصيل: شريط المركز وأدوات التصفية ليست من المستند المطبوع، ويبقى بيان الموظف المختار */
@media print{
  .collection-workspace-toolbar,
  .collection-claims-status-tabs,
  .collection-claims-search>:not(.collection-employee-chip){display:none!important}
  .collection-claims-search:not(:has(.collection-employee-chip)){display:none!important}
  .collection-workspace [data-workspace-body]{padding:0!important}
}


.collection-opponent-cards{display:grid;gap:10px;min-width:0}
.collection-party-details{margin-top:12px;border-top:1px solid #e5eaee;padding-top:10px}
.collection-party-details summary{cursor:pointer;color:#314b63;font-weight:700;font-size:12px}
.collection-party-details dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;margin:10px 0 0}
.collection-party-details dl>div{min-width:0}
.collection-party-details dt{font-size:11px;color:#71808e}
.collection-party-details dd{margin:2px 0 0;color:#203b53;font-weight:700;overflow-wrap:anywhere}
@media(max-width:560px){.collection-party-details dl{grid-template-columns:1fr}}
.collection-message-images [data-message-image-preview]{display:flex;flex-wrap:wrap;gap:12px;margin-block:10px}
.collection-message-images figure{margin:0;display:grid;gap:6px;max-width:180px;overflow-wrap:anywhere}
.collection-message-images img,.collection-message-image img{display:block;max-width:180px;max-height:140px;object-fit:contain;border:1px solid #d9e0ea;border-radius:8px}
.collection-message-image{display:inline-flex;flex-direction:column;gap:4px;max-width:180px;margin:6px;overflow-wrap:anywhere;vertical-align:top}

[data-action-edit]{cursor:pointer}
[data-action-edit]:hover{background:#f4f8fa}
[data-action-edit]:focus-visible{outline:2px solid var(--hasad-green-700,#0c7259);outline-offset:-2px}

/* مدد الإجراءات القادمة والعطلات الرسمية في لوحة القيادة */
.collection-workflow-settings .muted{margin:6px 0 0;color:#5a6f69;font-size:.9rem}
.workflow-holidays{margin-top:14px}
.workflow-holidays ul{list-style:none;margin:8px 0;padding:0;display:grid;gap:6px}
.workflow-holidays li{display:flex;gap:10px;align-items:center;padding:7px 10px;border:1px solid #dfe6e2;border-radius:10px}
.workflow-holidays li b{min-width:92px}
.workflow-holidays li span{flex:1}

/* ─── المسار الزمني: المعيار مقابل الواقع ─── */
.claim-path-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.claim-path-stat{border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:#fff}
.claim-path-stat small{display:block;color:var(--muted);font-size:12px}
.claim-path-stat b{font-size:18px;font-weight:800}
.claim-path-stat.green b{color:var(--green)}
.claim-path-stat.gold{background:#fbf1df;border-color:#efd9ae}.claim-path-stat.gold b{color:#8a5f14}
.claim-path-stat.red{background:#fbeaea;border-color:#efc9c9}.claim-path-stat.red b{color:var(--red)}
.claim-path-scroll{overflow-x:auto;padding:6px 0 4px;border-radius:12px}
.cp-svg{display:block;font-family:inherit;max-width:none}
/* قاعدة responsive-mobile.css العامة (#app svg{max-inline-size:100%}) كانت تضغط المسار فتصغر خطوطه؛ المسار يتمرّر أفقيًا بحجمه الطبيعي. */
#app .cp-svg{max-width:none;max-inline-size:none}
.cp-svg .cp-base{stroke:#c7d2cd}.cp-svg .cp-axis{stroke:#cfd9d5}
.cp-svg .cp-ok{stroke:var(--green2,#178060)}.cp-svg .cp-late{stroke:var(--red,#ad3f3f)}
.cp-svg .cp-weekend{fill:#eef1f0;stroke:#d5dcd9;stroke-dasharray:3 3}
.cp-svg .cp-dot{stroke-width:3}
.cp-svg .cp-dot-ok{fill:var(--green2,#178060);stroke:var(--green2,#178060)}
.cp-svg .cp-dot-late{fill:var(--red,#ad3f3f);stroke:var(--red,#ad3f3f)}
.cp-svg .cp-dot-start{fill:#fff;stroke:#59706a}
.cp-svg .cp-open-dot{fill:#fff;stroke:var(--green2,#178060);stroke-width:3;stroke-dasharray:4 3}
.cp-svg .cp-open-dot.cp-open-late{stroke:var(--red,#ad3f3f)}
.cp-svg .cp-text{fill:var(--ink,#17231f)}.cp-svg .cp-muted{fill:var(--muted,#5f6d66)}
.cp-svg .cp-late-text{fill:var(--red,#ad3f3f)}.cp-svg .cp-today-text{fill:var(--gold,#b6832d)}
.cp-svg .cp-exec{cursor:pointer}.cp-svg .cp-exec rect{fill:var(--green,#0f5d48)}.cp-svg .cp-exec:hover rect,.cp-svg .cp-exec:focus rect{fill:var(--green2,#178060)}
.cp-svg .cp-exec .cp-exec-text{fill:#fff}
.claim-path-legend{display:flex;flex-wrap:wrap;gap:18px;margin-top:12px;font-size:12.5px;color:var(--muted)}
.claim-path-legend .ok::before,.claim-path-legend .late::before{content:"";display:inline-block;width:24px;height:5px;border-radius:3px;margin-inline-end:6px;vertical-align:middle;background:var(--green2,#178060)}
.claim-path-legend .late::before{background:var(--red,#ad3f3f)}
.claim-path-list{display:none}
.claim-path-card{border:1px solid var(--line);border-radius:14px;padding:12px;background:#fff;display:grid;gap:8px}
.claim-path-card.late{background:#fbeaea;border-color:#efc9c9}
.claim-path-who{justify-self:start;font-size:11.5px;font-weight:800;border-radius:6px;padding:1px 9px}
.claim-path-who.debtor{background:#eaf1f8;color:#365e8b}.claim-path-who.creditor{background:var(--mint,#e8f4ef);color:var(--green)}
.claim-path-compare{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.claim-path-compare span{border-radius:10px;padding:6px 8px;font-size:12.5px;background:#f6f8f7}
.claim-path-compare span:first-child{border:2px dashed var(--gold,#b6832d);background:#fffdf8}
.claim-path-compare small{display:block;color:var(--muted);font-size:11px}
.claim-path-badge{justify-self:start;font-size:12px;font-weight:800;border-radius:999px;padding:2px 10px;background:#eef1f0;color:var(--muted)}
.claim-path-badge.ok{background:var(--mint,#e8f4ef);color:var(--green)}.claim-path-badge.late{background:var(--red,#ad3f3f);color:#fff}
@media(max-width:760px){
  .claim-path-stats{grid-template-columns:1fr 1fr}
  .claim-path-scroll{display:none}
  .claim-path-list{display:grid;gap:10px}
}

/* ─── اختيار وسيلة التواصل عند تنفيذ الإجراء القادم ─── */
.execution-channel-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--mint,#e8f4ef)}
.execution-channel-bar>span{font-weight:800;color:var(--green);margin-inline-end:6px}
.execution-channel-bar button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 14px;font:inherit;font-weight:700;cursor:pointer}
.execution-channel-bar button.active{background:var(--green);border-color:var(--green);color:#fff}

/* مراجعة الإجراءات المفتوحة القديمة */
.collection-followup-review .muted{margin:6px 0 0;color:#5a6f69;font-size:.9rem}
.followup-review{display:grid;gap:14px;max-height:calc(100vh - 270px);overflow:auto;padding-inline-end:4px}
.followup-review-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.followup-review-summary>div{display:grid;gap:2px;padding:10px 12px;border:1px solid #dfe6e2;border-radius:12px;background:#f7faf8}
.followup-review-summary small{color:#5a6f69}
.followup-review-summary b{font-size:1.5rem}
.followup-review-section{display:grid;gap:8px}
.followup-review-section>header{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.followup-review-section>header h3{margin:0;font-size:1.02rem}
.followup-review-section>header b{padding:1px 10px;border-radius:999px;background:#e6efe9;color:#1b4d3e}
.followup-review-section>header .compact:first-of-type{margin-inline-start:auto}
.followup-review-list{display:grid;gap:8px}
#modal:has(.followup-review){width:min(940px,94vw);max-width:94vw}
.followup-review-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:4px 12px;align-items:center;padding:10px 12px;border:1px solid #dfe6e2;border-radius:12px;background:#fff;cursor:pointer}
.followup-review-row:hover{border-color:#9db9ad}
.followup-review-row.readonly{grid-template-columns:minmax(0,1fr) auto;cursor:default}
.followup-review-row.readonly:hover{border-color:#dfe6e2}
.followup-review-row.readonly .followup-review-main{grid-column:1}
.followup-review-row.readonly .followup-review-open{grid-column:2}
.followup-review-row.readonly .followup-review-meta{grid-column:1 / span 2}
.followup-review-row input{grid-row:1 / span 4;width:18px;height:18px;align-self:start;margin-top:3px}
.followup-review-main{grid-column:2;font-size:1rem}
.followup-review-main b{white-space:nowrap}
.followup-review-open{grid-column:3;grid-row:1;white-space:nowrap}
.followup-review-meta,.followup-review-evidence{grid-column:2 / span 2}
.followup-review-meta,.followup-review-evidence{font-size:.9rem;color:#33463f}
.followup-review-meta small,.followup-review-evidence small{color:#5a6f69}
.followup-review-flag{display:inline-block;padding:1px 8px;border-radius:999px;background:#fbefd5;color:#7a5200;font-size:.8rem}
.followup-review-counts{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.followup-review-counts li{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:7px 10px;border:1px solid #dfe6e2;border-radius:10px}
.followup-review-actions{position:sticky;bottom:0;display:flex;gap:12px;align-items:center;padding:10px 0;background:#fff;border-top:1px solid #dfe6e2}
@media (max-width:760px){
  .followup-review-row{grid-template-columns:auto minmax(0,1fr)}
  .followup-review-open{grid-column:2;grid-row:auto}
  .followup-review-meta,.followup-review-evidence{grid-column:2}
}
