:root {
  --brand: #1d4ed8;
  --brand-strong: #173f8f;
  --accent: #b91c1c;
  --success: #047857;
  --warning: #b45309;
  --ink: #172033;
  --muted: #64748b;
  --soft: #eef4fb;
  --page: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f9fbfe;
  --line: #d9e2ec;
  --line-strong: #c7d2df;
  --shadow: 0 18px 48px rgba(23, 32, 51, .08);
  --site-font: Vazirmatn, IRANSans, "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--site-font);
  line-height: 1.7;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a, input, select, textarea { outline-color: var(--brand); }
button, .primary-button, .secondary-button, .ghost-button, .text-button {
  min-height: 40px;
  border-radius: 8px;
  padding: 8px 14px;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 800;
}
.primary-button { color: #fff; background: var(--brand); box-shadow: 0 10px 22px rgba(29, 78, 216, .18); }
.primary-button:hover { background: var(--brand-strong); }
.secondary-button { color: var(--brand-strong); background: #edf4ff; border: 1px solid #cfe0ff; }
.ghost-button { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.text-button { color: var(--muted); background: transparent; border: 1px solid transparent; }
.compact { min-height: 32px; padding: 5px 10px; font-size: .84rem; }
.wide { width: 100%; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.newsroom-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  direction: rtl;
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(246,248,251,.94)),
    repeating-linear-gradient(90deg, rgba(29,78,216,.035) 0 1px, transparent 1px 76px);
}
.newsroom-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: rgba(255,255,255,.92);
  border-left: 1px solid var(--line);
  box-shadow: 8px 0 36px rgba(23,32,51,.05);
  backdrop-filter: blur(16px);
}
.brand-lockup, .public-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 900;
}
.brand-mark-wrap {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #eef4fb);
  border: 1px solid var(--line);
}
.brand-lockup img, .public-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.brand-lockup strong, .public-brand strong { display: block; color: var(--ink); font-size: 1.08rem; line-height: 1.2; }
.brand-lockup small, .public-brand small { display: block; color: var(--muted); font-size: .78rem; }
.main-nav { display: grid; gap: 6px; overflow: auto; padding-inline-end: 2px; }
.main-nav a {
  display: grid;
  gap: 1px;
  min-height: 56px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: #334155;
}
.main-nav a span { font-weight: 900; }
.main-nav a small { color: var(--muted); font-size: .75rem; line-height: 1.4; }
.main-nav a:hover, .main-nav a:focus, .main-nav a.active {
  background: #edf4ff;
  border-color: #cfe0ff;
  color: var(--brand-strong);
}
.sidebar-footer { margin-top: auto; display: grid; gap: 8px; }
.sidebar-footer form { margin: 0; }
.newsroom-main { min-width: 0; }
.newsroom-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(240px, 420px) auto;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 12px 24px;
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.topbar-context strong { display: block; font-size: 1.1rem; }
.eyebrow, .section-kicker {
  color: var(--brand);
  font-weight: 900;
  font-size: .78rem;
}
.top-search input,
.filter-bar input,
.filter-bar select,
.field-row input,
.field-row select,
.field-row textarea,
.form-grid input,
.form-grid select,
.form-grid textarea,
.homepage-slot-card input,
.homepage-slot-card select {
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
}
.jalali-datetime-input {
  direction: ltr;
  text-align: right;
  unicode-bidi: plaintext;
}
textarea { resize: vertical; }
.top-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.field-row input:focus,
.field-row select:focus,
.field-row textarea:focus {
  border-color: #93b4f4;
  box-shadow: 0 0 0 3px rgba(29,78,216,.12);
}
.quick-actions, .heading-actions, .template-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.workspace {
  width: min(1480px, calc(100% - 40px));
  margin: 24px auto 56px;
}
.messages { display: grid; gap: 8px; margin-bottom: 16px; }
.message {
  margin: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #065f46;
}
.message.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.page-heading h1 {
  margin: 4px 0 4px;
  font-size: clamp(1.9rem, 3vw, 3.25rem);
  line-height: 1.25;
}
.page-heading p { margin: 0; color: var(--muted); max-width: 760px; }
.panel-block, .metric-card, .media-card, .template-card, .theme-card, .homepage-slot-card, .login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.panel-block { padding: 18px; overflow: hidden; }
.block-head, .theme-title-row, .media-title-row, .slot-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.block-head h2, .panel-block h2 { margin: 0; font-size: 1.08rem; }
.block-head a { color: var(--brand); font-weight: 900; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.operational-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric-card { padding: 16px; min-height: 128px; }
.metric-card span { color: var(--muted); font-weight: 800; font-size: .86rem; }
.metric-card strong { display: block; margin: 4px 0; font-size: 2.35rem; line-height: 1; color: var(--ink); }
.metric-card small { color: var(--muted); }
.workflow-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.workflow-step {
  min-height: 86px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 9px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.workflow-step span {
  grid-row: span 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf4ff;
  color: var(--brand);
  font-weight: 900;
}
.workflow-step small { color: var(--muted); }
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  align-items: start;
}
.compact-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wide-panel { grid-column: span 2; }
.priority-panel { border-color: #fecaca; }
.story-stack, .compact-list, .check-list, .timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.story-stack li, .compact-list li, .timeline-list li {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.compact-list li {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.story-stack a, .compact-list a, .table-title { font-weight: 900; color: var(--ink); }
.story-stack small, .compact-list span, .compact-list strong, .timeline-list span, .timeline-list small { color: var(--muted); font-size: .86rem; }
.empty-state {
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 14px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--brand-strong);
  background: #edf4ff;
  font-size: .78rem;
  font-weight: 900;
  width: fit-content;
}
.status-pill.urgent, .status-breaking, .priority-breaking { color: #991b1b; background: #fee2e2; }
.status-pill.live, .status-published, .permission-ok { color: #047857; background: #d1fae5; }
.status-in_review, .status-approved { color: #1d4ed8; background: #dbeafe; }
.status-returned, .permission-no { color: #92400e; background: #fef3c7; }
.priority-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 900;
}
.priority-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
}
.priority-important::before { background: var(--brand); }
.priority-urgent::before, .priority-breaking::before { background: var(--accent); }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.data-table th, .data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}
.data-table th {
  color: #475569;
  background: #f3f7fc;
  font-weight: 900;
}
.data-table td small, .permission-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.code-badge {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 900;
  direction: ltr;
}
.actions-cell {
  min-width: 260px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.actions-cell form { margin: 0; }
.actions-cell button {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.actions-cell .publish-action { background: var(--success); color: #fff; border-color: var(--success); }
.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 220px auto;
  gap: 10px;
  margin-bottom: 14px;
}
.status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.status-tabs a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: #475569;
  font-weight: 900;
}
.status-tabs a.active { color: var(--brand-strong); background: #edf4ff; border-color: #cfe0ff; }
.status-tabs small { color: var(--muted); }

.editor-heading { align-items: center; }
.editor-template-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.editor-template-strip a {
  min-width: 248px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.editor-template-strip img {
  width: 82px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}
.editor-template-strip a.active {
  border-color: #93b4f4;
  background: #edf4ff;
}
.editor-template-strip strong { display: block; line-height: 1.4; }
.editor-template-strip small { color: var(--muted); line-height: 1.45; }
.story-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px 360px;
  gap: 16px;
  align-items: start;
}
.editor-main, .editor-side, .editor-preview-column { min-width: 0; display: grid; gap: 16px; }
.editor-side, .editor-preview-column { align-content: start; }
.editor-fields { display: grid; gap: 12px; }
.field-row { display: grid; gap: 6px; margin: 0 0 12px; color: #334155; font-weight: 800; }
.field-row label, .field-row > span { font-weight: 900; color: #334155; }
.field-row ul { margin: 4px 0 0; color: #991b1b; }
.title-field input { min-height: 56px; font-size: 1.25rem; font-weight: 900; }
.body-field textarea, .rich-editor { min-height: 430px; line-height: 1.9; }
.inline-toolbar {
  position: sticky;
  bottom: 12px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}
.inline-toolbar button {
  min-height: 32px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
}
.template-blocks { margin-top: 18px; }
.template-block-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.template-block-grid article, .template-block-grid span {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 12px;
}
.template-block-grid article strong { display: block; margin-bottom: 4px; }
.template-block-grid article p { margin: 0; color: var(--muted); }
.template-block-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.workflow-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.workflow-mini span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  font-size: .82rem;
}
.workflow-mini span.active { color: var(--brand-strong); background: #edf4ff; border-color: #cfe0ff; }
.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.check-grid label, .slot-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  font-weight: 800;
}
.live-preview { position: sticky; top: 94px; }
.story-preview {
  display: grid;
  gap: 12px;
  min-height: 300px;
  align-content: center;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f3f7fc);
}
.story-preview h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.45rem); line-height: 1.35; }
.story-preview p { margin: 0; color: #475569; font-size: 1.02rem; }
.autosave-indicator { color: var(--muted); font-size: .82rem; font-weight: 800; }
.seo-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.seo-checklist span {
  border-radius: 8px;
  padding: 7px 9px;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 800;
  font-size: .82rem;
}
.media-insert-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 270px;
  overflow: auto;
}
.media-insert-list button {
  min-height: 74px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: start;
  white-space: normal;
}
.media-insert-list img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
}
.revision-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 16px; }
.compare-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.compare-column h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.45;
}
.compare-column.current { border-color: #cfe0ff; }

.media-bank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.media-card { overflow: hidden; }
.media-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: #e8eef6;
  color: var(--muted);
  font-weight: 900;
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-card-body { padding: 12px; }
.media-card h2 { margin: 0; font-size: 1rem; line-height: 1.5; }
.media-card p { margin: 8px 0; color: var(--muted); }
.meta-list {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: .84rem;
}
.meta-list div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}
.meta-list dt { color: #475569; font-weight: 900; }
.meta-list dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.media-inspector { position: sticky; top: 96px; }
.check-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: #475569;
}
.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) 320px;
  gap: 16px;
  align-items: start;
}
.dropzone {
  min-height: 330px;
  display: grid;
  place-items: center;
  text-align: center;
  align-content: center;
  border-style: dashed;
}
.dropzone strong { font-size: 1.35rem; }
.dropzone p { color: var(--muted); max-width: 420px; }
.dropzone input { max-width: 100%; }
.dropzone.drag-over { background: #edf4ff; border-color: #93b4f4; }

.homepage-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
.homepage-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.homepage-slot-card { padding: 14px; }
.drag-handle { color: var(--muted); cursor: grab; }
.slot-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.slot-controls input[type="number"] { min-height: 34px; padding: 5px 8px; }
.date-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.homepage-preview { position: sticky; top: 96px; }
.preview-phone {
  width: min(260px, 100%);
  margin: 0 auto 18px;
  border: 10px solid #172033;
  border-radius: 28px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.phone-breaking, .phone-hero, .phone-grid span, .phone-list span {
  border-radius: 8px;
  background: #edf4ff;
}
.phone-breaking { min-height: 28px; display: grid; place-items: center; color: var(--accent); font-weight: 900; }
.phone-hero { min-height: 118px; display: grid; place-items: center; color: var(--brand); font-weight: 900; }
.phone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.phone-grid span { min-height: 62px; }
.phone-list { display: grid; gap: 7px; }
.phone-list span { min-height: 26px; }

.template-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.template-card { padding: 0; display: grid; gap: 12px; overflow: hidden; }
.template-card > :not(.template-visual) { margin-inline: 16px; }
.template-card > :last-child { margin-bottom: 16px; }
.template-visual {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #e8eef6;
}
.template-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}
.template-card:hover .template-visual img { transform: scale(1.025); }
.template-card p { margin: 0; color: var(--muted); }
.template-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.template-card-head strong { font-size: 1.15rem; }
.starter-box {
  padding: 12px;
  border-radius: 8px;
  background: #f3f7fc;
  border: 1px solid var(--line);
}
.starter-box small { color: var(--brand); font-weight: 900; }
.starter-box h2 { margin: 5px 0; font-size: 1rem; line-height: 1.5; }

.permission-ok, .permission-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 900;
  font-size: .82rem;
}

.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.theme-card { overflow: hidden; }
.theme-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--theme-primary) 14%, #ffffff), #ffffff);
}
.theme-shot {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
}
.theme-shot img { width: 100%; height: 100%; object-fit: cover; }
.theme-shot span {
  position: absolute;
  inset-inline-start: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #fff;
  color: var(--theme-primary);
  font-weight: 900;
}
.theme-preview-copy strong { display: block; line-height: 1.5; }
.theme-preview-copy small { color: var(--muted); }
.theme-card-body { padding: 14px; }
.swatches { display: flex; gap: 6px; margin: 12px 0; }
.swatches i { width: 24px; height: 24px; border-radius: 999px; border: 1px solid var(--line); }

.ticket-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}
.ticket-thread { display: grid; gap: 12px; }
.ticket-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.ticket-message.internal { background: #fffbeb; border-color: #fde68a; }
.ticket-message time { display: block; color: var(--muted); font-size: .82rem; }
.ticket-message p { margin-bottom: 0; }
.narrow-form { max-width: 760px; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffffff, #eef4fb);
  padding: 24px;
}
.login-card {
  width: min(460px, 100%);
  padding: 28px;
  text-align: center;
}
.login-card img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  margin: 0 auto 10px;
}
.login-card h1 { margin: 6px 0 18px; font-size: 1.55rem; }
.login-card .field-row { text-align: start; }

.public-site {
  background:
    linear-gradient(180deg, #f8fafc 0, #ffffff 280px);
  color: var(--ink);
  font-family: var(--site-font);
}
.site-header {
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.public-brand img { width: 56px; height: 56px; object-fit: contain; }
.site-nav, .language-switch { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.site-nav a, .language-switch a {
  color: #334155;
  font-weight: 900;
  border-radius: 999px;
  padding: 4px 2px;
}
.site-nav a:hover, .language-switch a:hover { color: var(--brand); }
.language-switch a { color: var(--brand); }
.preview-banner { background: #fffbeb; color: #92400e; padding: 10px 16px; text-align: center; border-bottom: 1px solid #fde68a; }
.public-wrap { width: min(1260px, calc(100% - 32px)); margin: 20px auto 60px; }
.news-rail {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: auto;
  border-block: 1px solid var(--line);
  padding: 10px 0;
  margin-bottom: 22px;
  white-space: nowrap;
}
.news-rail span {
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 900;
}
.news-rail a { font-weight: 900; color: #334155; }
.hero-news { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: stretch; }
.hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 520px;
  align-items: end;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #101827;
  box-shadow: 0 28px 60px rgba(15, 23, 42, .16);
}
.hero-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, .84), rgba(15, 23, 42, .18) 62%, rgba(15, 23, 42, .06));
}
.hero-card > div {
  position: relative;
  z-index: 1;
  max-width: 650px;
  padding: 34px;
  color: #fff;
}
.section-label { display: inline-flex; color: var(--brand); font-weight: 900; margin-bottom: 8px; }
.hero-card .section-label { color: #fde68a; }
.hero-card h1 { margin: 0; font-size: clamp(2rem, 4vw, 4rem); line-height: 1.25; }
.hero-card p { font-size: 1.12rem; color: rgba(255,255,255,.86); }
.story-meta { display: flex; flex-wrap: wrap; gap: 14px; color: #64748b; font-weight: 900; }
.hero-card .story-meta { color: rgba(255,255,255,.78); }
.breaking-panel { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 12px; align-content: start; background: #fff; }
.editor-pick-link {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  font-weight: 900;
}
.editor-pick-link img {
  width: 92px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}
.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.news-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}
.news-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 0; }
.news-card span, .news-card h2, .news-card p { margin-inline: 14px; }
.news-card span { margin-top: 12px; }
.news-card p { margin-bottom: 14px; }
.news-card span, .latest-list time { color: var(--brand); font-weight: 900; font-size: .86rem; }
.news-card h2 { margin: 5px 14px; font-size: 1.28rem; line-height: 1.45; }
.news-card p { color: #64748b; margin: 0 14px 14px; }
.latest-section { margin-top: 34px; }
.section-head { display: flex; justify-content: space-between; gap: 14px; border-top: 3px solid var(--brand); padding-top: 12px; }
.section-head h2 { margin: 0; color: var(--ink); }
.section-head span { color: var(--muted); }
.latest-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.latest-list article {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.latest-thumb img {
  width: 132px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
}
.latest-list h3 { margin: 4px 0; font-size: 1.12rem; }
.latest-list p { margin: 0; color: #64748b; }
.article-wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 42px;
}
.article-body h1 { margin: 4px 0 12px; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.25; }
.subtitle { color: var(--brand); font-weight: 900; }
.lede { font-size: 1.2rem; color: #475569; }
.article-body figure { margin: 26px 0; }
.article-body figure img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 8px; }
.article-body figcaption { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.body-text { font-size: 1.08rem; }
.article-sidebar { border-inline-start: 1px solid var(--line); padding-inline-start: 18px; }
.article-sidebar h2 { margin-top: 0; }
.article-sidebar a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 900; }

@media (max-width: 1320px) {
  .operational-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .story-editor-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .editor-preview-column { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  .newsroom-shell { grid-template-columns: 1fr; }
  .newsroom-sidebar { position: static; height: auto; }
  .main-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .sidebar-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .newsroom-topbar { grid-template-columns: 1fr; }
  .quick-actions { justify-content: flex-start; }
  .workflow-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .story-editor-layout, .media-bank-layout, .homepage-builder, .upload-layout, .ticket-layout { grid-template-columns: 1fr; }
  .editor-preview-column { grid-template-columns: 1fr; }
  .media-inspector, .homepage-preview, .live-preview { position: static; }
  .template-gallery, .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-news, .article-wrap { grid-template-columns: 1fr; }
  .hero-card { min-height: 420px; }
  .hero-card img { height: 100%; max-height: none; }
  .article-sidebar { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); padding-top: 18px; }
}

@media (max-width: 760px) {
  .workspace, .public-wrap, .site-header, .article-wrap { width: min(100% - 20px, 100%); }
  .newsroom-topbar, .workspace { margin-top: 0; }
  .newsroom-sidebar { padding: 14px; }
  .brand-lockup { align-items: center; }
  .main-nav, .metric-grid, .operational-grid, .workflow-strip, .dashboard-grid, .compact-dashboard, .revision-grid, .compare-layout, .homepage-slots, .media-grid, .template-gallery, .theme-grid, .featured-grid, .latest-list, .site-header, .filter-bar {
    grid-template-columns: 1fr;
  }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .quick-actions a, .heading-actions a, .heading-actions button { flex: 1 1 auto; }
  .panel-block { padding: 14px; }
  .wide-panel { grid-column: auto; }
  .data-table { min-width: 760px; }
  .actions-cell { min-width: 240px; }
  .check-grid, .slot-controls, .date-grid, .template-block-grid, .template-block-grid.compact, .seo-checklist, .media-insert-list {
    grid-template-columns: 1fr;
  }
  .site-header { padding: 12px 0; }
  .hero-card h1, .article-body h1 { font-size: 2rem; }
  .hero-card > div { padding: 22px; }
  .latest-list article { grid-template-columns: 96px minmax(0, 1fr); }
  .latest-thumb img { width: 96px; }
  .public-brand { align-items: center; }
}

/* Enterprise Persian newsroom composer */
:root {
  --editor-font: Vazirmatn, Peyda, IRANSansX, IRANSans, "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
  --editor-serif: Peyda, Vazirmatn, "Noto Naskh Arabic", Tahoma, serif;
  --editor-bg: #f3f6fa;
  --editor-ink: #111827;
  --editor-muted: #5f6f85;
  --editor-line: #d8e0ea;
  --editor-line-strong: #b8c5d4;
  --editor-surface: #ffffff;
  --editor-surface-soft: #f8fafc;
  --editor-blue: #2457a6;
  --editor-blue-soft: #e8f0ff;
  --editor-red: #b42318;
  --editor-green: #087443;
  --editor-amber: #a15c07;
  --editor-shadow: 0 18px 52px rgba(17, 24, 39, .09);
  --editor-shadow-soft: 0 10px 28px rgba(17, 24, 39, .07);
}
.workspace:has(.composer-shell) {
  width: min(1940px, calc(100% - 24px));
  margin-top: 12px;
}
body.newsroom-shell:has(.composer-shell) {
  grid-template-columns: 1fr;
  direction: ltr;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(243,246,250,.96)),
    repeating-linear-gradient(90deg, rgba(36,87,166,.032) 0 1px, transparent 1px 92px);
}
body.newsroom-shell:has(.composer-shell) .newsroom-main,
body.newsroom-shell:has(.composer-shell) .composer-shell {
  direction: rtl;
}
body.newsroom-shell:has(.composer-shell) > .newsroom-sidebar,
body.newsroom-shell:has(.composer-shell) .newsroom-main > .newsroom-topbar {
  display: none;
}
.composer-shell {
  display: block;
  min-width: 0;
  font-family: var(--editor-font);
  color: var(--editor-ink);
}
.composer-shell button,
.composer-shell input,
.composer-shell select,
.composer-shell textarea {
  min-width: 0;
  font-family: var(--editor-font);
}
.composer-topbar {
  position: sticky;
  top: 12px;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(420px, 1.5fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(184, 197, 212, .8);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--editor-shadow-soft);
  backdrop-filter: blur(18px);
}
.composer-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  color: var(--editor-muted);
  font-weight: 850;
  font-size: .84rem;
}
.composer-breadcrumb a { color: var(--editor-blue); }
.composer-breadcrumb strong {
  color: var(--editor-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.composer-breadcrumb span::after {
  content: "/";
  margin-inline-start: 8px;
  color: #9aa8b8;
}
.composer-status-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.story-status-badge,
.composer-chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}
.story-status-badge {
  background: var(--editor-blue-soft);
  color: #174080;
}
.status-published,
.story-status-badge.status-published {
  background: #dff7eb;
  color: var(--editor-green);
}
.story-status-badge.status-returned,
.story-status-badge.status-suspended {
  background: #fff1d6;
  color: var(--editor-amber);
}
.lock-chip {
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}
.score-chip b { font-size: .92rem; }
.autosave-indicator.pulse,
.composer-chip.pulse {
  animation: autosavePulse 900ms ease;
}
@keyframes autosavePulse {
  0% { box-shadow: 0 0 0 0 rgba(36, 87, 166, .24); }
  100% { box-shadow: 0 0 0 11px rgba(36, 87, 166, 0); }
}
.composer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.danger-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: var(--editor-red);
  padding: 8px 12px;
  font-weight: 900;
}
.collab-avatars {
  display: inline-flex;
  align-items: center;
  direction: ltr;
  padding-inline: 4px;
}
.collab-avatars span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin-inline-start: -6px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #172033;
  color: #fff;
  font-size: .75rem;
  font-weight: 900;
}
.collab-avatars span:nth-child(2) { background: var(--editor-blue); }
.collab-avatars span:nth-child(3) { background: var(--editor-green); }
.composer-grid {
  direction: ltr;
  display: grid;
  grid-template-columns: 270px minmax(640px, 1fr) 380px;
  gap: 14px;
  align-items: start;
}
.editorial-sidebar,
.writing-studio,
.inspector-rail {
  direction: rtl;
  min-width: 0;
}
.editorial-sidebar,
.inspector-rail {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.editorial-card,
.inspector-card,
.utility-panel,
.writing-canvas,
.block-system-panel,
.split-preview-panel {
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--editor-shadow-soft);
}
.editorial-card,
.inspector-card,
.utility-panel {
  padding: 13px;
}
.micro-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.micro-head strong {
  color: var(--editor-ink);
  font-size: .98rem;
  font-weight: 950;
}
.micro-head span,
.micro-head a,
.muted-copy {
  color: var(--editor-muted);
  font-size: .8rem;
  font-weight: 850;
}
.newsroom-nav-card {
  display: grid;
  gap: 7px;
}
.newsroom-nav-card > strong { margin-bottom: 3px; }
.newsroom-nav-card a,
.recent-story-list a,
.assistant-card button,
.related-suggestions button,
.command-list button {
  display: grid;
  min-height: 36px;
  align-items: center;
  border-radius: 7px;
  border: 1px solid var(--editor-line);
  background: var(--editor-surface-soft);
  color: var(--editor-ink);
  padding: 7px 9px;
  text-align: start;
  white-space: normal;
  font-weight: 850;
}
.newsroom-nav-card a:hover,
.recent-story-list a:hover,
.assistant-card button:hover,
.related-suggestions button:hover,
.command-list button:hover {
  border-color: #aac0df;
  background: var(--editor-blue-soft);
}
.template-switcher {
  display: grid;
  gap: 7px;
  max-height: 360px;
  overflow: auto;
}
.template-switcher a {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 56px;
  padding: 7px;
  border-radius: 8px;
  border: 1px solid var(--editor-line);
  background: #fff;
  font-weight: 900;
}
.template-switcher a.active {
  border-color: #8fb0df;
  background: var(--editor-blue-soft);
  color: #173f8f;
}
.template-switcher img {
  width: 52px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}
.queue-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.queue-list span,
.analytics-grid span {
  display: grid;
  gap: 1px;
  min-height: 58px;
  padding: 9px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--editor-line);
  color: var(--editor-muted);
  font-size: .78rem;
  font-weight: 850;
}
.queue-list b,
.analytics-grid b {
  color: var(--editor-ink);
  font-size: 1.25rem;
  line-height: 1;
}
.recent-story-list {
  display: grid;
  gap: 7px;
}
.recent-story-list small {
  color: var(--editor-muted);
  font-size: .76rem;
  font-weight: 800;
}
.assistant-card {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}
.assistant-card button + button { margin-top: 7px; }
.alert-card {
  border-color: #f9d8a7;
  background: #fffaf0;
}
.alert-card p {
  margin: 6px 0 0;
  color: #7a4b08;
  font-size: .86rem;
}
.writing-studio {
  display: grid;
  gap: 14px;
}
.writing-command-bar {
  position: sticky;
  top: 100px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(184, 197, 212, .72);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--editor-shadow-soft);
  backdrop-filter: blur(16px);
}
.mode-segments,
.command-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.mode-segments button,
.command-actions button,
.editor-floating-toolbar button,
.newsroom-block-grid button {
  min-height: 34px;
  border: 1px solid var(--editor-line);
  background: #fff;
  color: #334155;
  border-radius: 7px;
  padding: 6px 10px;
  font-weight: 900;
}
.mode-segments button.active,
.command-actions button:hover,
.editor-floating-toolbar button:hover,
.newsroom-block-grid button:hover {
  border-color: #9ab5dd;
  background: var(--editor-blue-soft);
  color: #173f8f;
}
.writing-canvas {
  position: relative;
  padding: clamp(18px, 3vw, 38px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,251,253,.98)),
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(216,224,234,.28) 38px 39px);
}
.story-language-row {
  display: grid;
  grid-template-columns: minmax(120px, .7fr) minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}
.story-language-row label,
.editor-field,
.compact-field {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  color: #334155;
  font-weight: 900;
}
.story-language-row input,
.story-language-row select,
.editor-field input,
.editor-field textarea,
.compact-field input,
.compact-field select,
.compact-field textarea {
  width: 100%;
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  background: #fff;
  color: var(--editor-ink);
  padding: 10px 12px;
  line-height: 1.8;
  font-weight: 760;
}
.editor-field input:focus,
.editor-field textarea:focus,
.compact-field input:focus,
.compact-field select:focus,
.compact-field textarea:focus,
.story-language-row input:focus,
.story-language-row select:focus {
  border-color: #8fb0df;
  box-shadow: 0 0 0 3px rgba(36, 87, 166, .13);
}
.highlight-toggle {
  min-height: 43px;
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  background: #fff;
  white-space: nowrap;
}
.eyebrow-field input {
  min-height: 46px;
  color: var(--editor-blue);
  font-size: 1rem;
  font-weight: 950;
}
.headline-field input {
  min-height: 96px;
  border: 0;
  border-bottom: 2px solid #d9e2ec;
  border-radius: 0;
  padding-inline: 0;
  background: transparent;
  color: #0f172a;
  font-family: var(--editor-serif);
  font-size: clamp(2.1rem, 4.2vw, 4.65rem);
  font-weight: 950;
  line-height: 1.18;
}
.headline-field input:focus {
  border-color: #2457a6;
  box-shadow: none;
}
.mobile-headline-field input {
  min-height: 46px;
  background: #f8fafc;
}
.lede-field textarea {
  min-height: 122px;
  color: #243449;
  font-size: clamp(1.1rem, 1.45vw, 1.34rem);
  font-weight: 780;
  line-height: 2;
}
.summary-field textarea {
  min-height: 88px;
  font-weight: 560;
}
.premium-body-field textarea {
  min-height: 680px;
  padding: 26px clamp(16px, 3vw, 34px);
  background: #fff;
  color: #182235;
  font-size: clamp(1.05rem, 1.18vw, 1.22rem);
  font-weight: 520;
  line-height: 2.18;
  border-color: #d4dde8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.premium-body-field textarea::placeholder,
.editor-field input::placeholder,
.compact-field textarea::placeholder {
  color: #94a3b8;
}
.editor-floating-toolbar {
  position: sticky;
  top: 158px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  padding: 8px;
  margin: 2px 0 12px;
  border: 1px solid rgba(184, 197, 212, .8);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--editor-shadow-soft);
  backdrop-filter: blur(14px);
}
.writing-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.writing-metrics span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--editor-line);
  background: #f8fafc;
  color: var(--editor-muted);
  font-size: .84rem;
  font-weight: 850;
}
.writing-metrics b {
  color: var(--editor-ink);
  font-size: 1.05rem;
}
.persian-quality-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.persian-quality-strip span {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  background: #fff;
  color: var(--editor-muted);
  font-size: .8rem;
  font-weight: 850;
}
.block-system-panel {
  padding: 14px;
}
.newsroom-block-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.newsroom-block-grid button {
  min-height: 54px;
  justify-content: flex-start;
  white-space: normal;
  text-align: start;
  font-size: .8rem;
}
.template-blueprint-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(184, 197, 212, .74);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,249,253,.96));
  box-shadow: var(--editor-shadow-soft);
}
.template-blueprint-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.template-blueprint-hero img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--editor-line);
}
.template-blueprint-hero h2 {
  margin: 4px 0 8px;
  color: var(--editor-ink);
  font-size: 1.25rem;
  line-height: 1.45;
}
.template-blueprint-hero p {
  margin: 0;
  color: var(--editor-muted);
  line-height: 1.9;
  font-size: .92rem;
}
.template-blueprint-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.template-blueprint-tags span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid #cbd8ea;
  background: #fff;
  color: #31506f;
  font-size: .78rem;
  font-weight: 900;
}
.template-block-sequence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.template-block-sequence article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px 10px;
  padding: 11px;
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  background: #fff;
}
.template-block-sequence article span {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--editor-blue-soft);
  color: #173f8f;
  font-weight: 950;
}
.template-block-sequence article strong {
  color: var(--editor-ink);
  font-size: .88rem;
}
.template-block-sequence article p {
  margin: 0;
  color: var(--editor-muted);
  font-size: .8rem;
  line-height: 1.75;
}
.split-preview-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px 320px;
  gap: 14px;
  padding: 16px;
}
.split-preview-panel[hidden] { display: none; }
.desktop-preview {
  min-height: 360px;
  padding: clamp(18px, 3vw, 34px);
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--editor-line);
}
.preview-kicker {
  color: var(--editor-red);
  font-weight: 950;
}
.desktop-preview h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.9rem, 3vw, 3.4rem);
  line-height: 1.28;
}
.desktop-preview p,
.desktop-preview blockquote {
  color: #334155;
  font-size: 1.04rem;
  line-height: 2;
}
.desktop-preview h3,
.desktop-preview h4 { margin: 18px 0 8px; }
.preview-block-token {
  margin: 10px 0;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid var(--editor-line);
  padding: 9px 11px;
  color: var(--editor-blue);
  font-weight: 900;
}
.mobile-preview-frame {
  width: 100%;
  min-height: 500px;
  align-self: start;
  padding: 18px 15px;
  border: 9px solid #111827;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--editor-shadow);
}
.mobile-preview-frame span {
  color: var(--editor-red);
  font-weight: 950;
}
.mobile-preview-frame h3 {
  margin: 18px 0 12px;
  font-size: 1.55rem;
  line-height: 1.45;
}
.mobile-preview-frame p {
  color: #475569;
  line-height: 1.9;
}
.homepage-preview-frame {
  display: grid;
  gap: 10px;
  min-height: 500px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--editor-line);
  background:
    linear-gradient(180deg, #ffffff, #f8fafc),
    repeating-linear-gradient(90deg, rgba(36,87,166,.04) 0 1px, transparent 1px 72px);
}
.homepage-preview-hero {
  display: grid;
  align-content: end;
  min-height: 330px;
  padding: 18px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
}
.homepage-preview-hero span,
.homepage-preview-slots strong {
  color: #ef4444;
  font-weight: 950;
}
.homepage-preview-hero h3 {
  margin: 10px 0;
  font-size: 1.55rem;
  line-height: 1.45;
}
.homepage-preview-hero p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.9;
}
.homepage-preview-slots {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  background: #fff;
}
.homepage-preview-slots span {
  color: #334155;
  font-weight: 850;
}
.preview-newsroom-block {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}
.preview-newsroom-block strong {
  color: var(--editor-blue);
  font-size: .86rem;
}
.preview-newsroom-block span {
  color: #334155;
  line-height: 1.8;
}
.preview-newsroom-block.block-breaking,
.preview-newsroom-block.block-warning {
  border-color: #fecaca;
  background: #fff1f2;
}
.preview-newsroom-block.block-breaking strong,
.preview-newsroom-block.block-warning strong { color: var(--editor-red); }
.preview-newsroom-block.block-fact-check,
.preview-newsroom-block.block-source-reference,
.preview-newsroom-block.block-references {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.inspector-rail {
  gap: 12px;
}
.seo-score-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.score-ring {
  --score: 0%;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #fff 0 57%, transparent 58%),
    conic-gradient(var(--editor-green) var(--score), #e2e8f0 0);
  color: var(--editor-ink);
  font-size: 1.35rem;
  font-weight: 950;
}
.seo-score-card p {
  margin: 4px 0 0;
  color: var(--editor-muted);
  font-size: .86rem;
}
.workflow-stepper {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  counter-reset: workflow;
}
.workflow-stepper span {
  counter-increment: workflow;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--editor-line);
  background: #fff;
  color: var(--editor-muted);
  font-weight: 900;
  font-size: .82rem;
}
.workflow-stepper span::before {
  content: counter(workflow);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f1f5f9;
  color: #64748b;
}
.workflow-stepper span.active {
  border-color: #9ab5dd;
  background: var(--editor-blue-soft);
  color: #173f8f;
}
.workflow-stepper span.active::before {
  background: var(--editor-blue);
  color: #fff;
}
.compact-field label,
.compact-field > span {
  color: #334155;
  font-size: .82rem;
  font-weight: 950;
}
.compact-field select,
.compact-field input,
.compact-field textarea {
  min-height: 40px;
  font-size: .9rem;
}
.compact-field textarea { min-height: 78px; }
.seo-suggestions {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}
.seo-suggestions span,
.publish-checklist span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fff7ed;
  color: #8a4b05;
  font-size: .82rem;
  font-weight: 850;
}
.seo-suggestions span::before,
.publish-checklist span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}
.headline-analysis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.headline-analysis div {
  min-height: 58px;
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  background: #f8fafc;
}
.headline-analysis span {
  color: var(--editor-muted);
  font-size: .76rem;
  font-weight: 850;
}
.headline-analysis strong {
  color: var(--editor-ink);
  font-size: .92rem;
  line-height: 1.5;
}
.metadata-preview-stack {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.metadata-preview-card {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  background: #fff;
}
.metadata-preview-card span {
  color: var(--editor-muted);
  font-size: .76rem;
  font-weight: 900;
}
.metadata-preview-card strong {
  color: #173f8f;
  line-height: 1.5;
}
.metadata-preview-card p {
  margin: 0;
  color: #475569;
  font-size: .84rem;
  line-height: 1.8;
}
.publish-checklist span.done {
  background: #ecfdf5;
  color: var(--editor-green);
}
.toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}
.toggle-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px;
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: .78rem;
  font-weight: 900;
}
.media-dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 112px;
  margin-bottom: 10px;
  border: 1px dashed var(--editor-line-strong);
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.media-dropzone.is-dragging,
.media-dropzone.is-uploading {
  border-color: var(--editor-blue);
  background: var(--editor-blue-soft);
  transform: translateY(-1px);
}
.quick-upload-meta {
  width: min(100%, 330px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.quick-upload-meta input,
.media-search-field input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  background: #fff;
  color: var(--editor-ink);
  padding: 6px 9px;
  font-size: .82rem;
}
.media-dropzone button {
  min-height: 34px;
  border: 1px solid #aac0df;
  background: #fff;
  color: var(--editor-blue);
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 950;
}
.media-dropzone p {
  margin: 0;
  color: var(--editor-muted);
  font-size: .8rem;
}
.premium-media-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 320px;
}
.premium-media-list button {
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.premium-media-list button:hover {
  transform: translateY(-1px);
  border-color: #9ab5dd;
  box-shadow: 0 8px 22px rgba(17,24,39,.08);
}
.premium-media-list small {
  color: var(--editor-muted);
  font-size: .75rem;
}
.focal-point-tool {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.focal-point-tool[hidden] { display: none; }
.focal-grid {
  display: grid;
  grid-template-columns: repeat(3, 30px);
  gap: 5px;
}
.focal-grid button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  border: 1px solid var(--editor-line);
  border-radius: 7px;
  background: #f8fafc;
  padding: 0;
}
.focal-grid button.active,
.focal-grid button:hover {
  background: var(--editor-blue);
  border-color: var(--editor-blue);
}
.related-suggestions,
.comment-thread {
  display: grid;
  gap: 7px;
}
.comment-thread article {
  display: grid;
  gap: 3px;
  padding: 9px 0;
  border-bottom: 1px solid var(--editor-line);
}
.comment-thread p {
  margin: 0;
  color: #334155;
  font-size: .86rem;
}
.comment-thread time {
  color: var(--editor-muted);
  font-size: .76rem;
}
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.composer-bottom-utilities {
  display: grid;
  grid-template-columns: 1.2fr 1fr .9fr;
  gap: 14px;
  margin-top: 14px;
}
.revision-timeline {
  list-style: none;
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.revision-timeline li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border-bottom: 1px solid var(--editor-line);
  color: #334155;
  font-size: .84rem;
}
.revision-timeline time {
  color: var(--editor-muted);
  font-size: .78rem;
}
.revision-timeline a {
  color: var(--editor-blue);
  font-weight: 900;
}
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.shortcut-grid span {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 7px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--editor-line);
  color: #334155;
  font-size: .8rem;
  font-weight: 850;
}
kbd {
  min-width: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-size: .72rem;
  font-weight: 950;
}
.command-palette,
.composer-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: start center;
  padding: 8vh 20px 20px;
  background: rgba(15, 23, 42, .28);
  backdrop-filter: blur(10px);
}
.command-palette[hidden],
.composer-modal[hidden] { display: none; }
.command-panel,
.modal-card {
  width: min(720px, 100%);
  border: 1px solid rgba(216, 224, 234, .9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
  padding: 16px;
}
.command-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.command-list {
  display: grid;
  gap: 8px;
}
.inline-comment-modal blockquote {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-right: 3px solid var(--editor-blue);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  line-height: 1.9;
}
.publish-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.publish-risk-panel {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}
.publish-risk-panel span {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fff7ed;
  color: #8a4b05;
  font-size: .82rem;
  font-weight: 850;
}
.publish-risk-panel.is-ready span {
  background: #ecfdf5;
  color: var(--editor-green);
}
.publish-preview {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  background: #f8fafc;
}
.publish-preview strong {
  font-size: 1.2rem;
  line-height: 1.5;
}
.publish-preview p {
  margin: 0;
  color: #475569;
}
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.composer-focus-mode .newsroom-sidebar,
.composer-focus-mode .newsroom-topbar {
  display: none;
}
.composer-shell[data-mode="focus"] .composer-grid {
  grid-template-columns: minmax(0, 980px);
  justify-content: center;
}
.composer-shell[data-mode="focus"] .editorial-sidebar,
.composer-shell[data-mode="focus"] .inspector-rail,
.composer-shell[data-mode="focus"] .block-system-panel,
.composer-shell[data-mode="focus"] .template-blueprint-panel,
.composer-shell[data-mode="focus"] .composer-bottom-utilities {
  display: none;
}
.composer-shell[data-mode="focus"] .composer-topbar,
.composer-shell[data-mode="focus"] .writing-command-bar,
.composer-shell[data-mode="focus"] .editor-floating-toolbar {
  top: 12px;
}
.composer-shell[data-mode="mobile"] .split-preview-panel {
  grid-template-columns: 320px;
  justify-content: center;
}
.composer-shell[data-mode="mobile"] .desktop-preview {
  display: none;
}
.composer-shell[data-mode="mobile"] .homepage-preview-frame {
  display: none;
}
.composer-shell[data-mode="homepage"] .split-preview-panel {
  grid-template-columns: minmax(320px, 760px);
  justify-content: center;
}
.composer-shell[data-mode="homepage"] .desktop-preview,
.composer-shell[data-mode="homepage"] .mobile-preview-frame {
  display: none;
}
@media (max-width: 1540px) {
  .composer-grid {
    grid-template-columns: 230px minmax(560px, 1fr) 340px;
  }
  .newsroom-block-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1240px) {
  .composer-topbar {
    top: 12px;
    grid-template-columns: 1fr;
  }
  .composer-actions,
  .composer-status-strip {
    justify-content: flex-start;
  }
  .composer-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .editorial-sidebar {
    position: static;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: none;
  }
  .writing-command-bar,
  .editorial-sidebar,
  .inspector-rail {
    top: 100px;
  }
  .composer-bottom-utilities {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 920px) {
  .workspace:has(.composer-shell) {
    width: min(100% - 16px, 100%);
  }
  body.newsroom-shell:has(.composer-shell),
  body.newsroom-shell:has(.composer-shell) .newsroom-main,
  body.newsroom-shell:has(.composer-shell) .workspace,
  .composer-shell {
    max-width: 100%;
    overflow-x: hidden;
  }
  .composer-grid,
  .editorial-sidebar,
  .composer-bottom-utilities,
  .split-preview-panel,
  .story-language-row {
    grid-template-columns: 1fr;
  }
  .editorial-sidebar,
  .inspector-rail,
  .writing-command-bar,
  .composer-topbar {
    position: static;
    max-height: none;
  }
  .writing-studio { order: 1; }
  .inspector-rail { order: 2; }
  .editorial-sidebar { order: 3; }
  .writing-canvas {
    padding: 16px;
  }
  .headline-field input {
    min-height: 76px;
    font-size: clamp(1.45rem, 10vw, 2rem);
    text-overflow: ellipsis;
  }
  .premium-body-field textarea {
    min-height: 520px;
    padding: 16px;
    font-size: 1rem;
  }
  .writing-metrics,
  .persian-quality-strip,
  .queue-list,
  .analytics-grid,
  .toggle-grid,
  .publish-checklist,
  .headline-analysis,
  .shortcut-grid,
  .newsroom-block-grid,
  .premium-media-list {
    grid-template-columns: 1fr;
  }
  .revision-timeline li {
    grid-template-columns: 1fr;
    align-items: start;
  }
}
@media (max-width: 560px) {
  .composer-shell {
    direction: ltr;
  }
  .composer-topbar > *,
  .composer-grid > *,
  .composer-bottom-utilities > *,
  .command-palette,
  .composer-modal {
    direction: rtl;
  }
  .composer-topbar {
    padding: 8px;
    overflow: hidden;
  }
  .composer-breadcrumb,
  .composer-status-strip {
    min-width: 0;
    justify-content: flex-start;
  }
  .composer-breadcrumb strong,
  .composer-breadcrumb span,
  .composer-breadcrumb a,
  .composer-chip,
  .story-status-badge {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }
  .composer-topbar,
  .writing-command-bar,
  .composer-actions,
  .mode-segments,
  .command-actions {
    align-items: stretch;
  }
  .composer-actions,
  .mode-segments,
  .command-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .composer-actions > *,
  .mode-segments button,
  .command-actions button,
  .modal-actions > * {
    width: 100%;
    min-width: 0;
  }
  .collab-avatars {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .editorial-card,
  .inspector-card,
  .writing-canvas,
  .block-system-panel,
  .utility-panel {
    min-width: 0;
    overflow: hidden;
  }
  .story-language-row label,
  .editor-field,
  .compact-field {
    overflow: hidden;
  }
  .headline-field input {
    min-height: 66px;
    font-size: 1.34rem;
  }
  .lede-field textarea {
    font-size: 1rem;
  }
  .template-switcher a {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .editor-floating-toolbar {
    position: static;
    width: 100%;
  }
  .template-blueprint-hero,
  .template-block-sequence {
    grid-template-columns: 1fr;
  }
  .mobile-preview-frame {
    border-width: 7px;
    border-radius: 22px;
    min-height: 420px;
  }
}
