/* MONTAX — لوحة التحكم */
body.pn { min-height: 100vh; }
.pn-top { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: rgba(11,11,12,0.92); backdrop-filter: blur(10px); }
.pn-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.pn-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.pn-logo img { height: 24px; }
.pn-logo span { color: var(--muted); font-size: 14px; font-weight: 600; border-inline-start: 1px solid var(--line); padding-inline-start: 12px; }
.pn-top .r { display: flex; gap: 8px; align-items: center; }
.sbtn { font: inherit; font-size: 14px; font-weight: 600; color: var(--paper); background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.sbtn:hover { border-color: var(--muted); }
.sbtn:disabled { opacity: .35; cursor: default; }
.sbtn.red { background: var(--red); border-color: var(--red); color: #fff; }
.auth { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 30px 16px; }
.auth form { width: min(420px, 100%); }
.auth h1 { font-size: 28px; margin: 0; }
.auth p { color: var(--muted); margin: 0; }
.flash { padding: 12px 16px; border-radius: 12px; margin: 0 0 16px; font-weight: 600; }
.flash.ok { background: rgba(34,197,94,0.12); color: #6EE7A0; border: 1px solid rgba(34,197,94,0.35); }
.flash.bad { background: rgba(217,24,42,0.12); color: var(--red-2); border: 1px solid rgba(217,24,42,0.4); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.pn-body { display: grid; grid-template-columns: 230px 1fr; gap: 28px; padding: 26px 0 80px; align-items: start; }
.pn-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 4px; }
.pn-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; text-decoration: none; font-weight: 600; color: var(--muted); border: 1px solid transparent; }
.pn-nav a:hover { color: var(--paper); background: var(--ink-2); }
.pn-nav a.on { color: #fff; background: rgba(217,24,42,0.12); border-color: rgba(217,24,42,0.5); }
.pn-nav .ic { width: 22px; text-align: center; }
.pn-nav .new { margin-inline-start: auto; background: var(--red); color: #fff; border-radius: 999px; padding: 0 9px; font-size: 13px; }
.pn-main { min-width: 0; }
.pn-h { font-size: 28px; margin: 0 0 16px; }
.pn-h2 { font-size: 20px; margin: 30px 0 12px; }
.pn-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pn-row .pn-h { margin: 0; }
.pn-mut { color: var(--muted); font-size: 15px; margin: 0 0 16px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.st { border: 1px solid var(--line); border-radius: 16px; background: var(--ink-2); padding: 16px 18px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.st:hover { border-color: var(--muted); }
.st span { color: var(--muted); font-size: 14px; }
.st b { font-size: 34px; line-height: 1.2; }
.st small { color: var(--muted); font-size: 13px; }
.recent { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.rc { display: flex; align-items: center; gap: 14px; padding: 12px 16px; text-decoration: none; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rc:last-child { border-bottom: 0; }
.rc:hover { background: var(--ink-2); }
.rc .k { font-size: 13px; color: var(--muted); min-width: 120px; }
.rc .ph { color: var(--muted); font-size: 14px; }
.rc .when { margin-inline-start: auto; color: var(--muted); font-size: 13px; }

.chips-f { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips-f a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--muted); }
.chips-f a span { font-size: 12px; background: var(--ink-3); border-radius: 999px; padding: 0 8px; }
.chips-f a.on { background: var(--red); border-color: var(--red); color: #fff; }
.chips-f a.on span { background: rgba(255,255,255,.2); }

.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.tools input, .tools select, .lead textarea, .lead select { font: inherit; color: var(--paper); background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-height: 44px; }
.tools input { flex: 1 1 220px; }
.lead { border: 1px solid var(--line); border-radius: 16px; background: var(--ink-2); padding: 18px; margin-bottom: 12px; scroll-margin-top: 80px; }
.lead.is-new { border-color: rgba(217,24,42,0.6); }
.lead .hd { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.lead h3 { font-size: 20px; margin: 0; }
.when { color: var(--muted); font-size: 13px; }
.badge { font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.new { background: var(--red); color: #fff; border-color: var(--red); }
.badge.dl { background: rgba(37,211,102,0.14); color: #7EE2B8; border-color: rgba(37,211,102,0.4); }
.lead dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 14px 0; }
.lead dt { color: var(--muted); font-size: 14px; }
.lead dd { margin: 0; word-break: break-word; }
.lead .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }
.lead .acts form { display: contents; }
.lead textarea { width: 100%; min-height: 60px; resize: vertical; margin-top: 10px; }
.notef { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.empty-l { text-align: center; color: var(--muted); padding: 50px 10px; border: 1px dashed var(--line); border-radius: 16px; }

.sites { display: flex; flex-direction: column; gap: 10px; }
.site-row { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--ink-2); padding: 10px 12px; scroll-margin-top: 80px; }
.site-row.off { opacity: .55; }
.lw.mini { height: 64px; width: 110px; padding: 10px; flex: 0 0 110px; border-radius: 10px; }
.lw.mini img { max-height: 44px; max-width: 90%; }
.site-row .si { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.site-row .si span { color: var(--muted); font-size: 14px; }
.site-row .sa { display: flex; gap: 6px; flex-wrap: wrap; }
.site-form { margin-bottom: 20px; }
.site-form h2 { margin: 0; font-size: 22px; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ck { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 600; }
.ck input { width: 18px; height: 18px; }
.bgrow { display: flex; align-items: center; gap: 12px; }
.bgrow input[type=color] { width: 54px; height: 40px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--ink); }
.field input[type=file] { padding: 10px; }
.lw.prev { height: 140px; border-radius: 14px; }
.pwf { max-width: 460px; }
.pwf h2 { margin: 0; font-size: 22px; }

/* التصميمات */
.ad-drop { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; padding: 28px 20px; border: 2px dashed var(--line); border-radius: 18px; background: var(--ink-2); cursor: pointer; margin-bottom: 16px; transition: border-color .2s, background .2s; }
.ad-drop:hover, .ad-drop.on { border-color: var(--red); background: #160b0d; }
.ad-drop b { font-size: 19px; }
.ad-drop span { color: var(--muted); font-size: 15px; }
.ad-prog { width: min(420px, 100%); margin-top: 10px; }
.ad-prog[hidden] { display: none; }
.ad-prog i { display: block; height: 8px; width: 0; background: var(--red); border-radius: 8px; transition: width .2s; }
.ad-prog em { display: block; font-style: normal; color: var(--paper); margin-top: 8px; white-space: pre-line; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.ad-card { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--ink-2); display: flex; flex-direction: column; }
.ad-card.busy { opacity: .4; pointer-events: none; }
.ad-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #222; }
.ad-card figcaption { display: flex; align-items: center; gap: 5px; padding: 8px; flex-wrap: wrap; }
.ad-card button { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--ink); color: var(--paper); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.ad-card button:hover { border-color: var(--paper); }
.ad-card .ad-txt { flex: 1 1 100%; }
.ad-card .ad-del:hover { background: var(--red); border-color: var(--red); }
.ad-n { color: var(--muted); font-size: 13px; min-width: 22px; }

@media (max-width: 860px) {
  .pn-body { grid-template-columns: 1fr; gap: 14px; padding-top: 14px; }
  .pn-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .pn-nav a { flex: 0 0 auto; padding: 9px 12px; }
  .g2 { grid-template-columns: 1fr; }
  .site-row { flex-wrap: wrap; }
  .site-row .sa { width: 100%; }
}
@media (max-width: 560px) {
  .lead dl { grid-template-columns: 1fr; gap: 2px; } .lead dt { margin-top: 6px; }
  .pn-logo span { display: none; }
  .ad-grid { grid-template-columns: repeat(2, 1fr); }
}
