/* ===== «عرض للعميل (PDF)» ===== list cards · editor (form beside the live A4 preview) */
.osh, .osh-ed { --osh-navy: #14202f; --osh-gold: #b8892b; --osh-gold-l: #f6eedc; --osh-sand: #faf6ee; }
.osh { display: flex; flex-direction: column; gap: 14px; }
.osh .ico, .osh-ed .ico { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.osh-intro { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px;
  color: #fff; background: radial-gradient(90% 120% at 0% 0%, rgba(184,137,43,.4), transparent 60%), linear-gradient(150deg, var(--osh-navy), #22344a); }
.osh-intro b { display: block; font-size: 1.05rem; }
.osh-intro span { color: rgba(255,255,255,.78); font-size: .88rem; }
.osh-search { display: flex; align-items: center; gap: 8px; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--muted); transition: border-color .15s, box-shadow .15s; }
.osh-search:focus-within { border-color: var(--osh-gold); box-shadow: 0 0 0 3px rgba(184,137,43,.15); }
.osh-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: .62rem 0; font: inherit; background: transparent; color: var(--ink); }
.osh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.osh-card { display: flex; flex-direction: column; gap: 6px; text-align: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff;
  font: inherit; color: var(--ink); cursor: pointer; border-top: 3px solid var(--osh-gold); transition: transform .18s, box-shadow .18s; }
.osh-card:hover, .osh-card:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20,32,47,.12); outline: 0; }
.osh-card__ref { color: var(--osh-gold); font-size: .75rem; font-weight: 800; align-self: flex-start; }
.osh-card b { font-size: 1rem; line-height: 1.5; }
.osh-card__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: .84rem; }
.osh-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); font-size: .84rem; color: var(--muted); }
.osh-card__foot strong { color: var(--osh-navy); font-size: .95rem; }
.osh-card small { color: var(--muted); font-size: .76rem; }
.osh-empty { display: grid; place-items: center; gap: 6px; padding: 48px 16px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; }
.osh-empty .ico { width: 34px; height: 34px; color: var(--osh-gold); }
.osh-empty b { color: var(--ink); }

.osh-ed__bar { position: sticky; top: var(--osh-top, 0px); z-index: 3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0 10px; background: var(--bg, #f5f6f8); }
.osh-ed__ref { color: var(--osh-gold); font-weight: 800; font-size: .85rem; }
.osh-ed__acts { display: flex; gap: 6px; margin-inline-start: auto; flex-wrap: wrap; }
.osh-share { display: none; }
.osh-tabs { display: none; background: #eef1f5; border-radius: 10px; padding: 3px; }
.osh-tabs button { border: 0; background: transparent; padding: .38rem .8rem; border-radius: 8px; font: inherit; font-size: .84rem; font-weight: 800; color: var(--muted); cursor: pointer; }
.osh-tabs button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.osh-ed__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.osh-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.osh-box { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.osh-box h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .98rem; }
.osh-box h3 .ico { color: var(--osh-gold); }
.osh-ai { background: var(--osh-sand); border-color: #eadcbc; }
.osh-ai p { margin: -4px 0 8px; color: var(--muted); font-size: .85rem; }
.osh-ai textarea { width: 100%; margin-bottom: 8px; }
.osh-ai__file { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; cursor: pointer; }
.osh-ai__file .btn { pointer-events: none; background: var(--osh-gold); color: #fff; min-height: 42px; padding-inline: 18px;
  box-shadow: 0 2px 8px rgba(184,137,43,.3); transition: background .18s, box-shadow .18s; }
.osh-ai__file .btn svg { stroke: currentColor; }
.osh-ai__file:hover .btn { background: #a0761f; box-shadow: 0 4px 12px rgba(184,137,43,.4); }
.osh-ai__file:has(.btn[disabled]), .osh-ai__file.is-busy { pointer-events: none; opacity: .8; }
.osh-ai__name { color: var(--muted); font-size: .8rem; }
.osh-terms > p { margin: -4px 0 8px; color: var(--muted); font-size: .85rem; }
.osh-terms__acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.osh-check { display: flex; align-items: center; gap: 8px; font-size: .88rem; cursor: pointer; }
.osh-form .osh-check input { width: 18px; height: 18px; flex: none; accent-color: var(--osh-gold); }
.osh-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.osh-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.osh-f > span { font-size: .78rem; font-weight: 700; color: var(--muted); }
.osh-f.w { grid-column: 1 / -1; }
.osh-form input, .osh-form select, .osh-form textarea { width: 100%; min-width: 0; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.osh-form textarea { resize: vertical; line-height: 1.7; }
.osh-form input:focus, .osh-form select:focus, .osh-form textarea:focus { outline: 0; border-color: var(--osh-gold); box-shadow: 0 0 0 3px rgba(184,137,43,.15); }
.osh-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.osh-rows:empty { display: none; }
.osh-row { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px; padding-inline-end: 44px; border-radius: 12px; background: var(--osh-sand); border: 1px solid #efe6d2; }
.osh-row .osh-f.w { grid-column: 1 / -1; }
.osh-row .osh-f.w2 { grid-column: span 2; }
.osh-row__n { grid-column: 1 / -1; color: var(--osh-gold); font-weight: 800; font-size: .8rem; }
.osh-row__del { position: absolute; top: 8px; inset-inline-end: 6px; color: var(--muted); }
.osh-row__del:hover { color: #b42318; }
.osh-pv { position: sticky; top: calc(var(--osh-top, 0px) + 56px); min-width: 0; max-height: calc(100vh - var(--osh-top, 0px) - 70px); overflow: auto; border-radius: 14px; background: #e9e4da; border: 1px solid var(--line); }
.osh-pv__in { position: relative; overflow: hidden; }
.osh-pv iframe { display: block; border: 0; transform-origin: top right; background: #fff; }
@media (max-width: 1100px) {
  .osh-ed__body { grid-template-columns: 1fr; }
  .osh-tabs { display: inline-flex; }
  .osh-ed[data-tab="form"] .osh-pv, .osh-ed[data-tab="pv"] .osh-form { display: none; }
  .osh-pv { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .osh-share { display: inline-flex; }
  .osh-ed__acts { width: 100%; margin: 0; }
  .osh-ed__acts .btn { flex: 1; justify-content: center; }
  .osh-ed__acts [data-del] span { display: none; }
  .osh-ed__acts [data-del] { flex: 0 0 auto; }
  .osh-grid2 { grid-template-columns: 1fr; }
  .osh-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .osh-row .osh-f.w2 { grid-column: 1 / -1; }
}
