/* ════════════════════════════════════════════════════════════════
   دەروازەی گشتی (فۆرمەکانی خەڵک)، بەدواداچوون، بڵاوکردنەوە و
   داواکارییە هاتووەکان لای کارمەندان
   ════════════════════════════════════════════════════════════════ */

/* ───── سەرپەڕە و پێپەڕەی دەروازە ───── */

.foot-staff { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 700; }
.foot-staff:hover { color: var(--primary); }
.foot-staff .ic { width: 16px; height: 16px; }

.pub-hero .hero-in { padding-block: 40px 48px; }
.pub-title { font-size: clamp(2.1rem, 6.2vw, 3.6rem); line-height: 1.12; }
.pub-steps { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: none; }
.pub-steps li {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 10px;
  border: 1px solid rgb(255 255 255 / .2); border-radius: 14px;
  background: rgb(255 255 255 / .1); color: var(--hero-ink); font-weight: 700;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
html[dir="rtl"] .pub-steps li { padding: 9px 10px 9px 14px; }
.pub-steps b {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--hero-accent); color: var(--hero-bg-solid, #0b2e22); font-weight: 900;
}

/* کارتی بەشەکان لە دەروازەدا */
.pub-card.closed { opacity: .72; }
.pub-card.closed .sec-card-ic { filter: grayscale(.6); }
.pub-mini { flex: 1; display: grid; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.pub-mini li { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 1rem; font-weight: 700; }
.pub-mini .ic { width: 18px; height: 18px; flex: none; color: var(--c-ink, var(--c)); }

.pub-track {
  display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 16px 18px;
  border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--border)); border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface)); color: inherit; text-decoration: none;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.pub-track:hover { background: color-mix(in srgb, var(--primary) 11%, var(--surface)); border-style: solid; }
.pub-track-ic { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 15px; background: var(--primary); color: var(--primary-ink); }
.pub-track-ic .ic { width: 24px; height: 24px; }
.pub-track-body { flex: 1; min-width: 0; }
.pub-track-body b { display: block; font-size: 1.15rem; font-weight: 900; }
.pub-track-body small { color: var(--muted); font-size: .97rem; }
.pub-track > .ic { color: var(--primary); }
html[dir="ltr"] .pub-track > .ic { transform: scaleX(-1); }

/* کارتی فۆرمەکانی بەشێک */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.pf-card {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 14px; padding: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); color: inherit; text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.pf-card::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--c); }
.pf-card:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--border)); box-shadow: var(--shadow); }
.pf-ic {
  display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 16px;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--c-ink, var(--c));
}
.pf-ic .ic { width: 28px; height: 28px; }
.pf-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pf-body b { font-size: 1.2rem; font-weight: 900; line-height: 1.35; }
.pf-body > span { color: var(--muted); font-size: 1rem; line-height: 1.6; }
.pf-body small { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.pf-body small .ic { width: 15px; height: 15px; }
.pf-card .go { align-self: center; }

/* ───── فۆرمی گشتی ───── */

.pub-page { max-width: 920px; }
.pform { padding: 6px 24px 22px; }
.pform-group { padding: 20px 0; border-bottom: 1px dashed var(--border); }
.pform-group:last-of-type { border-bottom: 0; }
.pform-h { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; font-size: 1.3rem; font-weight: 900; }
.pform-h small { margin-inline-start: auto; color: var(--muted); font-size: .88rem; font-weight: 700; }
.pform-no {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px;
  background: var(--c); color: #fff; font-size: 1rem;
}
.pform-group > .hint { display: flex; align-items: center; gap: 6px; margin: -6px 0 12px; }
.pform-group > .hint .ic { width: 16px; height: 16px; flex: none; }
.hp-field { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.consent-field { margin-top: 16px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.consent-field.invalid { border-color: var(--danger); }
.check.consent { justify-content: flex-start; align-items: flex-start; margin: 0; text-align: start; line-height: 1.6; }
.check.consent input { margin-top: 3px; flex: none; }
.pform .form-error { margin: 14px 0 0; }
.pform-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pform-actions .btn-primary { min-width: 220px; }
@media (max-width: 640px) {
  .pform { padding: 2px 16px 18px; }
  .pform-actions .grow { display: none; }
  .pform-actions .btn-primary { order: -1; flex: 1 1 100%; }
  .pform-actions .btn-ghost { flex: 1; }
}

/* ───── گەیشتنی داواکاری ───── */

.pub-done { display: grid; place-items: center; }
.done-card { width: min(640px, 100%); padding: 34px 26px 26px; text-align: center; border-top: 5px solid var(--c); }
.done-check { display: inline-block; width: 92px; height: 92px; margin-bottom: 6px; color: var(--t-green-fg); }
.done-check svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done-check circle { stroke-dasharray: 150; stroke-dashoffset: 150; animation: done-draw .7s .1s ease-out forwards; fill: color-mix(in srgb, currentColor 10%, transparent); }
.done-check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: done-draw .45s .7s ease-out forwards; }
@keyframes done-draw { to { stroke-dashoffset: 0; } }
html[data-motion="off"] .done-check circle, html[data-motion="off"] .done-check path { animation: none; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .done-check circle, .done-check path { animation: none; stroke-dashoffset: 0; } }
.done-card h1 { margin: 0 0 6px; font-size: clamp(1.7rem, 5vw, 2.2rem); font-weight: 900; }
.done-text { margin: 0 auto 16px; max-width: 460px; color: var(--muted); }
.ref-box {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 22px;
  border: 2px dashed color-mix(in srgb, var(--c) 60%, var(--border)); border-radius: 18px;
  background: color-mix(in srgb, var(--c) 6%, var(--surface));
}
.ref-box small { color: var(--muted); font-weight: 700; }
.ref-code { font-size: clamp(1.8rem, 7vw, 2.5rem); font-weight: 900; letter-spacing: .12em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.done-qr { display: grid; place-items: center; margin: 16px auto 4px; width: 150px; min-height: 150px; padding: 8px; border-radius: 14px; background: #fff; color: #000; }
.done-qr:empty { display: none; }
.done-qr svg { width: 100%; height: auto; }
.done-card > .hint { display: flex; align-items: center; justify-content: center; gap: 6px; }
.done-card > .hint .ic { width: 16px; height: 16px; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.done-meta { margin: 16px 0 0; color: var(--muted); font-size: .88rem; }

/* ───── بەدواداچوون ───── */

.track-page { display: grid; gap: 18px; max-width: 760px; }
.track-form .btn-block { margin-top: 16px; }
.track-form .form-error { margin: 12px 0 0; }
.track-form input[name=ref] { letter-spacing: .08em; font-weight: 700; text-transform: uppercase; }
.track-form input[name=ref]::placeholder { letter-spacing: 0; font-weight: 400; text-transform: none; }
.recent-refs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.recent-refs .chip { display: inline-flex; align-items: center; gap: 6px; }
.recent-refs .ic { width: 15px; height: 15px; }

.track-card { padding: 20px; border-top: 4px solid var(--c); }
.tc-head { display: flex; align-items: center; gap: 12px; }
.tc-ic { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--c); color: #fff; }
.tc-ic .bic { width: 34px; height: 34px; }
.tc-head > div { flex: 1; min-width: 0; }
.tc-head b { display: block; font-size: 1.1rem; }
.tc-head small { color: var(--muted); }
.tc-ref { padding: 5px 10px; border-radius: 10px; background: var(--surface-3); font-weight: 900; letter-spacing: .08em; }
.tc-title { margin: 16px 0 0; font-size: 1.3rem; font-weight: 900; }

.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0 6px; padding: 0; list-style: none; }
.timeline li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--muted); font-size: .92rem; font-weight: 700; }
.timeline li::before {
  content: ''; position: absolute; top: 17px; inset-inline-end: 50%; width: 100%; height: 3px; border-radius: 3px;
  background: var(--border);
}
.timeline li:first-child::before { display: none; }
.timeline li.done::before, .timeline li.now::before { background: var(--c); }
.timeline .dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-3); border: 2px solid var(--border); color: var(--muted); font-weight: 900;
}
.timeline .dot .ic { width: 18px; height: 18px; }
.timeline li.done { color: var(--text); }
.timeline li.done .dot { background: var(--c); border-color: var(--c); color: #fff; }
.timeline li.now { color: var(--c-ink, var(--c)); }
.timeline li.now .dot { border-color: var(--c); color: var(--c-ink, var(--c)); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 18%, transparent); }
.timeline li.bad { color: var(--danger); }
.timeline li.bad .dot { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: none; }
.tl-label { max-width: 100%; overflow-wrap: anywhere; }

.tc-status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.tc-status p { margin: 0; flex: 1; min-width: 200px; }
.tc-reply { margin-top: 12px; padding: 14px; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--border)); background: color-mix(in srgb, var(--c) 5%, var(--surface)); }
.tc-reply.is-empty { border-style: dashed; border-color: var(--border); background: none; }
.tc-reply h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 1rem; }
.tc-reply h4 .ic { width: 18px; height: 18px; color: var(--c-ink, var(--c)); }
.tc-reply p { margin: 0; white-space: pre-wrap; line-height: 1.7; }
.tc-reply.is-empty p { color: var(--muted); }
.tc-dates { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 14px 0 0; color: var(--muted); font-size: .9rem; }
.tc-dates dt { font-weight: 700; }
.tc-dates dd { margin: 0; color: var(--text-2); }

/* ───── لینکی گشتی بۆ بڵاوکردنەوە ───── */

.share-strip {
  display: flex; align-items: center; gap: 18px; margin-bottom: 18px; padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--border)); border-radius: var(--radius);
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 8%, var(--surface)), var(--surface) 60%);
  box-shadow: var(--shadow-sm);
}
.ss-qr { display: grid; place-items: center; width: 118px; height: 118px; flex: none; padding: 6px; border-radius: 14px; background: #fff; color: #000; border: 1px solid var(--border); }
.ss-qr svg { width: 100%; height: 100%; }
.ss-body { flex: 1; min-width: 0; }
.ss-body h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.15rem; font-weight: 900; }
.ss-body h3 .ic { color: var(--c-ink, var(--c)); }
.ss-body > p { margin: 2px 0 10px; font-size: .95rem; }
.ss-link { display: flex; gap: 8px; }
.ss-link input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--surface-2); font-size: .95rem; font-weight: 700; color: var(--text);
}
.ss-link input:focus { outline: 0; border-color: var(--c); box-shadow: var(--focus); }
.ss-link .btn { flex: none; }
.ss-closed { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--t-amber-fg); font-size: .9rem; font-weight: 700; }
.ss-closed[hidden] { display: none; }
.ss-closed .ic { width: 16px; height: 16px; flex: none; }
.ss-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ss-actions .btn .ic { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .share-strip { flex-direction: column; align-items: stretch; }
  .ss-qr { align-self: center; }
  .ss-actions .btn { flex: 1 1 calc(50% - 6px); }
}
#modal .share-strip { margin: 0; border: 0; box-shadow: none; padding: 0; background: none; }

/* ماڵپەڕی گشتی (تاکە لینکی بڵاوکردنەوە) لە لاپەڕەی سەرەکی کارمەندان */
.pub-promo {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 18px 20px;
  border-radius: var(--radius); color: var(--hero-ink); text-decoration: none;
  background: var(--hero-bg); box-shadow: var(--shadow);
}
.pub-promo-ic { display: grid; place-items: center; width: 58px; height: 58px; flex: none; border-radius: 18px; background: rgb(255 255 255 / .14); color: var(--hero-accent); }
.pub-promo-ic .ic { width: 30px; height: 30px; }
.pub-promo-body { flex: 1; min-width: 0; }
.pub-promo-body b { display: block; font-size: 1.3rem; font-weight: 900; }
.pub-promo-body small { display: block; color: var(--hero-muted); font-size: 1rem; }
.pub-promo-link { display: inline-block; max-width: 100%; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--hero-accent); font-weight: 700; text-decoration: none; }
.pub-promo-link:hover { text-decoration: underline; }
.pub-promo-acts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.pub-promo-acts .btn { background: rgb(255 255 255 / .14); color: var(--hero-ink); border: 1px solid rgb(255 255 255 / .22); }
.pub-promo-acts .btn:hover { background: rgb(255 255 255 / .24); }
@media (max-width: 640px) { .pub-promo { flex-wrap: wrap; } .pub-promo-acts { flex-basis: 100%; } .pub-promo-acts .btn { flex: 1; } }

/* ───── داواکارییە هاتووەکان ───── */

.tab-new:not(:empty) { background: var(--t-blue-bg); color: var(--t-blue-fg); }
.tab.active .tab-new:not(:empty) { background: var(--t-blue-fg); color: var(--surface); }
.kpi.hot { border-color: color-mix(in srgb, var(--t-blue-fg) 45%, var(--border)); background: color-mix(in srgb, var(--t-blue-bg) 55%, var(--surface)); }
.kpi.hot b { color: var(--t-blue-fg); }
.tbl tbody tr.is-new td { font-weight: 700; }
.tbl tbody tr.is-new td.col-id { position: relative; }
.tbl tbody tr.is-new td.col-id::after {
  content: ''; position: absolute; top: 50%; inset-inline-start: 4px; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--t-blue-fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t-blue-fg) 22%, transparent);
}
@media (max-width: 760px) { .tbl tbody tr.is-new { border-inline-start: 4px solid var(--t-blue-fg); } .tbl tbody tr.is-new td.col-id::after { display: none; } }

.ib-note { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; }
.ib-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 820px) { .ib-grid { grid-template-columns: minmax(0, 1fr); } }
.ib-summary { margin: 0 0 12px; font-size: 1.35rem; font-weight: 900; line-height: 1.4; }
.ib-h { display: flex; align-items: center; gap: 7px; margin: 16px 0 8px; font-size: 1rem; font-weight: 900; color: var(--text-2); }
.ib-main > .ib-h:first-child, .ib-main > .ib-summary + .ib-h { margin-top: 0; }
.ib-h .ic { width: 18px; height: 18px; color: var(--c-ink, var(--c)); }
.ib-dl { display: grid; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.ib-row { display: grid; grid-template-columns: minmax(110px, 36%) minmax(0, 1fr); border-top: 1px solid var(--border); }
.ib-row:first-child { border-top: 0; }
.ib-row dt { padding: 9px 12px; background: var(--surface-2); color: var(--muted); font-size: .92rem; font-weight: 700; }
.ib-row dd { margin: 0; padding: 9px 12px; overflow-wrap: anywhere; }
.ib-dl.compact .ib-row { grid-template-columns: minmax(0, 1fr); }
.ib-dl.compact .ib-row dt { padding: 6px 12px 0; background: none; font-size: .85rem; }
.ib-dl.compact .ib-row dd { padding: 0 12px 8px; font-weight: 700; }
.pre { white-space: pre-wrap; line-height: 1.7; }
.ib-side { display: grid; gap: 12px; }
.ib-card { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.ib-card .ib-h { margin-top: 0; }
.ib-card .ib-dl { background: var(--surface); }
.ib-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ib-actions .btn { flex: 1 1 auto; }
.ib-linked, .ib-convert { display: grid; gap: 8px; padding: 12px; border-radius: var(--radius-sm); }
.ib-linked { grid-template-columns: auto minmax(0, 1fr); align-items: center; background: var(--t-green-bg); color: var(--t-green-fg); font-weight: 700; }
.ib-linked .btn { grid-column: 1 / -1; }
.ib-convert { border: 1px dashed color-mix(in srgb, var(--c) 45%, var(--border)); }
.ib-staff { margin-top: 18px; padding-top: 6px; border-top: 1px dashed var(--border); }
.ib-staff > .hint { display: flex; align-items: center; gap: 6px; margin: -2px 0 12px; }
.ib-staff > .hint .ic { width: 16px; height: 16px; flex: none; }
.ib-statusbar { margin-bottom: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.ib-statusbar .field > label { font-size: .92rem; color: var(--muted); }
.ib-statusbar .pill span { height: 40px; padding: 0 14px; font-size: .98rem; }

/* ───── بەڕێوەبەر: فۆرمە گشتییەکان ───── */

.pub-hub {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 10px; border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--border)); border-radius: 14px;
}
.pub-hub-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); }
.pub-hub .code-name small { display: block; margin-top: 2px; font-size: .88rem; }
.pub-hub-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pub-head .code-link { display: inline-flex; align-items: center; gap: 5px; }
.pub-head .code-link .ic { width: 15px; height: 15px; }
.panel > .hint { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.panel > .hint .ic { width: 16px; height: 16px; flex: none; }
.pub-rows { display: grid; gap: 10px; }
.pub-row { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.pub-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; }
.pub-head .badge { text-decoration: none; }
.pub-switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.pub-forms { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { display: inline-flex; align-items: center; cursor: pointer; padding: 0; overflow: visible; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px; border-radius: inherit; }
.chip-check span .ic { width: 16px; height: 16px; }
.chip-check input:checked + span { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 45%, transparent); }
.chip-check input:not(:checked) + span { text-decoration: line-through; opacity: .7; }
.chip-check input:focus-visible + span { box-shadow: var(--focus); }
.pub-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pub-notify {
  display: flex; align-items: center; gap: 8px; flex: 1 1 260px; height: 38px; padding: 0 10px;
  border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted);
}
.pub-notify:focus-within { border-color: var(--primary); box-shadow: var(--focus); }
.pub-notify input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .95rem; }
.pub-row .form-error { margin: 0; }
@media (max-width: 760px) {
  .pub-hub { grid-template-columns: 48px minmax(0, 1fr); }
  .pub-hub-acts { grid-column: 1 / -1; }
  .pub-hub .btn { flex: 1 1 auto; }
  .pub-head { grid-template-columns: 48px minmax(0, 1fr); }
  .pub-head .badge, .pub-switch { grid-column: 1 / -1; justify-self: start; }
  .pub-foot .btn { flex: 1 1 auto; }
}

@media print {
  .share-strip, .pub-track, .pub-promo { display: none !important; }
}

/* ───── پەیوەندی و تۆڕە کۆمەڵایەتییەکان ───── */

.sic { display: block; width: 100%; height: 100%; }
.soc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.soc-link {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  transition: transform .2s cubic-bezier(.3, 1.4, .5, 1), box-shadow .2s, filter .2s;
  box-shadow: 0 6px 14px -8px rgb(0 0 0 / .45);
}
.soc-link:hover, .soc-link:focus-visible { transform: translateY(-3px) scale(1.06); box-shadow: 0 12px 20px -10px rgb(0 0 0 / .5); outline: none; }
.soc-link:focus-visible { box-shadow: var(--focus); }
html[data-motion="off"] .soc-link { transition: none; }

.pub-social { margin-top: 28px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.ps-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 16px; }
.ps-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.45rem; font-weight: 900; }
.ps-head h2 .ic { color: var(--primary); }
.ps-head p { margin: 0; }
.ps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.ps-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
  color: inherit; text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.ps-item:hover, .ps-item:focus-visible { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); outline: none; }
.ps-item:focus-visible { box-shadow: var(--focus); }
.ps-ic { width: 46px; height: 46px; flex: none; border-radius: 50%; box-shadow: 0 6px 14px -8px rgb(0 0 0 / .45); }
.ps-txt { min-width: 0; display: grid; }
.ps-txt b { font-size: 1.05rem; font-weight: 900; }
.ps-txt small { overflow: hidden; color: var(--muted); font-size: .92rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
html[dir="rtl"] .ps-txt small[dir="ltr"] { text-align: right; }

/* پێپەڕەی دەروازە: ئایکۆنەکان و گۆڕینی زمان */
.foot.pub-foot .foot-in { row-gap: 14px; }
.pub-foot-top { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.pub-foot-langs .segmented { min-width: 300px; }
@media (max-width: 640px) {
  .pub-foot-top { justify-content: center; }
  .pub-foot-langs, .pub-foot-langs .segmented { width: 100%; min-width: 0; }
}

/* سێ زمانەکە لە سەرەوەی دەروازە */
.pub-hero-langs { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--hero-accent); }
.pub-hero-langs > .ic { width: 22px; height: 22px; flex: none; }
.pub-hero-langs .segmented { min-width: 290px; background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .22); }
.pub-hero-langs .segmented button { color: var(--hero-muted); }
.pub-hero-langs .segmented button.on { color: var(--text); }
@media (max-width: 480px) { .pub-hero-langs .segmented { min-width: 0; flex: 1; } }

/* ───── فۆنتەکان (بەشی ستایل) ───── */

.font-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.font-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 12px 12px;
  border: 2px solid var(--border); border-radius: calc(var(--radius) - 2px); background: var(--surface-2);
  color: inherit; text-align: center; cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.font-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.font-card.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.font-card .tick {
  position: absolute; top: 8px; inset-inline-end: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: var(--primary-ink); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s;
}
.font-card.on .tick { opacity: 1; transform: none; }
.font-card .tick .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.font-sample { display: grid; gap: 2px; }
.font-sample b { font-size: 1.45rem; line-height: 1.35; }
.font-sample span { color: var(--text-2); font-size: 1.02rem; line-height: 1.4; }
.font-card small { color: var(--muted); font-size: .92rem; font-weight: 900; font-family: 'Zain', sans-serif; }

/* ───── پەیڕەو، پلان و ڕاپۆرت (پوختەی بەش) ───── */

.docs-card { border-top: 3px solid var(--c, var(--primary)); }
.docs-card .agenda .ag-date { color: var(--c-ink, var(--c, var(--primary))); }
.docs-card .agenda .ag-date .ic { width: 22px; height: 22px; }
.docs-card .ag-meta { gap: 6px 10px; }
.docs-card .ag-meta .num { font-weight: 700; color: var(--text-2); }
.docs-missing { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 700; }
.docs-missing .ic { width: 15px; height: 15px; }
.docs-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.docs-actions .btn { flex: 1 1 auto; }
#rm-field[hidden] { display: none; }

/* ───── ماڵپەڕە دەرەکییەکان لە دەروازەی گشتی ───── */

.ext-card .sec-card-ic .ic { width: 34px; height: 34px; }
.ext-badge {
  position: absolute; top: 18px; inset-inline-end: 18px; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, var(--surface));
  color: var(--c-ink, var(--c)); font-size: .82rem; font-weight: 900;
}
.ext-badge .ic { width: 14px; height: 14px; }
.ext-card .state span[dir=ltr] { font-size: .85rem; }
.ov-ext .ov-ic .ic { width: 28px; height: 28px; }
.ov-ext .ov-tables li b { font-size: .88rem; color: var(--muted); font-weight: 700; }
.login .gate-host { margin: 10px 0 14px; text-align: center; }
#gate-box > .btn-ghost { margin-inline: auto; display: flex; }
