.gp-offers-card{padding:14px}.gp-offers-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) 180px auto;gap:10px;align-items:end;margin-bottom:12px}.gp-offers-table td,.gp-offers-table th{vertical-align:middle}.gp-action-cell,.gp-action-head{width:132px;text-align:center}.gp-action-row{display:inline-flex;gap:6px;align-items:center;justify-content:center}.gp-icon-btn{width:30px;height:30px;border-radius:9px;border:1px solid var(--gp-border,#404363);background:color-mix(in srgb,var(--gp-card-2,#3a3d5b) 80%,transparent);color:var(--gp-text,#e3e5fc);display:inline-grid;place-items:center;cursor:pointer}.gp-icon-btn:hover{transform:translateY(-1px);border-color:var(--gp-accent,#7c6cff)}.gp-icon-btn.danger{color:var(--gp-danger,#ef5b73)}.gp-empty-cell{text-align:center;padding:24px;color:var(--gp-muted,#878aad)}
.gp-offer-modal[hidden]{display:none}.gp-offer-modal{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:18px}.gp-offer-modal-backdrop{position:absolute;inset:0;background:rgba(9,10,22,.66);backdrop-filter:blur(8px)}.gp-offer-modal-card{position:relative;width:min(1120px,calc(100vw - 28px));max-height:92vh;overflow:auto;border:1px solid var(--gp-border,#404363);border-radius:20px;background:var(--gp-card,#343650);box-shadow:0 24px 80px rgba(0,0,0,.35);padding:14px}.gp-offer-modal-card>header{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}.gp-offer-modal-card h2{margin:0;font-size:18px}.gp-offer-single-popup .gp-field span{font-size:11px;color:var(--gp-muted,#878aad);line-height:1.1}.gp-offer-single-popup input,.gp-offer-single-popup select,.gp-offer-single-popup textarea{min-height:34px;padding:7px 9px;font-size:12px;border-radius:10px}.gp-offer-single-popup textarea{min-height:96px;resize:vertical}.gp-offer-popup-grid{display:grid;grid-template-columns:60fr 40fr;gap:14px;align-items:start}.gp-offer-edit-left,.gp-offer-edit-right{border:1px solid var(--gp-border-soft,rgba(182,185,217,.18));border-radius:16px;background:color-mix(in srgb,var(--gp-card-2,#3a3d5b) 36%,transparent);padding:12px}.gp-offer-section-title{font-size:12px;font-weight:800;margin:0 0 8px;color:var(--gp-text,#e3e5fc)}.gp-offer-section-title:not(:first-child){margin-top:12px}.source-title{margin-top:14px}.gp-offer-compact-grid{display:grid;gap:8px;margin-bottom:8px}.gp-offer-compact-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.gp-offer-compact-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.gp-offer-compact-grid.source-mini{margin-top:8px}.gp-price-row{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.gp-price-row .gp-field input{padding-left:7px;padding-right:7px}.gp-missing-note{margin:.25rem 0 0;color:var(--gp-warning,#f7b955);font-size:12px}.gp-missing-note.ready{color:var(--gp-success,#35c486)}.gp-offer-thumb{width:48px;height:48px;border-radius:13px;border:1px solid var(--gp-border,#404363);background:var(--gp-card-2,#3a3d5b);display:grid;place-items:center;overflow:hidden;color:var(--gp-muted,#878aad)}.gp-offer-thumb img{width:100%;height:100%;object-fit:cover;display:block}.gp-gallery-preview{display:grid;grid-template-columns:repeat(auto-fill,minmax(82px,1fr));gap:8px;margin-top:8px;max-height:280px;overflow:auto;padding-right:2px}.gp-gallery-empty{border:1px dashed var(--gp-border,#404363);border-radius:13px;padding:18px;color:var(--gp-muted,#878aad);text-align:center;font-size:12px}.gp-gallery-item{position:relative;border:1px solid var(--gp-border,#404363);border-radius:13px;overflow:hidden;background:var(--gp-card-2,#3a3d5b);min-height:82px}.gp-gallery-item img{width:100%;height:82px;object-fit:cover;display:block}.gp-gallery-item span{position:absolute;left:5px;bottom:5px;background:rgba(0,0,0,.55);color:#fff;border-radius:999px;padding:2px 7px;font-size:10px}.gp-gallery-item button{position:absolute;right:5px;top:5px;border:0;border-radius:999px;background:rgba(0,0,0,.6);color:#fff;width:21px;height:21px;cursor:pointer}.gp-url-row{display:grid;grid-template-columns:1fr 34px;gap:6px}.gp-url-row .gp-icon-btn:disabled{opacity:.45;cursor:not-allowed}.gp-modal-actions{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:10px;background:linear-gradient(to top,var(--gp-card,#343650) 70%,transparent)}
@media(max-width:980px){.gp-offer-popup-grid{grid-template-columns:1fr}.gp-price-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.gp-offers-toolbar,.gp-offer-compact-grid.two,.gp-offer-compact-grid.three{grid-template-columns:1fr}.gp-offer-modal-card{width:calc(100vw - 18px)}.gp-price-row{grid-template-columns:1fr}}

/* Patch 04J — table density, image hover, icon statuses, offer view, bulk delete */
.gp-offers-toolbar-04j{grid-template-columns:minmax(220px,1fr) 160px auto auto}.gp-soft-btn.danger{color:var(--gp-danger,#ef5b73);border-color:color-mix(in srgb,var(--gp-danger,#ef5b73) 45%,var(--gp-border,#404363))}.gp-soft-btn.danger:disabled{opacity:.45;cursor:not-allowed}.gp-select-head,.gp-select-cell{width:34px;text-align:center}.gp-select-head input,.gp-select-cell input{width:16px;height:16px;accent-color:var(--gp-accent,#7c6cff)}.gp-offers-table th,.gp-offers-table td{padding-top:7px;padding-bottom:7px}.gp-offer-title-cell strong{display:inline-block;max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gp-offer-thumb{width:58px;height:58px;border-radius:14px;position:relative;overflow:visible}.gp-offer-thumb img{border-radius:14px}.gp-offer-thumb[data-hover-image]:hover{z-index:20}.gp-offer-thumb[data-hover-image]:not(.has-gallery):hover > img{position:absolute;left:66px;top:0;width:210px;height:160px;object-fit:cover;border-radius:16px;border:1px solid var(--gp-border,#404363);box-shadow:0 18px 50px rgba(0,0,0,.35);background:var(--gp-card,#343650)}[dir="rtl"] .gp-offer-thumb[data-hover-image]:not(.has-gallery):hover > img,.text-rtl .gp-offer-thumb[data-hover-image]:not(.has-gallery):hover > img{left:auto;right:66px}.gp-status-icons{display:inline-flex;gap:5px;align-items:center}.gp-status-dot{width:26px;height:26px;display:inline-grid;place-items:center;border-radius:999px;border:1px solid var(--gp-border,#404363);background:var(--gp-card-2,#3a3d5b);font-size:15px}.gp-status-dot.success{color:var(--gp-success,#35c486)}.gp-status-dot.warning{color:var(--gp-warning,#f7b955)}.gp-status-dot.danger{color:var(--gp-danger,#ef5b73)}.gp-status-dot.info{color:var(--gp-info,#58a6ff)}.gp-counter-pill{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--gp-border-soft,rgba(182,185,217,.18));border-radius:999px;padding:4px 8px;font-size:11px;color:var(--gp-muted-2,#b6b9d9);background:color-mix(in srgb,var(--gp-card-2,#3a3d5b) 65%,transparent)}
.gp-offer-view-modal[hidden]{display:none}.gp-offer-view-modal{position:fixed;inset:0;z-index:1210;display:grid;place-items:center;padding:18px}.gp-offer-view-card{position:relative;width:min(1080px,calc(100vw - 28px));max-height:92vh;overflow:auto;border:1px solid var(--gp-border,#404363);border-radius:22px;background:var(--gp-card,#343650);box-shadow:0 24px 80px rgba(0,0,0,.35);padding:16px}.gp-offer-view-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.gp-offer-view-card h2{margin:0;font-size:18px}.gp-view-layout{display:grid;grid-template-columns:40fr 60fr;gap:14px;align-items:start}.gp-view-media,.gp-view-info{border:1px solid var(--gp-border-soft,rgba(182,185,217,.18));border-radius:18px;background:color-mix(in srgb,var(--gp-card-2,#3a3d5b) 34%,transparent);padding:12px}.gp-view-hero{height:320px;border-radius:16px;border:1px solid var(--gp-border,#404363);background:var(--gp-card-2,#3a3d5b);display:grid;place-items:center;overflow:hidden;color:var(--gp-muted,#878aad);font-size:40px}.gp-view-hero img{width:100%;height:100%;object-fit:cover}.gp-view-thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:8px;margin-top:9px;max-height:160px;overflow:auto}.gp-view-thumb{position:relative;border:1px solid var(--gp-border,#404363);border-radius:12px;overflow:hidden;min-height:72px;background:var(--gp-card-2,#3a3d5b)}.gp-view-thumb img{width:100%;height:72px;object-fit:cover;display:block}.gp-view-thumb span{position:absolute;left:5px;bottom:5px;border-radius:999px;background:rgba(0,0,0,.55);color:#fff;font-size:10px;padding:2px 6px}.gp-view-topline{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:10px}.gp-view-info h3{margin:0 0 4px;font-size:22px}.gp-view-info h4{margin:0 0 12px;color:var(--gp-muted-2,#b6b9d9);font-size:14px}.gp-view-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.gp-view-field{border:1px solid var(--gp-border-soft,rgba(182,185,217,.18));border-radius:13px;padding:8px 10px;background:color-mix(in srgb,var(--gp-card,#343650) 70%,transparent)}.gp-view-field span{display:block;font-size:10px;color:var(--gp-muted,#878aad);margin-bottom:3px}.gp-view-field strong{display:block;font-size:12px;line-height:1.35}.gp-view-source-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;margin-top:10px;border:1px solid var(--gp-border-soft,rgba(182,185,217,.18));border-radius:13px;padding:8px 10px}.gp-view-source-row span{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gp-view-missing{margin-top:10px;color:var(--gp-warning,#f7b955);font-size:12px}.gp-view-missing.ready{color:var(--gp-success,#35c486)}
@media(max-width:980px){.gp-offers-toolbar-04j{grid-template-columns:1fr 1fr}.gp-view-layout{grid-template-columns:1fr}.gp-view-hero{height:240px}.gp-view-fields{grid-template-columns:1fr}.gp-offer-thumb[data-hover-image]:not(.has-gallery):hover > img{position:static;width:100%;height:100%}}

/* Patch 04M — offer edit popup repair + cleaner delete action */
.gp-offer-single-popup{max-width:min(1220px,92vw)!important;width:92vw!important;max-height:86vh!important;overflow:hidden!important}
.gp-offer-single-popup header{padding:14px 16px 10px!important;border-bottom:1px solid var(--gp-border-soft,rgba(255,255,255,.12))}
.gp-offer-single-popup form{display:flex;flex-direction:column;max-height:calc(86vh - 64px);min-height:0}
.gp-offer-popup-grid{grid-template-columns:minmax(0,1.55fr) minmax(320px,.95fr)!important;gap:14px!important;padding:12px 16px!important;overflow:auto!important;min-height:0}
.gp-offer-edit-left,.gp-offer-edit-right{min-width:0!important;padding:10px!important;border-radius:14px!important;background:rgba(255,255,255,.025)!important;border:1px solid var(--gp-border-soft,rgba(255,255,255,.12))}
.gp-offer-section-title{font-size:12px!important;margin:0 0 8px!important;color:var(--gp-muted-2,#b6b9d9)}
.gp-offer-compact-grid{gap:8px!important;margin-bottom:8px!important}
.gp-offer-single-popup .gp-field span{font-size:10px!important;margin-bottom:4px!important;line-height:1.1!important;color:var(--gp-muted-2,#b6b9d9)}
.gp-offer-single-popup input,.gp-offer-single-popup select,.gp-offer-single-popup textarea{min-height:34px!important;height:34px!important;padding:7px 9px!important;font-size:12px!important;border-radius:10px!important;box-sizing:border-box!important}
.gp-offer-single-popup textarea{height:82px!important;min-height:82px!important;resize:vertical!important}
.gp-price-row{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;align-items:end!important;overflow:visible!important;margin-top:6px!important}
.gp-price-row .gp-field{min-width:0!important}
.gp-price-row input{width:100%!important;min-width:0!important}
.gp-offer-edit-right .gp-gallery-preview{min-height:104px!important;max-height:190px!important;overflow:auto!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;padding:8px!important;border-radius:14px!important;border:1px dashed var(--gp-border-soft,rgba(255,255,255,.16))}
.gp-gallery-item{height:74px!important;position:relative!important;border-radius:12px!important;overflow:hidden!important;background:rgba(0,0,0,.12)!important}
.gp-gallery-item img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
.gp-gallery-empty{font-size:12px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;min-height:74px!important;color:var(--gp-muted,#878aad)!important}
.gp-url-row{display:grid!important;grid-template-columns:1fr 36px!important;gap:6px!important;align-items:end!important}
.gp-url-row .gp-icon-btn{height:34px!important;width:36px!important;border-radius:10px!important}
.gp-modal-actions{padding:12px 16px!important;border-top:1px solid var(--gp-border-soft,rgba(255,255,255,.12))!important;background:var(--gp-card,#343650)!important;position:sticky!important;bottom:0!important;z-index:2!important}
.gp-action-row .gp-icon-btn.danger{color:var(--gp-danger,#ef5b73)!important;border-color:rgba(239,91,115,.34)!important}
.gp-action-row .gp-icon-btn.danger:hover{background:rgba(239,91,115,.12)!important}
.gp-missing-note{font-size:11px!important;margin:2px 0 0!important;color:var(--gp-warning,#f7b955)!important}.gp-missing-note.ready{color:var(--gp-success,#35c486)!important}
@media(max-width:980px){.gp-offer-single-popup{width:96vw!important}.gp-offer-popup-grid{grid-template-columns:1fr!important}.gp-price-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Patch 04N — live pricing, fixed compact popup columns, image quick import */
.gp-offer-single-popup .gp-offer-compact-grid,
.gp-offer-single-popup .gp-price-row,
.gp-offer-single-popup .gp-offer-compact-grid > *,
.gp-offer-single-popup .gp-price-row > *,
.gp-offer-single-popup .gp-field,
.gp-offer-single-popup input,
.gp-offer-single-popup select,
.gp-offer-single-popup textarea{min-width:0!important;max-width:100%!important;width:100%!important;box-sizing:border-box!important}
.gp-offer-single-popup select{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.gp-offer-popup-grid{grid-template-columns:minmax(0,60fr) minmax(330px,40fr)!important;align-items:start!important;overflow-x:hidden!important}
.gp-offer-edit-left,.gp-offer-edit-right{overflow:hidden!important}
.gp-offer-compact-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.gp-offer-compact-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.gp-price-row{grid-template-columns:repeat(6,minmax(92px,1fr))!important;overflow:visible!important}
.gp-price-row .gp-field span{white-space:nowrap!important}
.gp-price-row input[name="public_price_display"]{font-weight:800!important;color:var(--gp-accent,#7c6cff)!important}
.gp-price-row input[name="calculated_price_egp"]{font-weight:800!important}
.gp-section-title-row{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}
.gp-mini-hint{font-size:10px!important;font-weight:600!important;color:var(--gp-muted,#878aad)!important}
.gp-image-actions{display:flex!important;flex-wrap:wrap!important;gap:6px!important;margin:7px 0 8px!important}
.gp-mini-btn{height:28px!important;min-height:28px!important;padding:0 9px!important;font-size:11px!important;border-radius:999px!important;display:inline-flex!important;align-items:center!important;gap:4px!important;width:auto!important}
.gp-image-url-field textarea{font-size:11px!important;line-height:1.35!important}
.gp-gallery-preview{cursor:pointer!important;transition:border-color .18s ease,background .18s ease!important}
.gp-gallery-preview:hover{border-color:var(--gp-accent,#7c6cff)!important;background:color-mix(in srgb,var(--gp-accent,#7c6cff) 6%,transparent)!important}
.gp-gallery-empty{display:flex!important;flex-direction:column!important;gap:6px!important;align-items:center!important;justify-content:center!important;cursor:pointer!important}
.gp-gallery-empty i{font-size:20px!important;color:var(--gp-accent,#7c6cff)!important}
.gp-gallery-empty span{font-size:11px!important;line-height:1.25!important}
@media(max-width:1180px){.gp-price-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}.gp-offer-popup-grid{grid-template-columns:minmax(0,1fr)!important}.gp-offer-single-popup{width:96vw!important}}
@media(max-width:720px){.gp-offer-compact-grid.three,.gp-offer-compact-grid.two,.gp-price-row{grid-template-columns:1fr!important}}

/* Patch 04O — cleaner offer table + WhatsApp send modal */
.gp-offers-table th:nth-child(5),
.gp-offers-table td:nth-child(5) { min-width: 230px; }
.gp-offers-table th:nth-child(6),
.gp-offers-table td:nth-child(6) { min-width: 170px; }
.gp-vehicle-mini-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-width: 280px;
}
.gp-vehicle-mini-cards span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid var(--gp-border, rgba(255,255,255,.12));
  border-radius: 10px;
  background: rgba(255,255,255,.035);
}
.gp-vehicle-mini-cards small {
  font-size: 9px;
  line-height: 1;
  color: var(--gp-muted, #9da1c7);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.gp-vehicle-mini-cards b {
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.gp-offer-info-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 190px;
}
.gp-offer-info-stack span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.15;
  color: var(--gp-text, #e3e5fc);
}
.gp-offer-info-stack i { color: var(--gp-muted, #9da1c7); }
.gp-icon-btn.whatsapp {
  color: #34d399;
  border-color: rgba(52,211,153,.32);
}
.gp-icon-btn.whatsapp:hover {
  background: rgba(52,211,153,.12);
}
.gp-offer-send-card {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 60px);
  overflow: auto;
  position: relative;
  z-index: 2;
  border-radius: 22px;
  background: var(--gp-card, #343650);
  border: 1px solid var(--gp-border, rgba(255,255,255,.14));
  box-shadow: 0 24px 70px rgba(0,0,0,.38);
  padding: 18px;
}
.gp-offer-send-card header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gp-border, rgba(255,255,255,.14));
  margin-bottom: 14px;
}
.gp-offer-send-card h2 { margin: 0; font-size: 20px; }
.gp-offer-send-card p { margin: 4px 0 0; color: var(--gp-muted, #9da1c7); }
.gp-offer-send-card textarea[data-send-message-preview] {
  min-height: 210px;
  resize: vertical;
  line-height: 1.55;
}
.gp-help-line {
  margin: 8px 0 0;
  color: var(--gp-muted, #9da1c7);
  font-size: 12px;
}
.gp-whatsapp-template-card textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
}
@media (max-width: 1200px) {
  .gp-vehicle-mini-cards { grid-template-columns: 1fr; max-width: 150px; }
}

/* Patch 04P — polished WhatsApp send modal + phone normalization UI */
.gp-offer-send-modal[hidden]{display:none!important}
.gp-offer-send-modal{position:fixed;inset:0;z-index:1400;display:grid;place-items:center;padding:22px}
.gp-whatsapp-polished-card{width:min(620px,calc(100vw - 34px));padding:0!important;overflow:hidden!important;background:var(--gp-card,#343650)!important}
.gp-whatsapp-polished-card header{padding:18px 20px 14px!important;margin:0!important;align-items:flex-start!important;background:linear-gradient(135deg,rgba(52,211,153,.09),transparent 55%)}
.gp-whatsapp-polished-card header h2{font-size:22px!important;margin:2px 0 0!important}
.gp-whatsapp-polished-card form{padding:16px 20px 0!important}
.gp-whatsapp-phone-grid{display:grid;grid-template-columns:145px 1fr;gap:10px;align-items:end}
.gp-country-field select,.gp-whatsapp-polished-card input,.gp-whatsapp-polished-card textarea{min-height:40px!important;border-radius:14px!important}
.gp-normalized-phone-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 12px;padding:8px 11px;border:1px solid rgba(52,211,153,.24);background:rgba(52,211,153,.075);border-radius:13px}
.gp-normalized-phone-row span{font-size:11px;color:var(--gp-muted,#9da1c7);font-weight:800;text-transform:uppercase;letter-spacing:.05em}.gp-normalized-phone-row strong{font-size:13px;color:#34d399}.gp-whatsapp-preview-field textarea{min-height:190px!important;max-height:300px!important;font-size:13px!important;background:rgba(255,255,255,.035)!important}.gp-whatsapp-actions{margin-left:-20px!important;margin-right:-20px!important;padding:13px 20px!important}.gp-whatsapp-polished-card .is-invalid{border-color:var(--gp-danger,#ef5b73)!important;box-shadow:0 0 0 3px rgba(239,91,115,.12)!important}
@media(max-width:640px){.gp-whatsapp-phone-grid{grid-template-columns:1fr}.gp-whatsapp-polished-card{width:calc(100vw - 20px)}}

/* Patch 04R — WhatsApp template picker + safer modal layering */
.gp-offer-send-modal{z-index:30000!important;isolation:isolate}.gp-offer-send-modal .gp-offer-modal-backdrop{z-index:0!important}.gp-whatsapp-polished-card{position:relative!important;z-index:2!important;box-shadow:0 26px 90px rgba(0,0,0,.42)!important}.gp-whatsapp-polished-card form{display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 180px);overflow:auto;padding-bottom:0!important}.gp-whatsapp-template-select-grid{display:grid;grid-template-columns:150px 1fr;gap:10px;align-items:end}.gp-whatsapp-template-select-grid select{min-height:40px;border-radius:14px}.gp-whatsapp-actions{position:sticky;bottom:0;background:var(--gp-card,#343650);z-index:4;border-top:1px solid var(--gp-border,rgba(255,255,255,.14));box-shadow:0 -10px 20px rgba(0,0,0,.08)}.gp-whatsapp-preview-field textarea.text-ltr{direction:ltr;text-align:left}.gp-whatsapp-preview-field textarea.text-rtl{direction:rtl;text-align:right}@media(max-width:640px){.gp-whatsapp-template-select-grid{grid-template-columns:1fr}}

/* Patch 08 — force page-specific cards/modals/tables to follow Theme Controller */
.gp-offer-modal-card,
.gp-offer-view-card,
.gp-offer-edit-left,
.gp-offer-edit-right,
.gp-view-media,
.gp-view-info,
.gp-view-field,
.gp-import-view-card,
.gp-import-view-field,
.gp-import-view-media,
.gp-import-stats div,
.gp-import-results,
.gp-import-card,
.gp-import-help,
.gp-diag-card,
.gp-diag-row,
.gp-diag-section,
.gp-diag-kpis > *,
.gp-row-action-btn,
.gp-status-dot,
.gp-import-status-dot,
.gp-import-url-btn {
  background-color: color-mix(in srgb, var(--gp-card) 86%, var(--gp-bg) 14%);
  border-color: var(--gp-border-soft) !important;
  color: var(--gp-text);
}
.gp-offer-single-popup input,
.gp-offer-single-popup select,
.gp-offer-single-popup textarea,
.gp-import-options input,
.gp-import-options select,
.gp-import-textarea,
.gp-import-textarea-04l {
  background: var(--gp-card-2) !important;
  border-color: var(--gp-border-soft) !important;
  color: var(--gp-text) !important;
}
.gp-offer-modal-backdrop,
.gp-import-view-backdrop {
  background: color-mix(in srgb, var(--gp-bg) 68%, black 32%) !important;
}

/* Patch 04q: catalog KPIs and broken-image separation */
.gp-offers-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.gp-offers-kpis span {
  min-width: 118px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid var(--gp-border, #dfe5f5);
  border-radius: 14px;
  background: var(--gp-soft-bg, #f7f8ff);
}
.gp-offers-kpis strong {
  font-size: 18px;
  line-height: 1;
}
.gp-offers-kpis small {
  color: var(--gp-muted, #6b7280);
  font-size: 11px;
}
.gp-image-issue {
  color: #b45309;
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(245, 158, 11, .25);
  border-radius: 999px;
  padding: 3px 7px;
}

/* Patch 05: align catalog table with import preview columns + browser broken-image detection */
.gp-offers-table th:nth-child(4),
.gp-offers-table td:nth-child(4),
.gp-offers-table th:nth-child(5),
.gp-offers-table td:nth-child(5),
.gp-offers-table th:nth-child(6),
.gp-offers-table td:nth-child(6),
.gp-offers-table th:nth-child(7),
.gp-offers-table td:nth-child(7) {
  min-width: 150px;
}

.gp-offer-mini-stack {
  display: grid;
  gap: 3px;
  max-width: 220px;
}

.gp-offer-mini-stack strong {
  color: var(--gp-text, #14172f);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.gp-offer-mini-stack small {
  color: var(--gp-muted, #7b84a1);
  font-size: 11px;
  line-height: 1.15;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gp-cost-stack small {
  color: var(--gp-text, #14172f);
  font-weight: 800;
}

.gp-offer-thumb.is-broken,
.gp-offer-thumb.is-missing {
  display: grid;
  place-items: center;
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.22);
  color: #ef4444;
}

.gp-offer-thumb.is-broken i,
.gp-offer-thumb.is-missing i {
  font-size: 20px;
}

.gp-image-issue {
  width: fit-content;
  margin-top: 2px;
}

/* Patch 06 — smart image issue sorting + repair tools */
.gp-offers-toolbar-04j{grid-template-columns:minmax(240px,1fr) 170px 160px auto auto!important}
.gp-offers-kpis{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin:8px 0 10px!important}
.gp-offers-kpis button{min-width:112px;text-align:left;border:1px solid var(--gp-border-soft,rgba(182,185,217,.18));border-radius:14px;background:color-mix(in srgb,var(--gp-card-2,#3a3d5b) 70%,transparent);color:var(--gp-text,#e3e5fc);padding:8px 11px;cursor:pointer;transition:.16s ease;display:flex;flex-direction:column;gap:2px}
.gp-offers-kpis button:hover,.gp-offers-kpis button.is-active{border-color:var(--gp-accent,#7c6cff);box-shadow:0 0 0 3px color-mix(in srgb,var(--gp-accent,#7c6cff) 14%,transparent);transform:translateY(-1px)}
.gp-offers-kpis button strong{font-size:18px;line-height:1;font-weight:900}.gp-offers-kpis button small{font-size:11px;color:var(--gp-muted,#878aad);font-weight:700}
.gp-image-bulkbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 10px;padding:8px 10px;border:1px solid var(--gp-border-soft,rgba(182,185,217,.18));border-radius:15px;background:color-mix(in srgb,var(--gp-card-2,#3a3d5b) 56%,transparent)}
.gp-image-bulkbar>span{font-size:12px;font-weight:900;color:var(--gp-muted-2,#b6b9d9);display:inline-flex;align-items:center;gap:6px;margin-right:4px}.gp-image-bulkbar .danger{color:var(--gp-danger,#ef5b73)!important;border-color:rgba(239,91,115,.34)!important}
.gp-image-health{margin-top:4px;display:inline-flex;align-items:center;gap:3px;font-size:10px;font-weight:900;border-radius:999px;padding:2px 6px;border:1px solid var(--gp-border-soft,rgba(182,185,217,.18));background:color-mix(in srgb,var(--gp-card-2,#3a3d5b) 72%,transparent)}
.gp-image-health.success{color:var(--gp-success,#35c486);border-color:rgba(53,196,134,.28)}.gp-image-health.warning{color:var(--gp-warning,#f7b955);border-color:rgba(247,185,85,.34)}.gp-image-health.danger{color:var(--gp-danger,#ef5b73);border-color:rgba(239,91,115,.34)}
.gp-icon-btn.image-repair{color:var(--gp-warning,#f7b955);border-color:rgba(247,185,85,.34)}.gp-icon-btn.image-repair:hover{background:rgba(247,185,85,.12)}.gp-icon-btn:disabled{opacity:.45;cursor:not-allowed;transform:none!important}
.gp-offers-table .gp-action-cell,.gp-offers-table .gp-action-head{min-width:190px;width:190px}.gp-action-row{flex-wrap:nowrap}.gp-offer-thumb.is-broken+.gp-image-health{color:var(--gp-warning,#f7b955);border-color:rgba(247,185,85,.34)}
@media(max-width:1180px){.gp-offers-toolbar-04j{grid-template-columns:1fr 1fr!important}.gp-image-bulkbar{align-items:stretch}.gp-image-bulkbar .gp-soft-btn{flex:1 1 160px}.gp-offers-table .gp-action-cell,.gp-offers-table .gp-action-head{min-width:170px;width:170px}}
@media(max-width:720px){.gp-offers-toolbar-04j{grid-template-columns:1fr!important}.gp-offers-kpis button{flex:1 1 120px}}

/* Patch 08 smart catalog scan / activation helpers */
.gp-scan-state{align-self:center;font-size:11px;font-weight:800;color:var(--gp-muted,#878aad);padding:8px 10px;border:1px dashed var(--gp-border-soft,rgba(182,185,217,.25));border-radius:999px}
.gp-soft-btn.success{border-color:rgba(29,185,84,.28)!important;color:#11a45a!important;background:rgba(29,185,84,.08)!important}
.gp-offers-kpis button[data-kpi-filter="__ready_activation"] strong{color:#0f9f5f}
.gp-offers-kpis button[data-kpi-filter="__needs_fields"] strong{color:#b7791f}
.gp-offers-table tr[hidden]{display:none!important}

/* Patch 10: row gallery hover + export selected */
.gp-image-bulkbar [data-export-selected-csv]:disabled{opacity:.45;cursor:not-allowed}
.gp-offer-thumb.has-gallery{cursor:zoom-in}
.gp-offer-thumb.has-gallery .gp-hover-gallery{display:none;position:absolute;left:70px;top:-8px;width:min(470px,calc(100vw - 420px));max-height:360px;overflow:auto;z-index:80;padding:10px;border:1px solid var(--gp-border,#404363);border-radius:18px;background:var(--gp-card,#343650);box-shadow:0 22px 70px rgba(0,0,0,.38)}
.gp-offer-thumb.has-gallery:hover .gp-hover-gallery{display:block}
.gp-hover-gallery-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;color:var(--gp-text,#e3e5fc)}
.gp-hover-gallery-head strong{font-size:12px;font-weight:900}.gp-hover-gallery-head small{font-size:10px;color:var(--gp-muted,#878aad)}
.gp-hover-gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.gp-hover-gallery-item{position:relative;display:block;min-height:94px;border:1px solid var(--gp-border-soft,rgba(182,185,217,.18));border-radius:14px;overflow:hidden;background:var(--gp-card-2,#3a3d5b)}
.gp-hover-gallery-item img{width:100%;height:104px;object-fit:cover;display:block;border-radius:14px;position:static!important;box-shadow:none!important;border:0!important;background:transparent!important}
.gp-hover-gallery-item em{position:absolute;left:6px;bottom:6px;min-width:22px;text-align:center;border-radius:999px;padding:2px 7px;background:rgba(0,0,0,.58);color:#fff;font-style:normal;font-size:10px;font-weight:900}
[dir="rtl"] .gp-offer-thumb.has-gallery .gp-hover-gallery,.text-rtl .gp-offer-thumb.has-gallery .gp-hover-gallery{left:auto;right:70px}
.gp-offer-thumb.has-gallery:hover > img{position:absolute;left:0;top:0;width:58px;height:58px;object-fit:cover;border-radius:14px;border:0;box-shadow:none;background:transparent}
@media(max-width:980px){.gp-offer-thumb.has-gallery .gp-hover-gallery{left:0!important;right:auto!important;top:66px;width:min(88vw,440px)}.gp-hover-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Patch 11 — better row image hover gallery + CSV condition export support */
.gp-offer-thumb.has-gallery { overflow: visible !important; }
.gp-offer-thumb.has-gallery:hover { z-index: 9999 !important; }
.gp-hover-gallery.gp-hover-gallery-pro {
  position: absolute !important;
  left: 72px !important;
  top: -18px !important;
  width: min(720px, calc(100vw - 360px)) !important;
  max-width: 720px !important;
  padding: 12px !important;
  border: 1px solid var(--gp-border, rgba(124,108,255,.28)) !important;
  border-radius: 18px !important;
  background: color-mix(in srgb, var(--gp-card, #fff) 96%, transparent) !important;
  box-shadow: 0 24px 80px rgba(12,16,35,.28) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(8px) scale(.985) !important;
  transition: opacity .14s ease, transform .14s ease !important;
}
.gp-offer-thumb.has-gallery:hover .gp-hover-gallery.gp-hover-gallery-pro,
.gp-hover-gallery.gp-hover-gallery-pro:hover {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}
.gp-hover-gallery-pro .gp-hover-gallery-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 0 10px !important;
  color: var(--gp-text, #111827) !important;
}
.gp-hover-gallery-pro .gp-hover-gallery-head strong { font-size: 13px !important; font-weight: 900 !important; }
.gp-hover-gallery-pro .gp-hover-gallery-head small { font-size: 11px !important; color: var(--gp-muted, #667085) !important; }
.gp-hover-gallery-body {
  display: grid !important;
  grid-template-columns: minmax(230px, 300px) 1fr !important;
  gap: 12px !important;
  align-items: stretch !important;
}
.gp-hover-gallery-main {
  position: relative !important;
  min-height: 220px !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  border: 1px solid var(--gp-border-soft, rgba(124,108,255,.18)) !important;
  background: var(--gp-card-2, #f6f7fb) !important;
}
.gp-hover-gallery-main img {
  width: 100% !important;
  height: 100% !important;
  min-height: 220px !important;
  object-fit: cover !important;
  display: block !important;
}
.gp-hover-gallery-main span {
  position: absolute !important;
  left: 10px !important;
  bottom: 10px !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #fff !important;
  background: rgba(0,0,0,.55) !important;
}
.gp-hover-gallery-pro .gp-hover-gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(92px, 1fr)) !important;
  gap: 8px !important;
  max-height: 220px !important;
  overflow: auto !important;
  padding: 1px 4px 1px 1px !important;
}
.gp-hover-gallery-pro .gp-hover-gallery-item {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-height: 96px !important;
  padding: 0 !important;
  border: 1px solid var(--gp-border-soft, rgba(124,108,255,.18)) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: var(--gp-card-2, #f6f7fb) !important;
  cursor: default !important;
}
.gp-hover-gallery-pro .gp-hover-gallery-item img {
  width: 100% !important;
  height: 96px !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform .16s ease !important;
}
.gp-hover-gallery-pro .gp-hover-gallery-item:hover img { transform: scale(1.045) !important; }
.gp-hover-gallery-pro .gp-hover-gallery-item em {
  position: absolute !important;
  left: 7px !important;
  bottom: 7px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: rgba(0,0,0,.58) !important;
  color: #fff !important;
  font-size: 10px !important;
  font-style: normal !important;
  font-weight: 800 !important;
}
.gp-hover-gallery-pro .gp-hover-gallery-item.is-main { outline: 2px solid color-mix(in srgb, var(--gp-accent, #7c6cff) 55%, transparent) !important; }
[dir="rtl"] .gp-hover-gallery.gp-hover-gallery-pro,
.text-rtl .gp-hover-gallery.gp-hover-gallery-pro {
  left: auto !important;
  right: 72px !important;
}
@media (max-width: 1180px) {
  .gp-hover-gallery.gp-hover-gallery-pro { width: min(560px, calc(100vw - 170px)) !important; }
  .gp-hover-gallery-body { grid-template-columns: 1fr !important; }
  .gp-hover-gallery-main { min-height: 180px !important; }
  .gp-hover-gallery-main img { min-height: 180px !important; }
  .gp-hover-gallery-pro .gp-hover-gallery-grid { grid-template-columns: repeat(4, minmax(74px, 1fr)) !important; max-height: 150px !important; }
  .gp-hover-gallery-pro .gp-hover-gallery-item,
  .gp-hover-gallery-pro .gp-hover-gallery-item img { min-height: 78px !important; height: 78px !important; }
}
