/* Delivery (M6): /fulfillment (405:4383), /fulfillment/{id} (406:4802), /licenses (408:5173, 408:55072, 408:55809),
   contract page card «نیروگاه و وضعیت نصب» (399:1259). List pages reuse the .opp list styles (filterbar, dtable, tabs). */

/* ---- shared list bits */
.dl .dl-num { direction: ltr; text-align: right; unicode-bidi: isolate; font: 500 14px/22px var(--font-family); color: var(--color-text-primary); }
.dl .dl-num a { color: inherit; }
.dl .dl-none { color: var(--color-text-secondary); font: var(--text-small); }
.dl .dl-late { color: var(--color-text-primary); }
.dl .segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius-md); background: var(--color-gray-100); }
.dl .segmented__item { height: 32px; padding: 0 14px; display: inline-flex; align-items: center; border: 0; border-radius: 6px; background: none; color: var(--color-text-secondary); font: var(--text-body); cursor: pointer; white-space: nowrap; }
.dl .segmented__item.is-active { background: var(--color-surface-card); color: var(--color-text-primary); font: var(--text-body-strong); box-shadow: 0 1px 1px rgba(15, 23, 42, .06); }
.dl .dl-tabs { justify-content: center; margin-block-end: 20px; }
.dl .dl-tabs .opp-tab { padding: 0 16px; }
.dl .dl-table td { height: 48px; }
.dl .dtable.is-compact .dl-table td { height: 40px; }
.dl .dtable.is-compact .cell-stack .sub { display: none; }
.dl .pager { display: flex; align-items: center; justify-content: space-between; color: var(--color-text-secondary); font: var(--text-small); border-top: 1px solid var(--color-border); }

/* ---- KPI cards (licenses) */
.dl-lic .dl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.dl-lic .dl-kpi { padding: 20px; display: flex; flex-direction: column; gap: 14px; min-height: 172px; border-radius: 12px; }
.dl-lic .dl-kpi__top { display: flex; align-items: flex-start; justify-content: space-between; }
.dl-lic .dl-kpi__label { font: var(--text-small); color: var(--color-text-secondary); margin-top: 6px; }
.dl-lic .dl-kpi__icon { width: 36px; height: 36px; border-radius: 8px; background: var(--color-gray-100); display: grid; place-items: center; color: var(--color-gray-700); }
.dl-lic .dl-kpi__icon .icon { width: 20px; height: 20px; }
.dl-lic .dl-kpi__value { display: flex; align-items: baseline; gap: 8px; }
.dl-lic .dl-kpi__value b { font: 700 28px/36px var(--font-family); color: var(--color-text-primary); }
.dl-lic .dl-kpi__value span { font: var(--text-small); color: var(--color-text-secondary); }
.dl-lic .dl-kpi__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; font: 400 11px/16px var(--font-family); color: var(--color-text-secondary); margin-top: auto; }
.dl-lic .dl-kpi__foot > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dl-lic .dl-kpi__foot .spark { flex: none; width: 88px; height: 30px; }
.dl-lic .page-header { align-items: flex-start; }
.dl-lic .page-header__actions { margin-top: 4px; }

/* ---- renewals view */
.dl-lic .dl-hint { margin-bottom: 20px; }
.dl-lic .dl-group { margin-bottom: 20px; overflow: hidden; }
.dl-lic .dl-group__head { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-bottom: 1px solid var(--color-border); background: var(--color-gray-50); }
.dl-lic .dl-group__head h2 { margin: 0; font: var(--text-body-strong); font-size: 15px; color: var(--color-text-primary); }
.dl-lic .dl-group__count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-full); display: inline-grid; place-items: center; font: var(--text-caption); color: var(--color-text-secondary); background: var(--color-gray-100); }
.dl-lic .dl-group__count.is-red { background: var(--tone-red-bg); color: var(--color-danger); }
.dl-lic .dl-group__empty { margin: 0; padding: 16px; font: var(--text-small); color: var(--color-text-muted); }
.dl-lic .dl-renew { display: flex; align-items: center; gap: 16px; padding: 16px; }
.dl-lic .dl-renew + .dl-renew { border-top: 1px solid var(--color-border); }
.dl-lic .dl-renew__icon { flex: none; width: 40px; height: 40px; border-radius: 8px; background: var(--color-gray-100); display: grid; place-items: center; color: var(--color-gray-700); }
.dl-lic .dl-renew__icon .icon { width: 20px; height: 20px; }
.dl-lic .dl-renew__body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.dl-lic .dl-renew__title { font: var(--text-body-strong); color: var(--color-text-primary); }
.dl-lic .dl-renew__meta { font: var(--text-small); color: var(--color-text-secondary); }
.dl-lic .dl-commission { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-full); background: var(--color-brand-amber-50); color: var(--color-gray-800); font: var(--text-caption); margin-top: 2px; }
.dl-lic .dl-commission .icon { width: 14px; height: 14px; color: var(--color-brand-amber); }
.dl-lic .dl-renew__actions { display: flex; align-items: center; gap: 12px; flex: none; }
.dl-lic .dl-renew__actions form { margin: 0; }
.dl-lic .dl-ready { margin-top: 20px; padding: 16px 20px; }
.dl-lic .dl-ready__act { margin-top: 10px; }

/* ---- detail page /fulfillment/{id} */
.dl-page .breadcrumb { margin-bottom: 16px; }
.dl-page .dl-hero { display: flex; align-items: flex-start; gap: 16px; padding: 24px; margin-bottom: 16px; }
.dl-page .dl-hero__icon { flex: none; width: 56px; height: 56px; border-radius: var(--radius-lg); background: var(--color-brand-navy-50); color: var(--color-text-brand); display: grid; place-items: center; }
.dl-page .dl-hero__icon .icon { width: 28px; height: 28px; }
.dl-page .dl-hero__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.dl-page .dl-hero__titlerow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dl-page .dl-hero__title { margin: 0; font: 700 20px/32px var(--font-family); color: var(--color-text-primary); }
.dl-page .dl-hero__meta { display: flex; gap: 16px; flex-wrap: wrap; font: var(--text-small); color: var(--color-text-secondary); }
.dl-page .dl-hero__meta a { color: inherit; }
.dl-page .dl-hero__actions { display: flex; align-items: center; gap: 8px; flex: none; padding-top: 10px; }
.dl-page .dl-hero__actions form { margin: 0; }
.dl-page .btn-square { width: 40px; padding: 0; justify-content: center; }
.dl-page .ltr { direction: ltr; unicode-bidi: isolate; }
.dl-page .muted { color: var(--color-text-muted); }
.dl-page .small { font: var(--text-small); }
.dl-page .hint { font: var(--text-small); color: var(--color-text-secondary); margin-bottom: 12px; }

.dl-page .dl-stepper-card { padding: 16px 20px 18px; margin-bottom: 16px; }
.dl-page .dl-stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); }
.dl-page .dl-step { position: relative; }
.dl-page .dl-step::before { content: ""; position: absolute; top: 13px; inset-inline-start: 0; width: 100%; height: 2px; background: var(--color-gray-200); }
.dl-page .dl-step.is-done::before, .dl-page .dl-step.is-current::before { background: var(--color-brand-navy); }
.dl-page .dl-step.is-current::before { width: 50%; }
.dl-page .dl-step__link { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--color-text-secondary); }
.dl-page .dl-step__link:hover { text-decoration: none; }
.dl-page .dl-step__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--color-surface-card); border: 1.5px solid var(--color-gray-300); font: var(--text-caption); color: var(--color-text-secondary); position: relative; z-index: 1; box-shadow: 0 0 0 6px var(--color-surface-card); }
.dl-page .dl-step__dot .icon { width: 14px; height: 14px; color: #fff; }
.dl-page .dl-step.is-done .dl-step__dot, .dl-page .dl-step.is-current .dl-step__dot { background: var(--color-brand-navy); border-color: var(--color-brand-navy); color: #fff; }
.dl-page .dl-step__label { font: var(--text-small); color: var(--color-text-secondary); text-align: center; }
.dl-page .dl-step.is-done .dl-step__label { color: var(--color-text-primary); }
.dl-page .dl-step.is-current .dl-step__label { font: var(--text-body-strong); color: var(--color-text-primary); }
.dl-page .dl-step.is-viewed:not(.is-current) .dl-step__label { color: var(--color-text-brand); text-decoration: underline; text-underline-offset: 4px; }
.dl-page .dl-step__date { font: var(--text-caption); color: var(--color-text-secondary); margin-top: -4px; }

.dl-page .dl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.dl-page .dl-grid__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dl-page .dl-grid__side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.dl-page .dl-card { padding: 20px; }
.dl-page .dl-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dl-page .dl-card__title { margin: 0; font: var(--text-h3); font-size: 16px; color: var(--color-text-primary); }
.dl-page .dl-link { font: var(--text-body-strong); color: var(--color-text-primary); padding: 0 12px; }
.dl-page .dl-empty { margin: 0; font: var(--text-small); color: var(--color-text-muted); }

.dl-page .dl-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.dl-page .dl-check__item { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dl-page .dl-check__form { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.dl-page .dl-check__box { flex: none; width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid var(--color-gray-400); background: var(--color-surface-card); display: grid; place-items: center; padding: 0; cursor: pointer; }
.dl-page .dl-check__box .icon { width: 14px; height: 14px; color: #fff; }
.dl-page .dl-check__item.is-done .dl-check__box { background: var(--color-brand-navy); border-color: var(--color-brand-navy); }
.dl-page .dl-check__title { font: var(--text-body); color: var(--color-text-primary); }
.dl-page .dl-check__meta { font: var(--text-caption); color: var(--color-text-muted); white-space: nowrap; }

.dl-page .dl-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dl-page .dl-photo { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.dl-page .dl-photo__img { display: block; aspect-ratio: 160 / 112; border-radius: 8px; background: var(--color-gray-100); overflow: hidden; }
.dl-page .dl-photo__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-page .dl-photo figcaption { display: flex; flex-direction: column; gap: 2px; }
.dl-page .dl-photo__cap { font: var(--text-small); color: var(--color-text-primary); }
.dl-page .dl-photo__meta { font: var(--text-caption); color: var(--color-text-muted); }

.dl-page .dl-events { list-style: none; margin: 0; padding: 0; }
.dl-page .dl-event { position: relative; display: flex; gap: 12px; padding-bottom: 22px; }
.dl-page .dl-event:last-child { padding-bottom: 4px; }
.dl-page .dl-event:not(:last-child)::after { content: ""; position: absolute; top: 40px; bottom: 6px; inset-inline-start: 15px; width: 2px; background: var(--color-gray-200); }
.dl-page .dl-event__icon { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--color-gray-100); display: grid; place-items: center; color: var(--color-text-brand); }
.dl-page .dl-event__icon .icon { width: 16px; height: 16px; }
.dl-page .dl-event__body { padding-top: 4px; display: flex; flex-direction: column; gap: 8px; }
.dl-page .dl-event__text { font: var(--text-small); color: var(--color-text-secondary); }
.dl-page .dl-event__text b { color: var(--color-text-primary); font-weight: 600; }
.dl-page .dl-event__time { font: var(--text-caption); color: var(--color-text-muted); }

.dl-page .dl-side { padding: 20px; }
.dl-page .dl-side__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dl-page .dl-side__title { margin: 0; font: var(--text-h3); font-size: 16px; }
.dl-page .dl-side__title a { color: inherit; }
.dl-page .dl-kv { margin: 0; display: flex; flex-direction: column; gap: 18px; }
.dl-page .dl-kv > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dl-page .dl-kv dt { font: var(--text-small); color: var(--color-text-secondary); }
.dl-page .dl-kv dd { margin: 0; font: var(--text-body-strong); color: var(--color-text-primary); text-align: left; }
.dl-page .dl-kv dd a { color: inherit; }

.dl-page .dl-radios { display: flex; flex-direction: column; gap: 6px; }
.dl-page .dl-radio { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; font: var(--text-body); }
.dl-page .dl-radio.is-current { background: var(--color-gray-50); cursor: default; }
.dl-page .dl-radio__n { width: 22px; height: 22px; border-radius: 50%; background: var(--color-gray-100); display: grid; place-items: center; font: var(--text-caption); }
.dl-page .dl-radio .muted:last-child { margin-inline-start: auto; }

/* ---- contract page card (399:1259) */
.dl-cc { padding: 20px; }
.dl-cc__title { margin: 0 0 16px; font: var(--text-h3); font-size: 16px; color: var(--color-text-primary); }
.dl-cc__empty { margin: 0; font: var(--text-small); color: var(--color-text-muted); }
.dl-cc__row { display: flex; align-items: center; gap: 16px; padding: 4px 0 8px; }
.dl-cc__row + .dl-cc__row { border-top: 1px solid var(--color-border); padding-top: 12px; }
.dl-cc__plant { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dl-cc__name { font: var(--text-body-strong); color: var(--color-text-primary); }
.dl-cc__meta { font: var(--text-small); color: var(--color-text-secondary); }
.dl-cc__progress { flex: none; width: 160px; display: flex; flex-direction: column; gap: 6px; }
.dl-cc__ptext { display: flex; justify-content: space-between; font: var(--text-small); color: var(--color-text-secondary); }
.dl-cc__ptext b { color: var(--color-text-primary); font-weight: 600; }
.dl-cc__bar { height: 4px; border-radius: 2px; background: var(--color-gray-200); overflow: hidden; }
.dl-cc__bar span { display: block; height: 100%; background: var(--color-brand-navy); }
.dl-cc__link, .dl-cc__more { flex: none; display: inline-flex; align-items: center; gap: 4px; font: var(--text-body-strong); color: var(--color-text-primary); }
.dl-cc__link .icon, .dl-cc__more .icon { width: 16px; height: 16px; }
.dl-cc__ent { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 10px; }
.dl-cc__ent li { display: flex; align-items: center; gap: 10px; font: var(--text-small); color: var(--color-text-secondary); }
.dl-cc__ent b { color: var(--color-text-primary); font-weight: 600; }
.dl-cc__ico { width: 28px; height: 28px; border-radius: 6px; background: var(--color-gray-100); display: grid; place-items: center; color: var(--color-gray-700); flex: none; }
.dl-cc__ico .icon { width: 16px; height: 16px; }
.dl-cc__etext { flex: 1; min-width: 0; }
.dl-cc__etext .ltr { direction: ltr; unicode-bidi: isolate; }
.dl-cc__more { margin-top: 12px; }
