/* ==========================================================================
   إرتواء الندى — Page-level blocks
   ========================================================================== */

/* ------------------------------------------------------------- Page header */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.page-head .sub { margin-top: 6px; font-size: 15px; }
.page-head-actions { display: flex; align-items: center; gap: 12px; }

/* ============================================================ ADMIN portal */

/* Export report strip */
.export-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px 26px;
}
.export-strip .lead { display: flex; align-items: center; gap: 16px; }
.export-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: var(--r-lg);
  background: var(--cyan-050);
  color: var(--blue-600);
}
.export-icon svg { width: 26px; height: 26px; }

.date-range {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.date-range .leg { display: flex; align-items: center; gap: 8px; }
.date-range .leg span { font-size: 13px; color: var(--text-3); }
.date-range input {
  border: 0;
  background: none;
  outline: none;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-900);
}
.date-range .sep { width: 1px; height: 24px; background: var(--border-2); }

/* Filters bar */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(120px, auto);
  gap: 14px;
  align-items: end;
  padding: 22px 26px;
}
.filter-bar .btn { height: 46px; padding-inline: 16px; }
.filter-bar .select, .filter-bar .input { padding-inline: 12px; }
.filter-bar .select { padding-inline-end: 34px; background-position: left 10px center; }
body[dir="ltr"] .filter-bar .select { background-position: right 10px center; }

/* 8-case ratio cards */
.ratio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ratio-card {
  padding: 20px;
  background: var(--surface-2);
  border-radius: var(--r-lg);
}
.ratio-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-700);
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.ratio-card.is-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--bg);
  border: 1px dashed var(--border-2);
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.8;
  padding: 26px;
}

/* Partner accounts list */
.partner-item {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.partner-item + .partner-item { margin-top: 14px; }
.partner-item:hover { border-color: var(--blue-400); box-shadow: var(--sh-sm); }
.partner-item .top { display: flex; align-items: center; gap: 14px; }
.partner-item .meta { flex: 1; min-width: 0; }
.partner-item .name { font-size: 15px; font-weight: 700; color: var(--navy-900); }
.partner-item .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }

/* Service-type chip — shared by every dashboard table ------------------- */
.svc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 10px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.svc-chip svg { width: 15px; height: 15px; flex: none; }
.svc-chip.is-desalination { background: var(--cyan-050); color: var(--blue-600); }
.svc-chip.is-factory      { background: var(--cyan-100); color: var(--cyan-600); }
.svc-chip.is-fleet        { background: var(--blue-050); color: var(--blue-700); }

/* Service row in the admin settings panel ------------------------------ */
.service-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.service-row + .service-row { margin-top: 14px; }
.service-row:hover { border-color: var(--blue-400); box-shadow: var(--sh-sm); }
.service-row .ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--cyan-050);
  color: var(--blue-600);
}
.service-row .ico svg { width: 22px; height: 22px; }
.service-row .name { font-size: 14.5px; font-weight: 700; color: var(--navy-900); }
.service-row .price {
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: 800;
  color: var(--navy-900);
  white-space: nowrap;
}
.service-row .price .u {
  font-family: var(--font-ar);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  display: block;
}

/* ============================================================== FACTORY */

.offer-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color .18s var(--ease);
}
.offer-card + .offer-card { margin-top: 14px; }
.offer-card:hover { border-color: var(--blue-400); }
.offer-card .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.offer-card .title { font-size: 14.5px; font-weight: 700; color: var(--navy-900); }
.offer-card .tools { display: flex; gap: 4px; }
.offer-card .tools button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.offer-card .tools button:hover { background: var(--surface-2); color: var(--blue-600); }
.offer-card .tools button.is-danger:hover { background: var(--red-050); color: var(--red-600); }
.offer-card .tools svg { width: 16px; height: 16px; }

.promo-figure {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 16px;
}
.promo-figure img { width: 100%; height: 158px; object-fit: cover; }
.promo-figure figcaption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 30, 64, .9) 0%, rgba(0, 30, 64, .35) 55%, rgba(0, 30, 64, .1) 100%);
}

/* ================================================================ AGENT */

/* Hierarchy / distribution ladder */
.hierarchy {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.hierarchy::before {
  content: "";
  position: absolute;
  inset-inline: 8%;
  top: 62px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.level-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px 14px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-align: center;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.level-step:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.level-step .ico {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-3);
}
.level-step .ico svg { width: 25px; height: 25px; }
.level-step .name { font-size: 13.5px; font-weight: 600; color: var(--text-3); }

.level-step.is-current {
  border: 2px solid var(--cyan-500);
  box-shadow: 0 10px 26px rgba(0, 206, 209, .18);
}
.level-step.is-current .ico { background: var(--cyan-100); color: var(--cyan-600); }
.level-step.is-current .name { color: var(--navy-900); font-weight: 700; }
.level-step .flag {
  position: absolute;
  top: -11px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  padding: 3px 12px;
  border-radius: var(--r-pill);
  background: var(--cyan-500);
  color: var(--navy-900);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
body[dir="ltr"] .level-step .flag { transform: translateX(-50%); }

/* =========================================================== WHOLESALE */

.mode-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}
.mode-card .label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.mode-card .state { font-size: 13.5px; font-weight: 700; color: var(--text-3); min-width: 22px; }

.tier-note { font-size: 12.5px; color: var(--text-3); }

/* ============================================================== RETAIL */

body.page-retail { background: linear-gradient(180deg, #E9F5FB 0%, #F3F9FC 260px, var(--bg) 620px); }

/* Big navy commission hero */
.commission-hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background: var(--navy-900);
  border-radius: var(--r-xl);
  color: #fff;
  box-shadow: var(--sh-navy);
}
.commission-hero::after {
  content: "";
  position: absolute;
  inset-inline-end: -70px;
  top: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 206, 209, .22), transparent 68%);
  pointer-events: none;
}
.commission-hero .amount {
  font-family: var(--font-en);
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.commission-hero .amount .cur {
  font-family: var(--font-ar);
  font-size: 20px;
  font-weight: 700;
  color: var(--cyan-500);
  margin-inline-start: 8px;
  letter-spacing: 0;
}
.commission-hero .stats { display: flex; gap: 40px; flex-wrap: wrap; }
.commission-hero .stats .lbl { font-size: 12.5px; color: rgba(255, 255, 255, .68); }
.commission-hero .stats .val { font-family: var(--font-en); font-size: 16px; font-weight: 700; margin-top: 2px; }
.commission-hero .stats .val .u { font-family: var(--font-ar); font-size: 12.5px; font-weight: 600; margin-inline-start: 4px; }

/* Merchant level card with the teal edge */
.level-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-sm);
}
.level-card::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--cyan-500), var(--blue-600));
}
.level-card .watermark {
  position: absolute;
  inset-inline-start: -14px;
  bottom: -22px;
  width: 118px;
  height: 118px;
  color: var(--surface-2);
  pointer-events: none;
}
.level-card > * { position: relative; }

/* Supplier network */
.supplier-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.supplier-item + .supplier-item { margin-top: 12px; }
.supplier-item:hover { border-color: var(--blue-400); background: #FAFCFF; }
.supplier-item .ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--cyan-050);
  color: var(--blue-600);
}
.supplier-item .ico svg { width: 22px; height: 22px; }
.supplier-item .name { font-size: 14.5px; font-weight: 700; color: var(--navy-900); }

/* Quick re-order */
.quick-order { position: relative; overflow: hidden; }
.quick-order .watermark {
  position: absolute;
  inset-inline-start: -30px;
  top: 40%;
  width: 230px;
  height: 230px;
  color: var(--surface-2);
  opacity: .8;
  pointer-events: none;
}
.quick-order > * { position: relative; }
.product-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 16px;
}
.product-row + .product-row { border-top: 1px solid var(--border); }
.product-row img {
  width: 74px;
  height: 44px;
  flex: none;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.product-row .pname { flex: 1; min-width: 0; font-size: 14px; color: var(--text-2); }
.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 15px;
  border-radius: var(--r-pill);
  background: var(--blue-050);
  color: var(--blue-600);
  font-size: 12.5px;
  font-weight: 700;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.btn-add:hover { background: var(--blue-600); color: #fff; }

/* ============================================================ DELIVERY */

/* Shipment tracker */
.tracker { padding: 18px 8px 8px; }
.tracker-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tracker-line::before,
.tracker-line::after {
  content: "";
  position: absolute;
  top: 27px;
  height: 4px;
  border-radius: 4px;
}
.tracker-line::before { inset-inline: 16.6%; background: var(--surface-3); }
.tracker-line::after  { inset-inline-start: 16.6%; width: 33.4%; background: var(--cyan-500); }

.tracker-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.tracker-step .dot {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-3);
  border: 4px solid var(--surface);
}
.tracker-step .dot svg { width: 24px; height: 24px; }
.tracker-step .ttl { font-size: 14px; font-weight: 700; color: var(--text-3); }
.tracker-step .time { font-family: var(--font-en); font-size: 12.5px; color: var(--text-3); }

.tracker-step.is-done .dot { background: var(--cyan-500); color: #fff; }
.tracker-step.is-done .ttl { color: var(--navy-900); }
.tracker-step.is-active .dot {
  background: #fff;
  color: var(--cyan-600);
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 6px rgba(0, 206, 209, .16);
}
.tracker-step.is-active .ttl { color: var(--navy-900); }
.tracker-step.is-active .time { color: var(--cyan-600); font-family: var(--font-ar); }

/* Accent info boxes */
.info-box {
  padding: 16px 20px;
  background: var(--bg-tint);
  border-radius: var(--r-md);
  border-inline-start: 4px solid var(--blue-600);
}
.info-box .lbl { font-size: 12.5px; color: var(--text-3); }
.info-box .val { font-size: 15px; font-weight: 700; color: var(--navy-900); margin-top: 3px; }

/* Live map card */
.map-card {
  position: relative;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
  border-radius: var(--r-xl);
  overflow: hidden;
  color: #fff;
  background: var(--navy-900);
}
.map-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .55;
}
.map-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 30, 64, .94) 8%, rgba(0, 30, 64, .35) 62%, rgba(0, 30, 64, .1) 100%);
}
.map-card > * { position: relative; z-index: 1; }
.map-card h3 { font-size: 21px; font-weight: 700; }
.map-card p { font-size: 13.5px; color: rgba(255, 255, 255, .8); margin-top: 6px; max-width: 34ch; }

/* ============================================================= CONTACT */

body.page-contact { background: linear-gradient(180deg, #F1F8FC 0%, var(--bg) 420px); }

.contact-hero { text-align: center; padding-block: 46px 44px; }
.contact-hero h1 { font-size: 44px; font-weight: 700; color: var(--navy-900); letter-spacing: -.015em; }
.contact-hero p { max-width: 62ch; margin: 14px auto 0; font-size: 15px; color: var(--text-2); line-height: 1.85; }

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-block: 20px;
}
.contact-row + .contact-row { border-top: 1px solid var(--border); }
.contact-row .ico {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--navy-700);
  color: #fff;
}
.contact-row .ico svg { width: 22px; height: 22px; }
.contact-row .lbl { font-size: 13px; color: var(--text-3); }
.contact-row .val {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-700);
  margin-top: 2px;
  word-break: break-word;
}
.contact-row .val.is-sm { font-size: 14.5px; font-weight: 600; color: var(--text-2); line-height: 1.7; }

.map-figure {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--sh-sm);
}
.map-figure img { width: 100%; height: 300px; object-fit: cover; }
.map-figure figcaption {
  position: absolute;
  inset-inline: 16px;
  bottom: 16px;
  padding: 12px 18px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(6px);
  box-shadow: var(--sh-md);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-900);
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* ============================================================ SEO settings */
.panel-head.is-ruled { border-bottom: 1px solid var(--border); }
.panel-head.is-ruled + .panel-body { padding-top: 22px; }

.info-box.is-warn { border-inline-start-color: var(--amber-600); background: var(--amber-050); }

/* Tabs — scroll sideways on narrow screens instead of wrapping */
.seo-tabs { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seo-tabs::-webkit-scrollbar { display: none; }
.seo-tabs a { gap: 8px; }
.seo-tabs svg { width: 16px; height: 16px; flex: none; }

/* URLs read left-to-right but sit on the right edge of an Arabic page */
.seo-url { direction: ltr; unicode-bidi: isolate; text-align: right; word-break: break-all; }
body[dir="ltr"] .seo-url { text-align: left; }

/* Label with a live character counter */
.seo-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seo-label-row > label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.seo-count { font-size: 12px; font-weight: 700; color: var(--text-3); white-space: nowrap; }
.seo-count.is-good { color: var(--green-600); }
.seo-count.is-short, .seo-count.is-long { color: var(--amber-600); }
.seo-count.is-empty { color: var(--red-600); }

.seo-bar { height: 4px; margin-top: -3px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.seo-bar > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--border-2);
  transition: width .2s var(--ease), background .2s var(--ease);
}
.seo-bar.is-good > span { background: var(--green-600); }
.seo-bar.is-short > span, .seo-bar.is-long > span { background: var(--amber-600); }
.seo-bar.is-empty > span { background: var(--red-600); }

.seo-fill { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; }
.seo-color { padding: 6px; cursor: pointer; }

/* Share image: thumbnail at the real 1.91:1 share ratio + inputs */
.seo-image-field { display: flex; align-items: flex-start; gap: 20px; }
.seo-thumb {
  flex: none;
  width: 240px;
  aspect-ratio: 1200 / 630;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  overflow: hidden;
}
.seo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Pages table */
.seo-table tbody td { vertical-align: top; }
.seo-cell { min-width: 220px; max-width: 340px; }
.seo-clip {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 600;
}
.seo-clip.is-2 { -webkit-line-clamp: 2; color: var(--text-2); font-weight: 400; }

/* Single page editor: form + sticky previews */
.seo-edit { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.seo-edit > aside { position: sticky; top: calc(var(--header-h) + 16px); }

.seo-advanced { padding: 0 18px; border: 1px solid var(--border); border-radius: var(--r-lg); }
.seo-advanced[open] { padding-bottom: 20px; }
.seo-advanced summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
  cursor: pointer;
  list-style: none;
}
.seo-advanced summary::-webkit-details-marker { display: none; }
.seo-advanced summary svg { width: 18px; height: 18px; color: var(--text-3); }
.seo-advanced summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-inline-start: auto;
  border-bottom: 2px solid var(--text-3);
  border-inline-end: 2px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform .2s var(--ease);
}
.seo-advanced[open] summary::after { transform: rotate(-135deg); }

/* Google result preview */
.serp { font-family: Arial, var(--font-ar), sans-serif; }
.serp-site { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.serp-fav {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
}
.serp-fav img { width: 20px; height: 20px; object-fit: contain; }
.serp-name { font-size: 14px; line-height: 1.35; color: #202124; }
.serp-url { font-size: 12px; line-height: 1.35; color: #4D5156; }
.serp-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.35;
  color: #1A0DAB;
}
.serp-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.6;
  color: #4D5156;
}

/* Social share preview */
.og-card { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.og-img { aspect-ratio: 1200 / 630; background: var(--surface-2); }
.og-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.og-body { padding: 12px 14px; background: #F0F2F5; }
.og-domain { font-family: var(--font-en); font-size: 12px; color: #65676B; direction: ltr; text-align: right; }
.og-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: #050505;
}
.og-desc {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
  font-size: 13px;
  color: #65676B;
}

.seo-tips { display: grid; gap: 8px; margin: 10px 0 0; padding-inline-start: 18px; font-size: 13px; line-height: 1.75; color: var(--text-2); }

/* Code: JSON-LD output and code/robots editors */
.seo-code, .seo-code-input {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  direction: ltr;
  text-align: left;
  tab-size: 2;
}
.seo-code {
  margin: 0;
  padding: 16px 18px;
  max-height: 420px;
  overflow: auto;
  border-radius: var(--r-md);
  background: var(--navy-900);
  color: var(--blue-100);
  white-space: pre;
}
.seo-code-input { white-space: pre; overflow-wrap: normal; }

/* Articles tab: list search, editor toolbar, format help, SEO checklist */
.seo-search { width: 260px; min-height: 40px; padding-block: 8px; }
.article-title-input { font-size: 17px; font-weight: 600; }

.md-editor {
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.md-editor:focus-within { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(80, 149, 254, .15); }
.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.md-toolbar button {
  height: 32px;
  padding-inline: 10px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.md-toolbar button:hover { background: var(--surface-2); color: var(--navy-900); }
.md-sep { width: 1px; height: 20px; margin-inline: 4px; background: var(--border); }
.md-editor .md-input,
.md-editor .md-input:focus { min-height: 440px; border: 0; border-radius: 0; box-shadow: none; font-size: 15px; line-height: 2; }

.md-code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", var(--font-ar), monospace; font-size: .95em; color: var(--navy-900); }
.md-help { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.md-help summary { display: inline-block; font-weight: 600; color: var(--blue-600); cursor: pointer; }
.md-help-table { margin-top: 10px; font-size: 12.5px; }
.md-help-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.md-help-table td:first-child { width: 38%; white-space: nowrap; }

.seo-checks { display: grid; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.seo-checks li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.6; }
.seo-checks li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid var(--border-2);
  border-radius: 50%;
}
.seo-checks li.is-ok { color: var(--text); }
.seo-checks li.is-ok::before {
  border-color: var(--green-600);
  background: var(--green-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ========================================================= Responsive */
@media (max-width: 1180px) {
  .filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-bar .btn { grid-column: 1 / -1; }
}

@media (max-width: 1080px) {
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hierarchy { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hierarchy::before { display: none; }
}

@media (max-width: 980px) {
  .seo-edit { grid-template-columns: minmax(0, 1fr); }
  .seo-edit > aside { position: static; }
}

@media (max-width: 720px) {
  .filter-bar { grid-template-columns: minmax(0, 1fr); }
  .ratio-grid { grid-template-columns: minmax(0, 1fr); }
  .hierarchy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-hero h1 { font-size: 30px; }
  .contact-hero { padding-block: 30px 26px; }
  .commission-hero .amount { font-size: 34px; }
  .partner-item .actions { grid-template-columns: 1fr; }
  .tracker-step .dot { width: 46px; height: 46px; }
  .tracker-line::before, .tracker-line::after { top: 22px; }
  .export-strip, .date-range { width: 100%; }
  .date-range { justify-content: space-between; }
  .seo-image-field { flex-direction: column; }
  .seo-thumb { width: 100%; }
  .seo-search { width: 100%; }
  .md-editor .md-input, .md-editor .md-input:focus { min-height: 320px; }
}
