/* ==========================================================================
   extracts (المستخلصات): list, builder and the printable certificate.
   Every class is prefixed with .xc- (index.html loads all page styles on every page).
   ========================================================================== */

/* ------------------------------------------------------------------ shared bits */
.xc-title { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.xc-title .badge { font-size: var(--fs-sm); }
.xc-pbar { position: relative; height: 6px; border-radius: 4px; background: #E7EEE0; overflow: hidden; min-width: 48px; }
.xc-pbar > span { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 4px; background: var(--c-green); transition: width .2s ease; }
.xc-pbar.is-low > span { background: var(--c-gold); }
.xc-callout .row-sm { margin-top: 6px; }
.xc-callout .btn-link { font-size: var(--fs-sm); }

/* ------------------------------------------------------------------ list */
.xc-num-cell { display: flex; flex-direction: column; line-height: 1.35; }
.xc-num-cell strong { color: var(--c-forest); }
.xc-pct-cell { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 90px; }
.xc-pct-cell .num { text-align: end; }
.xc-row-actions { display: inline-flex; gap: 2px; }
.xc-cards { display: none; }
.xc-card {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; color: inherit;
  border-top: 1px solid var(--c-line-soft); text-decoration: none;
}
.xc-card:hover { text-decoration: none; background: #F7FAF2; }
.xc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.xc-card-head strong { color: var(--c-forest); font-size: var(--fs-md); }
.xc-card-period { font-size: var(--fs-sm); }
.xc-card-money { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.xc-card-money strong { font-size: var(--fs-lg); }
.xc-card-foot { display: flex; flex-direction: column; gap: 4px; }
.xc-card-meta { display: block; }

/* ------------------------------------------------------------------ builder: workflow */
.xc-flow-card .card-body { padding: 14px 20px; }
.xc-flow-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.xc-flow { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0; flex-wrap: nowrap; }
.xc-flow li { display: flex; align-items: center; gap: 10px; position: relative; padding-inline-end: 44px; }
.xc-flow li:last-child { padding-inline-end: 0; }
.xc-flow li:not(:last-child)::after {
  content: ""; position: absolute; inset-inline-end: 10px; top: 50%; width: 24px; height: 2px; background: var(--c-line); border-radius: 2px;
}
.xc-flow li.is-done:not(:last-child)::after { background: var(--c-mint); }
.xc-step-dot {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: var(--fs-sm); background: #F1F2EC; color: #8A8A84; border: 1.5px solid var(--c-line);
}
.xc-step-dot .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.xc-flow li.is-done .xc-step-dot { background: var(--c-green); border-color: var(--c-green); color: #fff; }
.xc-flow li.is-current .xc-step-dot { background: #fff; border-color: var(--c-green); color: var(--c-green); box-shadow: 0 0 0 4px rgba(118, 188, 33, .18); }
.xc-step-text { display: flex; flex-direction: column; line-height: 1.35; }
.xc-step-text strong { font-size: var(--fs-sm); }
.xc-flow li.is-todo .xc-step-text strong { color: #8A8A84; font-weight: 600; }
.xc-flow-hint { color: var(--c-muted-strong); max-width: 520px; }

/* ------------------------------------------------------------------ builder: warnings */
.xc-warnings:empty { display: none; }
.xc-warn-head { display: flex; align-items: center; gap: 6px; color: var(--c-orange-700); font-weight: 600; }
.xc-warn-head .icon { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ builder: lines */
.xc-lines-legend { display: flex; flex-direction: column; gap: 4px; padding: 0 20px 12px; }
.xc-sugg-info { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.xc-sugg-info .icon { width: 16px; height: 16px; color: var(--c-teal); }
.xc-lines-wrap { overflow-x: auto; border-top: 1px solid var(--c-line-soft); -webkit-overflow-scrolling: touch; }
.xc-lines { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.xc-lines th, .xc-lines td { padding: 8px 10px; border-bottom: 1px solid var(--c-line-soft); vertical-align: middle; text-align: start; }
.xc-lines thead th {
  position: sticky; top: 0; z-index: 2; background: #F6F7F0; color: #555; font-weight: 600; font-size: var(--fs-xs);
  white-space: nowrap; border-bottom: 1px solid var(--c-line);
}
.xc-lines .xc-c-no { width: 38px; text-align: center; color: var(--c-muted-strong); }
.xc-lines .xc-c-desc { min-width: 190px; }
.xc-lines .xc-c-n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.xc-lines thead th.xc-c-n { text-align: end; }
.xc-lines thead th.xc-c-cur { text-align: center; }
.xc-lines .xc-c-cur { width: 120px; text-align: center; }
.xc-lines .xc-c-pct { width: 110px; }
.xc-lines .xc-c-sugg { width: 170px; }
.xc-desc { font-weight: 600; line-height: 1.4; }
.xc-unit { line-height: 1.3; }
.xc-prev { color: var(--c-muted-strong); }
.xc-val { font-weight: 600; }
.xc-line.has-qty .xc-val { color: var(--c-forest); }
.xc-group td { background: var(--c-tint) !important; padding: 7px 12px; border-bottom: 1px solid #D6E8C8; }
.xc-group-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.xc-group-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--c-forest); }
.xc-group-name .icon { width: 18px; height: 18px; color: var(--c-green); }
.xc-group-sub strong { color: var(--c-forest); }
.xc-lines tbody .xc-line:hover td { background: #F8FAF3; }
.xc-line.is-over td { background: #FFF8EE; }
.xc-line.is-danger td { background: #FFF3EE; }
.xc-line.is-flash td { animation: xc-flash .9s ease-out; }
@keyframes xc-flash { from { background: #E1F2CF; } to { background: transparent; } }
.xc-lines tfoot td { background: var(--c-tint); font-weight: 700; border-top: 1px solid var(--c-mint); border-bottom: 0; padding: 10px; }
.xc-lines tfoot td:first-child { text-align: end; color: var(--c-forest); }
.xc-qty {
  width: 100%; min-width: 84px; min-height: 40px; padding: 6px 10px; text-align: center;
  font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--c-ink);
  border: 1px solid var(--c-line); border-radius: 9px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.xc-qty:hover { border-color: #C8C8C0; }
.xc-qty:focus { outline: none; border-color: var(--c-primary); box-shadow: var(--ring); }
.xc-qty.is-invalid { border-color: var(--c-orange); background: #FFF6F2; }
.xc-pct { display: flex; flex-direction: column; gap: 4px; }
.xc-pct .num { font-size: var(--fs-xs); font-weight: 600; }
.xc-line.is-over .xc-pbar > span { background: var(--c-orange); }
.xc-sugg { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.xc-sugg-val { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.xc-sugg-val strong { color: var(--c-teal); }
.xc-sugg-val > span { white-space: nowrap; }
.xc-sugg .btn { flex: none; }
.xc-applied { display: inline-flex; align-items: center; gap: 3px; color: var(--c-green-700); font-size: var(--fs-xs); font-weight: 600; }
.xc-applied .icon { width: 14px; height: 14px; stroke-width: 2.6; }

/* ------------------------------------------------------------------ builder: compliance */
.xc-comp-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.xc-comp-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--c-line-soft); border-radius: var(--radius-sm); background: #FCFCF8; }
.xc-comp-stat strong { font-size: var(--fs-md); }
.xc-comp-stat.is-accent { background: var(--c-gold-tint); border-color: #E8DCC0; }
.xc-comp-stat.is-accent strong { color: #6E5420; }
.xc-comp-wrap { overflow-x: auto; border: 1px solid var(--c-line-soft); border-radius: var(--radius-sm); }
.xc-comp { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.xc-comp th, .xc-comp td { padding: 8px 10px; border-bottom: 1px solid var(--c-line-soft); text-align: start; white-space: nowrap; }
.xc-comp th { background: #F6F7F0; color: #555; font-size: var(--fs-xs); font-weight: 600; }
.xc-comp td.num { text-align: end; font-variant-numeric: tabular-nums; }
.xc-comp tr.is-short td { background: #FFFAF3; }
.xc-comp tfoot td { background: var(--c-tint); font-weight: 700; border-bottom: 0; }
.xc-comp .xc-pct { min-width: 90px; }
.xc-comp-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.xc-comp-foot p { flex: 1 1 360px; }
.xc-comp-foot .btn { max-width: 100%; white-space: normal; text-align: center; line-height: 1.35; height: auto; min-height: 40px; }

/* ------------------------------------------------------------------ builder: money */
.xc-ded-hint { margin-top: 2px; }
.xc-ded-hint .icon { display: inline-block; vertical-align: -2px; }
.field.is-flash .input { animation: xc-flash-field 1.2s ease-out; }
@keyframes xc-flash-field { from { background: #E1F2CF; border-color: var(--c-primary); } to { background: #fff; } }
.xc-tot { display: flex; flex-direction: column; border: 1px solid var(--c-line-soft); border-radius: var(--radius-sm); overflow: hidden; }
.xc-tot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--c-line-soft); font-size: var(--fs-sm); }
.xc-tot-row:last-child { border-bottom: 0; }
.xc-tot-row .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.xc-tot-row.is-sum { background: #FAFBF6; font-weight: 700; }
.xc-tot-row.is-minus .num { color: var(--c-orange-700); }
.xc-tot-row.is-grand { background: var(--c-green); color: #fff; font-weight: 700; font-size: var(--fs-md); padding: 12px 14px; }
.xc-words { margin: 12px 0 14px; font-size: var(--fs-sm); line-height: 1.8; }

/* ------------------------------------------------------------------ builder: history */
.xc-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.xc-history li { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.xc-history li:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 15px; top: 32px; bottom: 0; width: 2px; background: var(--c-line-soft); }
.xc-h-icon { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--c-tint); color: var(--c-green); }
.xc-h-icon .icon { width: 16px; height: 16px; }
.xc-history li.is-extract_return .xc-h-icon { background: var(--c-orange-tint); color: var(--c-orange-700); }
.xc-history li.is-extract_approve .xc-h-icon { background: var(--c-green); color: #fff; }
.xc-history li.is-extract_submit .xc-h-icon { background: var(--c-teal-tint); color: var(--c-teal); }
.xc-h-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; padding-top: 4px; }
.xc-h-title { font-size: var(--fs-sm); }

/* ------------------------------------------------------------------ builder: sticky save bar */
.xc-savebar {
  position: sticky; bottom: 14px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  padding: 10px 14px 10px 10px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .97); border: 1px solid var(--c-line); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.xc-savebar.is-dirty { border-color: var(--c-mint); }
.xc-save-info { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; font-size: var(--fs-sm); }
.xc-save-actions { display: flex; align-items: center; gap: 8px; }
.xc-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--c-muted-strong); }
.xc-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-green); }
.xc-dot.is-dirty { color: var(--c-orange-700); font-weight: 600; }
.xc-dot.is-dirty::before { background: var(--c-orange); }
.xc-issues { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; }

/* keep toasts above the sticky save bar so they never hide the live net due */
body:not(.has-overlay):has(.xc-savebar) .toast-stack { bottom: 92px; }
@media (max-width: 900px) {
  body:not(.has-overlay):has(.xc-savebar) .toast-stack { bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 84px); }
}
@media (max-width: 600px) {
  body:not(.has-overlay):has(.xc-savebar) .toast-stack { bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 132px); }
}

/* ------------------------------------------------------------------ responsive (screen) */
@media (max-width: 1100px) {
  .xc-lines .xc-c-sugg { width: 150px; }
  .xc-comp-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .xc-savebar { bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 8px); }
}
@media (max-width: 760px) {
  .xc-table { display: none; }
  .xc-cards { display: block; }

  /* lines become cards */
  .xc-lines-legend { padding: 0 14px 10px; }
  .xc-lines-wrap { overflow: visible; }
  .xc-lines, .xc-lines tbody, .xc-lines tfoot { display: block; }
  .xc-lines thead { display: none; }
  .xc-lines tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding: 12px 14px; border-bottom: 1px solid var(--c-line-soft); }
  .xc-lines td { display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; text-align: start !important; width: auto !important; min-width: 0; }
  .xc-lines td::before { content: attr(data-label); font-size: 11px; color: var(--c-muted-strong); font-weight: 500; }
  .xc-lines .xc-c-no { display: none; }
  .xc-lines .xc-c-desc { grid-column: 1 / -1; }
  .xc-lines .xc-c-desc::before { content: none; }
  .xc-lines .xc-c-desc .xc-desc::before { content: attr(data-no); }
  .xc-lines .xc-c-cur { grid-column: span 1; }
  .xc-lines .xc-c-sugg { grid-column: 1 / -1; }
  .xc-lines .xc-c-pct { grid-column: span 1; }
  .xc-lines tr.xc-group { display: block; padding: 0; }
  .xc-lines tr.xc-group td { display: block; padding: 9px 14px; }
  .xc-lines tr.xc-group td::before { content: none; }
  .xc-lines tfoot tr { display: flex; justify-content: space-between; align-items: center; background: var(--c-tint); }
  .xc-lines tfoot td { background: transparent; padding: 0; border: 0; position: static; }
  .xc-lines tfoot td::before { content: none; }
  .xc-lines tfoot td:empty { display: none; }
  .xc-qty { min-height: 44px; font-size: 16px; }

  /* compliance table becomes cards */
  .xc-comp-wrap { border: 0; overflow: visible; }
  .xc-comp, .xc-comp tbody, .xc-comp tfoot { display: block; }
  .xc-comp thead { display: none; }
  .xc-comp tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 12px; border: 1px solid var(--c-line-soft); border-radius: var(--radius-sm); margin-bottom: 8px; }
  .xc-comp td { display: flex; justify-content: space-between; gap: 8px; padding: 0; border: 0; white-space: normal; }
  .xc-comp td::before { content: attr(data-label); font-size: 11px; color: var(--c-muted-strong); }
  .xc-comp td:first-child { grid-column: 1 / -1; flex-direction: column; }
  .xc-comp td:first-child::before { content: none; }
  .xc-comp tfoot tr { display: none; }
  .xc-comp tr.is-short { background: #FFFAF3; border-color: #F1E3CC; }
  .xc-comp tr.is-short td { background: transparent; }
  .xc-comp-foot .btn { width: 100%; }
}
@media (max-width: 600px) {
  .xc-flow-card .card-body { padding: 12px 14px; }
  .xc-flow { flex-direction: column; align-items: stretch; gap: 10px; }
  .xc-flow li { padding-inline-end: 0; }
  .xc-flow li:not(:last-child)::after { inset-inline-end: auto; inset-inline-start: 14px; top: 34px; width: 2px; height: 10px; }
  .xc-lines tr { gap: 6px 8px; padding: 10px 12px; }
  .xc-lines .xc-c-pct { grid-column: span 1; }
  .xc-lines .xc-c-sugg { grid-column: span 2; }
  .xc-lines .xc-sugg { gap: 6px; }
  .xc-lines .xc-sugg .btn { padding-inline: 10px; }
  .xc-lines td::before { font-size: 10.5px; }
  .xc-qty { min-height: 42px; }
  /* money KPIs: smaller value so «ر.س» is never clipped in the 2-column grid */
  .xc-list .kpi-value, .xc-kpis .kpi-value { font-size: 17px; flex-wrap: wrap; row-gap: 0; }
  .xc-list .kpi, .xc-kpis .kpi { min-width: 0; }
  .xc-comp-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xc-savebar { padding: 8px 10px; border-radius: 12px; }
  .xc-save-info { width: 100%; justify-content: space-between; }
  .xc-save-actions { width: 100%; }
  .xc-save-actions .btn { flex: 1 1 auto; }
  .xc-tot-row { padding: 8px 12px; }
}

/* ==========================================================================
   Certificate (print view): .sheet-a4.xc-sheet, two A4 portrait pages
   ========================================================================== */
.xc-sheet { display: flex; flex-direction: column; font-size: 10px; line-height: 1.45; color: #222; }
.xc-cert-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 2px solid #119853; }
.xc-cert-org { display: flex; flex-direction: column; gap: 1px; font-size: 10px; color: #444; line-height: 1.5; }
.xc-cert-org strong { font-size: 11.5px; color: #2C5F2D; }
.xc-cert-cont { margin-top: 2px; font-weight: 700; color: #119853; }
.xc-cert-logo { width: 150px; height: auto; flex: none; }
.xc-cert-head.is-compact .xc-cert-logo { width: 120px; }
.xc-cert-titlebar { position: relative; display: flex; align-items: center; justify-content: center; background: #119853; border-radius: 3px; padding: 4px 10px; }
.xc-cert-title { margin: 0; font-size: 16px; font-weight: 700; color: #fff; letter-spacing: 0; }
.xc-cert-titlebar .xc-stamp { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); background: #fff; }
.xc-cert-sub { text-align: center; margin: 3px 0 6px; font-size: 10.5px; font-weight: 600; color: #444; }
.xc-stamp { display: inline-block; border: 1.5px solid #F15922; color: #C9441A; border-radius: 3px; padding: 1px 8px; font-size: 9.5px; font-weight: 700; }
.xc-sheet > .xc-stamp { align-self: flex-start; margin-bottom: 6px; }

.xc-info { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10px; margin-bottom: 8px; }
.xc-info th, .xc-info td { border: 1px solid #8C8C8C; padding: 2.8px 6px; text-align: start; vertical-align: middle; line-height: 1.35; }
.xc-info th { background: #E6F0DC; color: #1E3F1F; font-weight: 700; }
.xc-info td.num { font-variant-numeric: tabular-nums; }
.xc-info th.xc-band { background: #2C5F2D; color: #fff; text-align: center; font-size: 10.5px; padding: 3px 6px; }
.xc-info tr.xc-strong th, .xc-info tr.xc-strong td { background: #DDEBD0; font-weight: 700; }
.xc-ticks { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: center; }
.xc-tick { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: #555; }
.xc-tick.is-on { color: #111; font-weight: 700; }
.xc-box { position: relative; width: 9px; height: 9px; border: 1px solid #555; border-radius: 1px; flex: none; background: #fff; }
.xc-tick.is-on .xc-box { border-color: #119853; background: #119853; }
.xc-tick.is-on .xc-box::after {
  content: ""; position: absolute; left: 2.6px; top: 0.4px; width: 2.6px; height: 5.2px;
  border: solid #fff; border-width: 0 1.4px 1.4px 0; transform: rotate(45deg);
}
.xc-tick-note { color: #777; font-size: 8.5px; }

.xc-bq { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 9.2px; }
.xc-bq th, .xc-bq td { border: 1px solid #8C8C8C; padding: 2.3px 3px; text-align: center; vertical-align: middle; line-height: 1.3; }
.xc-bq th { background: #E6F0DC; color: #1E3F1F; font-weight: 700; font-size: 8.6px; line-height: 1.25; padding: 2px 2px; }
.xc-bq td.t-start { text-align: start; }
.xc-bq td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.xc-bq tbody tr:nth-child(even) td { background: #FAFBF7; }

.xc-foot {
  margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 8.5px; color: #666; border-top: 1px solid #CFCFCF;
}
.xc-sheet > .xc-foot { margin-top: auto; }
.xc-initials { display: inline-flex; align-items: flex-end; gap: 6px; }
.xc-initials-line { display: inline-block; width: 90px; border-bottom: 1px dotted #777; height: 10px; }
.xc-page-no { font-weight: 700; color: #444; }

.xc-sec-title { margin: 10px 0 4px; padding: 3px 8px; background: #EAF3E4; border-inline-start: 3px solid #119853; font-weight: 700; font-size: 10.5px; color: #2C5F2D; }
.xc-totals { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.xc-totals th, .xc-totals td { border: 1px solid #8C8C8C; padding: 4px 8px; }
.xc-totals th { text-align: start; font-weight: 600; background: #fff; }
.xc-totals td { width: 30%; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xc-totals tr.is-sum th, .xc-totals tr.is-sum td { background: #F1F6EA; font-weight: 700; }
.xc-totals tr.is-grand th, .xc-totals tr.is-grand td { background: #DDEBD0; font-weight: 700; font-size: 12px; }
.xc-cert-sentence { margin-top: 10px; border: 1px solid #8C8C8C; padding: 8px 10px; font-size: 10.5px; line-height: 1.9; }
.xc-cert-sentence p { margin: 0; }
.xc-cert-sentence .xc-words { margin-top: 4px; }
.xc-sign { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10px; }
.xc-sign th, .xc-sign td { border: 1px solid #8C8C8C; padding: 3px 6px; text-align: start; vertical-align: middle; }
.xc-sign th { background: #E6F0DC; font-weight: 700; color: #1E3F1F; }
.xc-sign td { height: 11mm; }
.xc-sign td.fw { font-weight: 700; }
.xc-no-consultant { border: 1px solid #8C8C8C; padding: 5px 8px; color: #555; font-size: 10px; }
.xc-endorse-note { margin-top: 14px; text-align: center; font-weight: 700; font-size: 11px; color: #2C5F2D; }

@media print {
  .sheet-a4.xc-sheet { min-height: 270mm; display: flex; flex-direction: column; }
  .xc-sheet .xc-foot { position: static; }
}

/* Daily log hidden (feature switch): drop the daily-log suggestions and compliance panel */
.xc-no-daily .xc-c-sugg, .xc-no-daily .xc-compliance-card, .xc-no-daily .xc-sugg-info { display: none !important; }

/* Signed copy (history imported from the signed PDF) */
.xc-signed .card-actions { flex-wrap: wrap; }
.xc-signed-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.xc-signed-figs > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--c-teal-tint); }
.xc-signed-figs strong { font-size: var(--fs-lg); color: var(--c-teal); }
.xc-signed-issues { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; }
