/* ===== «العروض» ===== brochure cards (cover · price · net-cost strip), details, editor */
.of { display: flex; flex-direction: column; gap: 14px; --of-ink: #1b2433; --of-gold: #b8892b; --of-gold-l: #f6eedc; --of-ok: #0f7a55; --of-bad: #b42318; }
.of .ico, .of-modal .ico { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.of-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.of-search { flex: 1 1 280px; min-width: 0; 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; }
.of-search:focus-within { border-color: var(--of-gold); box-shadow: 0 0 0 3px rgba(184, 137, 43, .15); }
.of-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: .62rem 0; font: inherit; background: transparent; color: var(--ink); }
.of-seg { display: inline-flex; background: #eef1f5; border-radius: 11px; padding: 3px; gap: 2px; overflow-x: auto; max-width: 100%; }
.of-seg button { border: 0; background: transparent; padding: .42rem .85rem; border-radius: 8px; font: inherit; font-size: .84rem; font-weight: 800; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.of-seg button small { font-size: .72rem; opacity: .7; margin-inline-start: 2px; }
.of-seg button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.of-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.of-chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .3rem .85rem; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s; }
.of-chips button:hover { border-color: var(--of-gold); }
.of-chips button.is-on { background: var(--of-ink); border-color: var(--of-ink); color: #fff; }

.of-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.of-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.of-card:hover, .of-card:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(27, 36, 51, .12); border-color: #e3d3ad; outline: 0; }
.of-cover { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #1b2433, #4a3d22 65%, #b8892b); overflow: hidden; }
.of-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.of-card:hover .of-cover img { transform: scale(1.04); }
.of-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(15, 20, 30, .75)); }
.of-cover-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .45); }
.of-cover-ph .ico { width: 40px !important; height: 40px !important; }
.of-cover-meta { position: absolute; z-index: 1; inset-inline: 12px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 10px; color: #fff; font-size: .8rem; font-weight: 700; }
.of-cover-meta span { display: inline-flex; align-items: center; gap: 4px; }
.of-pill { position: absolute; z-index: 1; top: 10px; inset-inline-start: 10px; padding: .2rem .7rem; border-radius: 999px; font-size: .74rem; font-weight: 800; background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.ofd-h .of-pill { position: static; display: inline-block; box-shadow: none; border: 1px solid var(--line); }
.of-pill.is-live { background: #e7f6ef; color: #0f7a55; }
.of-pill.is-warn { background: #fff1db; color: #9a5b00; }
.of-pill.is-end { background: #f1f2f4; color: #5b6476; }
.of-pill.is-draft { background: #eef3ff; color: #2f4fb5; }
.of-pill.is-arch { background: #f1f2f4; color: #7b8494; }
.of-body { padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.of-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.of-sub { margin: 0; color: var(--muted); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.of-dates { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.of-dates span { display: inline-flex; align-items: center; gap: 4px; }
.of-price { display: flex; align-items: baseline; gap: 6px; margin-top: auto; padding-top: 6px; }
.of-price small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.of-price b { font-size: 1.55rem; color: var(--of-ink); letter-spacing: -.01em; }
.of-price span { color: var(--of-gold); font-weight: 800; font-size: .85rem; }
.of-cost { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px 10px 12px; border-radius: 12px; background: var(--of-gold-l); }
.of-cost div { display: flex; flex-direction: column; line-height: 1.3; }
.of-cost small { color: #7a6537; font-size: .7rem; font-weight: 700; }
.of-cost b { font-size: .92rem; }
.of-cost.is-bad { background: #fdecea; }
.of-cost.is-bad div:nth-child(2) b { color: var(--of-bad); }
.of-cost.is-miss { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: #9a5b00; background: #fff4e5; padding: 10px; }
.of-bar { position: absolute; inset-inline: 10px; bottom: 5px; height: 4px; border-radius: 4px; background: #0f7a55; overflow: hidden; }
.of-bar i { display: block; height: 100%; background: #c9b27c; border-radius: 4px; }
.of-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 14px; }
.of-hint { color: var(--muted); font-size: .76rem; font-weight: 600; }
.of-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 56px 16px; background: #fff; border: 1px dashed #d9cfb8; border-radius: 18px; color: var(--muted); }
.of-empty .ico { width: 34px !important; height: 34px !important; color: var(--of-gold); }
.of-empty b { color: var(--ink); font-size: 1.05rem; }

/* details */
.of-modal { width: min(1120px, 96vw) !important; max-width: 96vw !important; }
.ofd, .ofe { display: flex; flex-direction: column; min-height: 0; overflow: auto; max-height: 94vh; --of-ink: #1b2433; --of-gold: #b8892b; --of-gold-l: #f6eedc; }
.ofd-h, .ofe-h { position: sticky; top: 0; z-index: 2; background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ofd-h h3, .ofe-h h3 { margin: 2px 0 0; font-size: 1.15rem; }
.ofd-h small { color: var(--muted); font-weight: 700; margin-inline-end: 6px; }
.ofd-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; padding: 16px 20px; }
.ofd-cols.is-one { grid-template-columns: minmax(0, 640px); justify-content: center; }
.ofd-bro { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; padding-bottom: 12px; }
.ofd-bro h4, .ofd-sheet h4 { margin: 14px 16px 6px; font-size: .92rem; display: flex; align-items: center; gap: 6px; }
.ofd-cover { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1b2433, #4a3d22 65%, #b8892b); color: #fff; }
.ofd-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ofd-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(15, 20, 30, .82)); }
.ofd-cover-in { position: absolute; z-index: 1; inset-inline: 16px; bottom: 12px; }
.ofd-cover-in span { font-size: .8rem; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.ofd-cover-in h3 { margin: 2px 0 0; font-size: 1.3rem; line-height: 1.35; }
.ofd-cover-in p { margin: 2px 0 0; font-size: .86rem; opacity: .9; }
.ofd-facts { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 0; }
.ofd-facts span { display: inline-flex; align-items: center; gap: 5px; padding: .25rem .65rem; border-radius: 999px; background: #f4f6fa; font-size: .8rem; font-weight: 700; }
.ofd-facts .ico { color: var(--of-gold); }
.ofd-price { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: flex-end; margin: 12px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--of-gold-l); }
.ofd-price div { display: flex; flex-direction: column; line-height: 1.3; }
.ofd-price small { color: #7a6537; font-size: .74rem; font-weight: 700; }
.ofd-price b { font-size: 1.05rem; }
.ofd-price div:first-child b { font-size: 1.6rem; }
.ofd-price em { font-style: normal; font-size: .76rem; color: #7a6537; }
.ofd-ls { list-style: none; margin: 0; padding: 0 16px; display: grid; gap: 6px; font-size: .88rem; }
.ofd-ls li { display: flex; gap: 8px; align-items: flex-start; }
.ofd-ls .ico { margin-top: 4px; color: var(--of-gold); }
.ofd-ls .ico--ok { color: #0f7a55; } .ofd-ls .ico--bad { color: #b42318; }
.ofd-sheet { border: 1px solid var(--line); border-radius: 16px; padding-bottom: 14px; background: #fcfcfd; align-self: start; }
.ofd-sheet h4 { margin-top: 14px; }
.ofd-tbl { overflow-x: auto; margin: 0 12px; }
.ofd-tbl table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ofd-tbl th { text-align: start; color: var(--muted); font-size: .74rem; font-weight: 800; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ofd-tbl td { padding: 8px; border-bottom: 1px solid #f0f1f4; vertical-align: top; }
.ofd-tbl td small { display: block; color: var(--muted); font-size: .72rem; }
.ofd-kind { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 700; }
.ofd-miss, .ofd-warn { color: #9a5b00; font-size: .8rem; font-weight: 700; }
.ofd-warn { margin: 8px 16px 0; display: flex; gap: 6px; align-items: center; }
.ofd-none { margin: 0 16px; color: var(--muted); font-size: .86rem; }
.ofd-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 12px 12px 0; }
.ofd-sum > div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); line-height: 1.35; }
.ofd-sum small { color: var(--muted); font-size: .72rem; font-weight: 700; }
.ofd-sum b { font-size: 1.05rem; }
.ofd-sum .is-ok { background: #ecf8f2; border-color: #c6ead8; } .ofd-sum .is-ok b { color: #0f7a55; }
.ofd-sum .is-bad { background: #fdecea; border-color: #f5c6c0; } .ofd-sum .is-bad b { color: #b42318; }
.ofd-sum .ofd-warn { grid-column: 1 / -1; margin: 0; }
.ofd-calc { margin: 12px 12px 0; padding: 10px 12px; border-radius: 12px; border: 1px dashed #d9cfb8; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .86rem; font-weight: 700; }
.ofd-calc input { width: 64px; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; text-align: center; margin: 0 4px; }
.ofd-calc output { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ofd-calc .is-ok b { color: #0f7a55; } .ofd-calc .is-bad b { color: #b42318; }
.ofd-note { margin: 12px 12px 0; padding: 10px 12px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; font-size: .85rem; white-space: pre-line; }
.ofd-note small { display: block; color: #92400e; font-weight: 800; font-size: .72rem; }
.ofd-act, .ofe-foot { position: sticky; bottom: 0; z-index: 2; background: #fff; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.ofd-sp { flex: 1; }
.ofe-foot { justify-content: flex-end; }

/* editor */
.ofe section { padding: 14px 20px 4px; }
.ofe section + section { border-top: 1px solid #f0f1f4; }
.ofe h4 { margin: 0 0 10px; font-size: .95rem; display: flex; align-items: center; gap: 6px; }
.ofe h4 small { color: var(--muted); font-weight: 600; font-size: .76rem; }
.ofe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.ofe-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ofe-f { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--muted); min-width: 0; }
.ofe-f.is-wide { grid-column: 1 / -1; }
.ofe-f input, .ofe-f select, .ofe-f textarea, .ofe-line input, .ofe-line select { width: 100%; min-width: 0; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: .9rem; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.ofe-f textarea { resize: vertical; line-height: 1.7; }
.ofe input:focus, .ofe select:focus, .ofe textarea:focus { outline: 0; border-color: var(--of-gold); box-shadow: 0 0 0 3px rgba(184, 137, 43, .15); }
.ofe-big { font-size: 1.15rem !important; font-weight: 800; }
.ofe-mk { display: flex; gap: 6px; } .ofe-mk input { width: 80px; flex: none; }
.ofe-cover { grid-column: 2; grid-row: span 2; }
.ofe-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; border: 1.5px dashed #d9cfb8; border-radius: 12px; background: #fbf8f1; color: #7a6537; cursor: pointer; overflow: hidden; transition: border-color .15s; }
.ofe-drop:hover { border-color: var(--of-gold); }
.ofe-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.ofe-drop em { position: relative; z-index: 1; font-style: normal; font-size: .78rem; background: rgba(255, 255, 255, .9); padding: .1rem .5rem; border-radius: 6px; }
.ofe-drop .ico { width: 28px !important; height: 28px !important; }
.ofe-lines { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ofe-line { display: grid; grid-template-columns: 96px minmax(0, 2.2fr) minmax(0, 1.3fr) 110px 80px 118px 32px; gap: 6px; align-items: center; }
.ofe-line .btn--icon { display: grid; place-items: center; }

@media (max-width: 860px) {
  .ofd-cols, .ofd-cols.is-one { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .ofe-grid, .ofe-grid--4 { grid-template-columns: 1fr 1fr; }
  .ofe-cover { grid-column: 1 / -1; grid-row: auto; }
  .ofe-line { grid-template-columns: 1fr 1fr; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
  .ofe-line [data-l="label"] { grid-column: 1 / -1; order: -1; }
  .ofe-line .btn--icon { justify-self: end; }
}
@media (max-width: 520px) {
  .of-grid { grid-template-columns: 1fr; }
  .ofe-grid, .ofe-grid--4 { grid-template-columns: 1fr; }
  .ofe section, .ofd-h, .ofe-h, .ofd-act, .ofe-foot { padding-inline: 14px; }
  .of-top .btn--p { flex: 1; justify-content: center; }
}
