/* ===== «استرجاع» sheet (contract-refund.js) — on top of tickets.css (.tt-*) ===== */
.cr-modal { width: min(1040px, 97vw) !important; }
.cr { display: flex; flex-direction: column; gap: 14px; font-size: .95rem; color: var(--ink); }
.cr .ltr { direction: ltr; unicode-bidi: isolate; }
.cr small { color: var(--muted); font-size: .76rem; }
.cr-sum { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; font-size: .86rem; color: var(--muted); }
.cr-sum b { color: var(--ink); margin-inline-start: 4px; }
.cr-warn { padding: 10px 14px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: .86rem; }
.cr-step { display: flex; flex-direction: column; gap: 10px; }
.cr-step h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; }
.cr-step h4 > span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1e3a8a; color: #fff; font-size: .8rem; }
.cr-sub { margin: -4px 0 0; color: var(--muted); font-size: .8rem; }
.cr-empty { margin: 0; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; font-size: .86rem; }
.cr-ic { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: #eef2ff; color: #3730a3; }
.cr-ic.t-flight { background: #e0f2fe; color: #0369a1; }
.cr-ic.t-hotel { background: #fef3c7; color: #92400e; }
/* purchase order groups and their tickets / services */
.cr-po { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.cr-po > header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.cr-po > header > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cr-all { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: #1e3a8a; cursor: pointer; white-space: nowrap; }
.cr-tbl { --cr-cols: 34px minmax(170px, 1.5fr) minmax(110px, 1fr) minmax(120px, 1.1fr) 104px 96px minmax(96px, auto); }
.cr-tbl.has-cost { --cr-cols: 34px minmax(170px, 1.5fr) minmax(110px, 1fr) minmax(120px, 1.1fr) 104px 90px 90px minmax(96px, auto); }
.cr-row { display: grid; grid-template-columns: var(--cr-cols); gap: 8px; align-items: center; padding: 9px 14px; border-top: 1px solid #f1f5f9; cursor: pointer; transition: background .15s; }
.cr-row:first-child { border-top: 0; }
.cr-row:hover { background: #f8fbff; }
.cr-row.on { background: #eff6ff; box-shadow: inset 3px 0 0 #2563eb; }
.cr-row.locked { cursor: default; background: #fafafa; }
.cr-row.locked .cr-main, .cr-row.locked .cr-c { opacity: .6; }
.cr-row.cr-th { cursor: default; padding-block: 7px; background: #fff; color: var(--muted); font-size: .74rem; font-weight: 700; }
.cr-row.cr-th:hover { background: #fff; }
.cr-ck input, .cr-all input { width: 17px; height: 17px; accent-color: #2563eb; cursor: pointer; }
.cr-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cr-main > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.cr-main b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-tkt { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.cr-c { font-size: .84rem; min-width: 0; overflow-wrap: anywhere; }
.cr-num { text-align: end; font-variant-numeric: tabular-nums; }
.cr-hint { display: inline-block; margin-inline-start: 4px; padding: 0 5px; border-radius: 5px; background: #f1f5f9; color: var(--muted); font-size: .68rem; font-style: normal; }
.cr-st { text-align: end; }
.cr-chip { display: inline-block; padding: .12rem .5rem; border-radius: 6px; font-size: .72rem; font-weight: 700; white-space: nowrap; background: #e2e8f0; color: #475569; }
.cr-chip.is-open { background: #fef3c7; color: #92400e; }
.cr-chip.is-done { background: #dcfce7; color: #166534; }
/* amounts of the picked lines */
.cr-amts { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cr-arow { display: grid; grid-template-columns: minmax(170px, 1.6fr) 100px repeat(3, minmax(110px, 1fr)); gap: 10px; align-items: center; padding: 9px 14px; border-top: 1px solid #f1f5f9; }
.cr-arow:first-child { border-top: 0; }
.cr-arow > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.cr-arow.cr-th { background: #f8fafc; color: var(--muted); font-size: .74rem; font-weight: 700; }
.cr-arow input { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; direction: ltr; text-align: end; font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s; }
.cr-arow input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }
.cr-arow.cr-tot { background: #f8fafc; font-weight: 800; border-top: 2px solid var(--line); }
.cr-arow.cr-tot > span:not(:first-child), .cr-arow .cr-num { text-align: end; font-variant-numeric: tabular-nums; }
/* reason and method */
.cr-reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-rsn { font: inherit; font-size: .84rem; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.cr-rsn:hover, .cr-rsn:focus-visible { border-color: #2563eb; outline: none; }
.cr-rsn.on { background: #1e3a8a; border-color: #1e3a8a; color: #fff; }
.cr textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }
.cr-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.cr-way { display: flex; align-items: flex-start; gap: 10px; text-align: start; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cr-way span { display: flex; flex-direction: column; gap: 2px; }
.cr-way:hover:not(:disabled), .cr-way:focus-visible { border-color: #2563eb; outline: none; }
.cr-way.on { border-color: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }
.cr-way:disabled { opacity: .55; cursor: not-allowed; }
.cr-way input { margin-top: 3px; accent-color: #2563eb; }
/* previous refunds on the contract */
.cr-hist { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.cr-hist summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; font-weight: 700; font-size: .88rem; }
.cr-hist ul { list-style: none; margin: 0; padding: 0 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.cr-hist li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #f8fafc; font-size: .84rem; }
.cr-hist li small { grid-column: 1 / -1; }
.cr-h-what { min-width: 0; overflow-wrap: anywhere; }
/* footer */
.cr-err:empty { display: none; }
.cr-err { padding: 9px 12px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: .86rem; }
.cr-foot { position: sticky; bottom: -18px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 0 -22px -18px; padding: 12px 22px; background: #fff; border-top: 1px solid var(--line); }
.cr-foot-sum { display: flex; gap: 18px; font-size: .88rem; color: var(--muted); }
.cr-foot-sum b { color: var(--ink); margin-inline-start: 4px; }
/* phones: rows become cards, each cell labelled */
@media (max-width: 760px) {
  .cr-row.cr-th, .cr-arow.cr-th { display: none; }
  .cr-row { grid-template-columns: 30px 1fr 1fr; padding: 10px 12px; }
  .cr-row .cr-main, .cr-row .cr-st { grid-column: 2 / -1; text-align: start; }
  .cr-row .cr-ck { grid-row: 1 / span 2; align-self: start; padding-top: 6px; }
  .cr-c { grid-column: auto; }
  .cr-c::before, .cr-arow [data-l]::before { content: attr(data-l); display: block; color: var(--muted); font-size: .7rem; }
  .cr-num { text-align: start; }
  .cr-arow { grid-template-columns: 1fr 1fr; }
  .cr-arow > span:first-child { grid-column: 1 / -1; }
  .cr-arow.cr-tot > span:not(:first-child) { text-align: start; }
  .cr-hist li { grid-template-columns: 1fr auto; }
  .cr-foot { margin-inline: -14px; padding-inline: 14px; }
}
