/* Fer-Teach Taqriz — yagona CSS fayl (SPEC 14.10: ≤ 40 KB, CSS o'zgaruvchilar, build yo'q) */
:root {
  --c-brand: #1B2F6E;
  --c-accent: #17879A;
  --c-accent-2: #3BB4F2;
  --c-text: #1d2433;
  --c-muted: #5b6475;
  --c-line: #dfe3ea;
  --c-bg: #f4f6f9;
  --c-card: #ffffff;
  --c-ok: #0a7f3a;   --c-ok-bg: #e5f4ea;
  --c-warn: #8a5a00; --c-warn-bg: #fdf1d8;
  --c-bad: #b3261e;  --c-bad-bg: #fbe7e5;
  --c-info: #1d5fa8; --c-info-bg: #e6eff9;
  --radius: 8px;
  --gap: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
  --topbar-h: 56px;
  --nav-w: 232px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--c-text); background: var(--c-bg); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--c-info); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--c-accent-2); outline-offset: 2px; }
h1 { font-size: 1.55rem; line-height: 1.25; margin: 0 0 .6em; }
h2 { font-size: 1.15rem; margin: 0 0 .6em; }
p { margin: 0 0 .8em; }
img { max-width: 100%; height: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; border-radius: var(--radius); }
.skip-link:focus { left: 8px; }
.muted { color: var(--c-muted); }
.lead { font-size: 1.05rem; color: var(--c-muted); }
.text-bad { color: var(--c-bad); } .text-warn { color: var(--c-warn); } .text-ok { color: var(--c-ok); }

/* ---------- Tepa panel ---------- */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 16px; background: var(--c-brand); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; min-width: 0; }
.brand img { border-radius: 6px; background: #fff; }
.brand__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar__menu { display: none; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: var(--radius);
  min-width: 44px; min-height: 40px; font-size: 1.2rem; cursor: pointer; }
.bell { color: #fff; text-decoration: none; font-size: 1.15rem; min-width: 40px; text-align: center; }
.lang-switch { display: flex; border: 1px solid rgba(255,255,255,.45); border-radius: var(--radius); overflow: hidden; }
.lang-switch__btn { background: transparent; color: #fff; border: 0; padding: 6px 10px; min-height: 36px; font: 600 .85rem var(--font); cursor: pointer; }
.lang-switch__btn + .lang-switch__btn { border-left: 1px solid rgba(255,255,255,.3); }
.lang-switch__btn:hover { background: rgba(255,255,255,.12); }
.lang-switch__btn.is-active { background: #fff; color: var(--c-brand); }

/* ---------- Asosiy maket ---------- */
.shell { flex: 1; display: flex; width: 100%; max-width: calc(1100px + var(--nav-w) + 48px); margin: 0 auto; }
.sidenav { width: var(--nav-w); flex: 0 0 var(--nav-w); padding: 16px 8px; }
.sidenav ul { list-style: none; margin: 0; padding: 0; position: sticky; top: calc(var(--topbar-h) + 16px); }
.sidenav a { display: block; padding: 9px 12px; border-radius: var(--radius); color: var(--c-text); text-decoration: none; }
.sidenav a:hover { background: #e8ecf3; }
.sidenav a.is-active { background: var(--c-brand); color: #fff; font-weight: 600; }
.main { flex: 1; min-width: 0; width: 100%; max-width: 1100px; padding: 24px 16px 40px; margin: 0 auto; }
.main:focus { outline: none; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 14px 16px; color: var(--c-muted);
  font-size: .85rem; border-top: 1px solid var(--c-line); background: #fff; }

/* ---------- Kartalar va matn ---------- */
.card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 20px; margin-bottom: var(--gap); }
.card--narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.kv { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 18px; margin: 0; }
.kv dd { overflow-wrap: anywhere; }
/* Tor ustunda (o'ng karta) — yorliq tepada, qiymat pastda */
.ms-side .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
.ms-side .kv dt { font-size: .85rem; margin-top: 8px; }
.ms-side .kv dt:first-child { margin-top: 0; }
.kv dt { color: var(--c-muted); } .kv dd { margin: 0; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pre-small { white-space: pre-wrap; word-break: break-word; font: .85rem var(--mono); background: var(--c-bg); padding: 10px; border-radius: var(--radius); }
.error-page { text-align: center; }
.error-page__code { font-size: 3rem; font-weight: 700; color: var(--c-line); margin: 0; line-height: 1; }
.empty { text-align: center; padding: 32px 16px; color: var(--c-muted); }

/* ---------- Belgilar, flash, ogohlantirish ---------- */
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; vertical-align: 1px;
  border: 1px solid transparent; white-space: nowrap; }
.badge--ok { color: var(--c-ok); background: var(--c-ok-bg); border-color: #b9e0c6; }
.badge--warn { color: var(--c-warn); background: var(--c-warn-bg); border-color: #f1d79c; }
.badge--bad { color: var(--c-bad); background: var(--c-bad-bg); border-color: #f2c1bc; }
.badge--info { color: var(--c-info); background: var(--c-info-bg); border-color: #bcd3ee; }
.badge--muted { color: var(--c-muted); background: #eef0f4; border-color: var(--c-line); }
.flashes:empty { display: none; }
.flash { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 12px; border: 1px solid; }
.flash--success { color: var(--c-ok); background: var(--c-ok-bg); border-color: #b9e0c6; }
.flash--error { color: var(--c-bad); background: var(--c-bad-bg); border-color: #f2c1bc; }
.flash--warning { color: var(--c-warn); background: var(--c-warn-bg); border-color: #f1d79c; }
.flash--info { color: var(--c-info); background: var(--c-info-bg); border-color: #bcd3ee; }
.version-warning { background: var(--c-bad); color: #fff; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 12px; font-weight: 600; }

/* ---------- Formalar ---------- */
.form { max-width: 560px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field .req { color: var(--c-bad); }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea,
.rf-q input[type=text], .rf-q input[type=number], .rf-q textarea, .rf-comment textarea,
.author-row__grid input[type=text], .author-row__grid input[type=email], .inline-row input[type=number], .inline-row input[type=text], .inline-row select, .inline-row input[type=file], .list-filter {
  width: 100%; min-height: 44px; padding: 9px 11px; font: inherit; color: inherit; background: #fff;
  border: 1px solid #c5ccd8; border-radius: var(--radius); }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .rf-q input:focus, .rf-q textarea:focus, .rf-comment textarea:focus { border-color: var(--c-accent); outline: 2px solid rgba(23,135,154,.25); outline-offset: 0; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--c-bad); }
.field__hint { font-size: .85rem; color: var(--c-muted); margin: 4px 0 0; }
.field__error { font-size: .88rem; color: var(--c-bad); margin: 4px 0 0; font-weight: 600; }
.field--check { display: flex; gap: 10px; align-items: flex-start; }
.field--check input { width: 22px; height: 22px; margin: 2px 0 0; flex: 0 0 auto; }
.field--check label { font-weight: 400; margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 9px 18px;
  font: 600 .95rem var(--font); border-radius: var(--radius); border: 1px solid #c5ccd8; background: #fff; color: var(--c-text);
  text-decoration: none; cursor: pointer; }
.btn:hover { background: #f0f2f6; }
.btn--primary { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.btn--primary:hover { background: #127384; }
.btn--danger { background: #fff; border-color: var(--c-bad); color: var(--c-bad); }
.btn--danger:hover { background: var(--c-bad-bg); }
.btn[disabled], .btn.is-busy { opacity: .6; cursor: progress; }

/* ---------- Jadval, tablar, sahifalash ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.table th { font-size: .85rem; color: var(--c-muted); font-weight: 600; background: #fafbfc; }
.table tr.is-muted td { color: var(--c-muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-line); margin-bottom: var(--gap); overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--c-muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.is-active { color: var(--c-brand); border-bottom-color: var(--c-brand); font-weight: 600; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 16px 0; }
.pager__info { color: var(--c-muted); }

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
  .topbar__menu { display: inline-block; }
  .shell--nav { flex-direction: column; }
  .sidenav { width: 100%; flex: none; padding: 8px; background: #fff; border-bottom: 1px solid var(--c-line); }
  .sidenav ul { position: static; }
  .js .sidenav { display: none; }
  .js .sidenav.is-open { display: block; }
  .main { padding: 16px 12px 32px; }
  .card { padding: 16px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .table--cards thead { display: none; }
  .table--cards tr { display: block; border-bottom: 1px solid var(--c-line); padding: 8px 0; }
  .table--cards td { display: block; border: 0; padding: 4px 12px; }
  .table--cards td[data-label]::before { content: attr(data-label) ": "; color: var(--c-muted); font-size: .85rem; }
}
@media (max-width: 420px) {
  .brand__name { display: none; }
}
@media print {
  .topbar, .sidenav, .footer, .lang-switch { display: none !important; }
  body { background: #fff; }
}

/* ---------- M1: foydalanuvchi menyusi, kirish, admin ---------- */
.topbar__user { color: #fff; text-decoration: none; font-weight: 600; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__user:hover { text-decoration: underline; }
.topbar__logout { margin: 0; }
.topbar__btn { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: var(--radius);
  padding: 6px 12px; min-height: 36px; font: 600 .85rem var(--font); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.topbar__btn:hover { background: rgba(255,255,255,.12); }
.auth-card { max-width: 440px; margin-top: 32px; }
.form-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 999px; background: #eef1f6; border: 1px solid var(--c-line); font-size: .85rem; }
.chip__j { font-weight: 700; color: var(--c-brand); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 var(--gap); }
.lang-col h3 { font-size: .95rem; margin: 0 0 8px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: var(--gap); }
.page-head h1 { margin: 0; }
.matrix-wrap { overflow: auto; max-height: 75vh; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; }
.matrix { border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.matrix th, .matrix td { padding: 6px 10px; border-bottom: 1px solid var(--c-line); text-align: center; background: #fff; }
.matrix thead th { position: sticky; top: 0; z-index: 2; background: #fafbfc; font-size: .8rem; vertical-align: bottom; }
.matrix tbody th { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 400; min-width: 260px; }
.matrix tbody th code { display: block; font-size: .75rem; color: var(--c-muted); }
.matrix .grp th { background: #f2f4f8; font-weight: 700; text-align: left; position: sticky; left: 0; }
.matrix input { width: 20px; height: 20px; }
.matrix .locked { opacity: .55; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; list-style: none; padding: 0; margin: 0 0 12px; }
.check-list label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check-list input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; }
.status-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.inline-form { display: inline; margin: 0; }
.btn--small { min-height: 34px; padding: 5px 12px; font-size: .85rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.lang-col { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: var(--gap); }
@media (max-width: 640px) {
  .topbar { gap: 8px; padding: 0 8px; }
  .topbar__right { gap: 6px; }
  .topbar__user { display: none; }
  .lang-switch__btn { padding: 6px 7px; }
  .topbar__btn { padding: 6px 8px; }
}
.signature-preview { max-width: 260px; max-height: 120px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0/16px 16px; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 6px; }
.field input[type=file] { min-height: 0; padding: 8px; }
.code-badge { display: inline-block; padding: 2px 10px; border-radius: var(--radius); background: var(--c-brand); color: #fff; font-size: .9em; }
.journal-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.journal-card:hover { border-color: var(--c-accent); }
.journal-card.is-muted { opacity: .6; }
.journal-card__code { font-weight: 800; font-size: 1.3rem; color: var(--c-brand); }
.journal-card__name { font-weight: 600; }
.asset-box { border: 1px dashed var(--c-line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.asset-box h3 { margin: 0 0 8px; font-size: 1rem; }
.asset-box__img { max-height: 90px; max-width: 100%; display: block; margin-bottom: 8px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0/16px 16px; }
.field--end { display: flex; align-items: flex-end; }
.holder-card { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.holder-card.is-muted { opacity: .65; }
.holder-card__role { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); font-weight: 700; }
.holder-card__name { font-size: 1.05rem; font-weight: 600; }
.holder-card__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: flex-start; }
.small { font-size: .85rem; }
.row-actions summary { list-style: none; cursor: pointer; }
.row-actions summary::-webkit-details-marker { display: none; }
.row-actions[open] .row-actions__body { margin-top: 8px; padding: 10px; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fafbfc; min-width: 240px; display: grid; gap: 8px; }
.person-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.person-row:last-of-type { border-bottom: 0; }
.person-row__who { flex: 1 1 280px; }
.person-row .field { margin-bottom: 0; }
.search-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.search-form .field { flex: 1 1 280px; margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; }
.pos-item { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pos-item.is-muted { opacity: .65; }
.add-pos { margin-top: 12px; border-top: 1px solid var(--c-line); padding-top: 12px; }
.history summary { cursor: pointer; color: var(--c-muted); margin-top: 10px; }
.invite-box { border-color: var(--c-accent); background: #f0fafb; }
.copy-input { width: 100%; font: .9rem var(--mono); padding: 8px; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; }
.dup-box { border-color: #f1d79c; background: var(--c-warn-bg); }
.pos-row { border-bottom: 1px dashed var(--c-line); margin-bottom: 8px; }
.copy-pre { background: var(--c-bg, #f4f5f8); border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; overflow-x: auto; font-size: .85rem; user-select: all; }
.fetch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 12px; }
.card--join { max-width: 960px; }
.fetch-box { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; align-items: end; background: #eef7f8; border: 1px dashed #9fd0d6; border-radius: 8px; padding: 12px 14px 4px; margin-bottom: 16px; }
.fetch-box__hint { grid-column: 1 / -1; margin: 0 0 8px; }
@media (max-width: 640px) { .fetch-box { grid-template-columns: 1fr; } }
.js-only { display: none; }
.js .js-only { display: inline-flex; }
/* Parol maydoni: «ko'z» tugmasi va jonli ogohlantirish (0.9.2) */
.pw-row { position: relative; }
.js .pw-row input { padding-right: 48px; }
.pw-eye { position: absolute; top: 0; right: 0; width: 44px; height: 44px; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--c-muted); cursor: pointer; border-radius: var(--radius); }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--c-accent); }
.pw-eye svg { fill: currentColor; }
.pw-eye .pw-eye__shut, .pw-eye[aria-pressed=true] .pw-eye__open { display: none; }
.pw-eye[aria-pressed=true] .pw-eye__shut { display: inline; }
.field__live.is-warn { color: #9a6700; font-weight: 500; }
.field--live-bad input { border-color: var(--c-bad); }
.date-row { display: flex; gap: 8px; align-items: center; }
.date-row input { flex: 1; min-width: 0; }
.idx-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.idx-logo { height: 28px; width: auto; max-width: 120px; object-fit: contain; }
.inbox { list-style: none; padding: 0; }
.inbox__item + .inbox__item { border-top: 1px solid var(--c-line); }
.inbox__item a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 4px; color: inherit; text-decoration: none; }
.inbox__item a:hover { background: #f5f7fb; }
.inbox__prev { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox__item.is-unread .inbox__subj { font-weight: 700; }
.inbox__item.is-unread .inbox__subj::before { content: "● "; color: var(--c-brand); }
.bell { position: relative; text-decoration: none; font-size: 1.1rem; padding: 4px 6px; }
.bell__n { position: absolute; top: -4px; right: -6px; background: #d33; color: #fff; border-radius: 9px; font-size: .7rem; line-height: 1; padding: 3px 5px; font-weight: 700; }

/* ---------- Taqriz shabloni konstruktori (M4) ---------- */
.form-actions--sticky { position: sticky; bottom: 0; z-index: 5; margin-top: var(--gap); box-shadow: 0 -2px 8px rgba(0,0,0,.06); }
.tb-top .field, .tb-section .field { margin-bottom: 10px; }
.tb-langs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.tb-section__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-section__head h2 { margin: 0; }
.tb-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tb-questions { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.tb-q { border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-bg); }
.tb-q > summary { cursor: pointer; padding: 10px 12px; font-weight: 600; overflow-wrap: anywhere; }
.tb-q[open] > summary { border-bottom: 1px solid var(--c-line); }
.tb-q__body { padding: 12px; background: var(--c-card); border-radius: 0 0 var(--radius) var(--radius); }
.tb-sub { border-left: 3px solid var(--c-accent); padding: 4px 0 4px 12px; margin: 12px 0; }
.tb-sub h4 { margin: 0 0 8px; font-size: .95rem; }
.tb-options { margin: 0 0 8px; padding-left: 20px; }
.tb-option { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.tb-option > .field:nth-child(2):not(:last-child) { grid-column: 1; }
.tb-option > .tb-actions { grid-column: 2; grid-row: 1; }
.tb-band { border: 1px dashed var(--c-line); border-radius: var(--radius); padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.tb-band > strong { grid-column: 1 / -1; }
.tb-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 var(--gap); }
.tb-add select { max-width: 240px; }
.is-error { outline: 2px solid var(--c-bad); outline-offset: 2px; }
ul.field__error { margin: 8px 12px; padding-left: 18px; }

/* ---------- Taqriz formasi ---------- */
.rf-title { text-align: center; text-transform: none; margin: 8px 0 var(--gap); }
.rf-section h2 { border-bottom: 1px solid var(--c-line); padding-bottom: 6px; }
.rf-q { margin: 0 0 18px; padding: 4px 0; }
.rf-q fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.rf-q legend, .rf-q > label { font-weight: 600; margin-bottom: 6px; padding: 0; display: block; }
.rf-q textarea, .rf-q input[type=text], .rf-comment textarea { width: 100%; }
.rf-comment textarea { min-height: 60px; }
.rf-options { display: flex; flex-direction: column; gap: 4px; }
.rf-options label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: var(--radius); min-height: 44px; cursor: pointer; }
.rf-options label:has(input:checked) { border-color: var(--c-accent); background: #eef8fa; }
.rf-options input { margin-top: 4px; flex: none; width: 18px; height: 18px; }
.rf-options--inline { flex-direction: row; flex-wrap: wrap; }
.rf-options--rec label { font-weight: 500; }
.rf-scale { display: flex; gap: 6px; flex-wrap: wrap; }
.rf-scale label { position: relative; }
.rf-scale input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rf-scale span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-card); font-weight: 600; cursor: pointer; }
.rf-scale input:checked + span { background: var(--c-brand); color: #fff; border-color: var(--c-brand); }
.rf-scale input:focus-visible + span { outline: 3px solid var(--c-accent-2); outline-offset: 2px; }
.rf-number { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rf-number input[type=number] { width: 160px; }
.rf-band { margin-top: 6px; }
.rf-band[hidden] { display: none; }
.rf-comment { margin-top: 8px; }
.rf-comment[hidden] { display: none; }
.rf-comment label { font-size: .9rem; color: var(--c-muted); display: block; margin-bottom: 2px; }
.rf-info { background: var(--c-info-bg); color: var(--c-info); border-radius: var(--radius); padding: 10px 12px; margin: 0 0 16px; }
.rf-matrix { width: 100%; border-collapse: collapse; margin: 0 0 16px; }
.rf-matrix th, .rf-matrix td { border-bottom: 1px solid var(--c-line); padding: 8px 6px; }
.rf-matrix thead th { text-align: center; font-size: .9rem; color: var(--c-muted); }
.rf-matrix tbody th { text-align: left; font-weight: 500; }
.rf-matrix td { text-align: center; width: 52px; }
.rf-matrix td input { width: 22px; height: 22px; }
.rf-matrix tr.is-error th { color: var(--c-bad); outline: 0; }
.rf-matrix__extra td { text-align: left; width: auto; border-bottom-width: 2px; }
.rf-matrix__extra:has(.rf-comment[hidden]):not(:has(.field__error)) { display: none; }
.rf-summary { font-weight: 600; margin: 8px 0 0; }
@media (max-width: 600px) {
  .rf-matrix thead { display: none; }
  .rf-matrix tbody tr:not(.rf-matrix__extra) { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); }
  .rf-matrix tbody tr:not(.rf-matrix__extra) th { grid-column: 1 / -1; border-bottom: 0; }
  .rf-matrix td { width: auto; }
  .rf-matrix td::before { content: attr(data-v); display: block; font-size: .8rem; color: var(--c-muted); }
  .tb-option { grid-template-columns: 1fr; }
  .tb-option > .tb-actions { grid-column: 1; grid-row: auto; }
}

/* ---------- M5: maqolalar va taqrizlar ---------- */
.ms-head__title { margin: 4px 0 0; font-size: 1.05rem; max-width: 70ch; }
.ms-head h1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0; }
.steps { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0 0 var(--gap); flex-wrap: wrap; counter-reset: st; }
.steps li { flex: 1 1 120px; padding: 6px 10px; border-radius: var(--radius); background: #eef1f6; color: var(--c-muted); font-size: .85rem; }
.steps li.is-done { background: var(--c-ok-bg, #e7f6ec); color: var(--c-text); }
.steps li.is-current { background: var(--c-brand); color: #fff; font-weight: 600; }
.ms-text + .ms-text { border-top: 1px solid var(--c-line); margin-top: 12px; padding-top: 12px; }
.ms-text h3 { font-size: .85rem; color: var(--c-muted); text-transform: uppercase; margin: 0 0 4px; }
.ms-abstract { white-space: normal; line-height: 1.55; }
.authors-list { padding-left: 20px; margin: 0; display: grid; gap: 8px; }
.file-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.file-list--big li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.author-row { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; position: relative; }
.author-row.is-error { border-color: var(--c-bad); }
.author-row__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 12px; }
.author-row__grid label { display: grid; gap: 4px; font-size: .85rem; color: var(--c-muted); }
.author-row__grid label input { color: var(--c-text); font-size: 1rem; }
.author-row__wide { grid-column: span 2; }
.author-row__check { display: flex !important; align-items: center; gap: 6px; }
.author-row__move { display: flex; gap: 4px; justify-content: flex-end; margin-top: 6px; }
@media (max-width: 640px) { .author-row__wide { grid-column: auto; } }
.inline-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.inline-row input.input-short { width: 90px; min-height: 36px; padding: 6px 8px; }
.inline-row select, .inline-row input[type=file] { width: auto; min-height: 36px; padding: 6px 8px; }
.kept-file { margin: 0 0 6px; }
.compare th[scope=row] { min-width: 220px; font-weight: 500; color: var(--c-text); background: #fafbfc; }
.compare td { min-width: 180px; }
.compare__section th { background: #eef1f6 !important; color: var(--c-brand) !important; font-weight: 700 !important; }
.compare__rec td, .compare__rec th { background: #f0fafb !important; }
.rv-comment { margin-top: 6px; padding: 6px 8px; border-left: 3px solid var(--c-accent); background: #f6fafb; font-size: .9rem; }
.rv-read { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 10px 18px; margin: 0; }
.rv-read dt { color: var(--c-muted); } .rv-read dd { margin: 0; }
@media (max-width: 640px) { .rv-read { grid-template-columns: 1fr; } .rv-read dd { margin-bottom: 8px; } }
.thread { display: grid; gap: 10px; margin-bottom: 14px; max-height: 60vh; overflow-y: auto; }
.msg { padding: 10px 12px; border-radius: var(--radius); background: #f3f5f9; max-width: 85%; }
.msg--me { background: #e6f5f7; justify-self: end; }
.msg__head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.msg__body { white-space: normal; word-break: break-word; }
.thread-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.thread-list a.is-active { font-weight: 700; }
.two-col--thread { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.offer-card h2 { margin: 4px 0 8px; font-size: 1.1rem; }
.dec-item + .dec-item { border-top: 1px solid var(--c-line); padding-top: 8px; margin-top: 8px; }
.tabs--sub a { padding: 6px 12px; font-size: .9rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 16px; max-height: 260px; overflow-y: auto; padding: 6px; border: 1px solid var(--c-line); border-radius: var(--radius); }
.check-grid label, .pick-list label { display: flex; gap: 6px; align-items: baseline; padding: 3px 0; }
.choose-box { margin-top: 12px; border-top: 1px solid var(--c-line); padding-top: 10px; }
.pick-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 6px 10px; }
.pick-table { max-height: 420px; overflow-y: auto; }
.list-filter { max-width: 360px; margin: 0 0 8px; }
.pick-badge { font-size: .75rem; background: var(--c-ok-bg); color: var(--c-ok); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.pick-list label[hidden], .pick-table tr[hidden] { display: none; }
.ms-form { max-width: 960px; }
.ms-form .grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.offer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.offer-list li { border-bottom: 1px solid var(--c-line); padding-bottom: 8px; }
.offer-list li:last-child { border-bottom: 0; }
.offer-list__meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.dlv { font-size: .75rem; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--c-line); color: var(--c-muted); }
.dlv--sent { color: var(--c-ok); background: var(--c-ok-bg); border-color: transparent; }
.dlv--failed { color: var(--c-bad); background: var(--c-bad-bg); border-color: transparent; }
.dlv--skipped { color: var(--c-warn); background: var(--c-warn-bg); border-color: transparent; }
.files-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.danger-zone { border-color: #f2c4c0; }
.tg-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.tg-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-bottom: 1px solid var(--c-line); padding-bottom: 6px; }
.tg-add__input { max-width: 260px; }

.tg-list li { flex-wrap: nowrap; align-items: flex-start; }
.tg-list__main { min-width: 0; overflow-wrap: anywhere; }
.tg-list li form { flex: none; }
.tg-add { border-top: 1px solid var(--c-line); margin-top: 14px; padding-top: 10px; }
.tg-add h3 { font-size: 1rem; margin: 0 0 8px; }
.tg-steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.tg-steps p { margin: 8px 0 4px; }
.tg-alt summary { cursor: pointer; color: var(--c-brand); font-size: .92rem; }
.tg-alt[open] summary { margin-bottom: 6px; }
.tg-way { margin: 10px 0 4px; }
.tg-watch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tg-watch__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-warn); animation: tgpulse 1.4s ease-in-out infinite; }
@keyframes tgpulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .tg-watch__dot { animation: none; } }
.btn--link { background: none; border: 0; color: var(--c-brand); text-decoration: underline; padding: 0; min-height: 0; }
.tg-watch__dot { flex: none; }
.tg-watch__text { flex: 1 1 180px; min-width: 0; }

/* ---------- M6: hujjatlar (SPEC 12) ---------- */
.js .no-js-only { display: none; }
.stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.stack details { width: 100%; }
.stack details > summary { list-style: none; cursor: pointer; }
.stack details > summary::-webkit-details-marker { display: none; }
.stack details[open] > summary { margin-bottom: 8px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mono, textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; line-height: 1.5; }
.inline-details { display: inline-block; }
.inline-details[open] > summary { margin-bottom: 6px; }
.doc-missing { margin: 6px 0 0 18px; padding: 0; }
.lang-tabs { display: flex; gap: 4px; margin: 0 0 10px; flex-wrap: wrap; }
.lang-tabs a, .lang-tabs button { padding: 5px 12px; border: 1px solid var(--c-line); border-radius: 999px; background: #fff; color: inherit; text-decoration: none; font: inherit; font-size: .9rem; cursor: pointer; }
.lang-tabs .is-active { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.doc-layout { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .doc-layout { grid-template-columns: 1fr; } }
.doc-paper { position: relative; background: #fff; border: 1px solid var(--c-line); box-shadow: 0 2px 10px rgba(16, 24, 40, .08); padding: 34px 30px 30px 46px; max-width: 820px; overflow: hidden; color: #111; font-family: "Times New Roman", "DejaVu Serif", Georgia, serif; font-size: 15px; line-height: 1.45; }
.doc-paper[data-mark]::after { content: attr(data-mark); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 clamp(28px, 7vw, 74px)/1 Arial, sans-serif; color: rgba(200, 0, 0, .12); transform: rotate(-30deg); pointer-events: none; white-space: nowrap; }
.doc-paper--cert { font-family: Arial, "DejaVu Sans", sans-serif; padding: 34px; border: 8px double #1b2f6e; text-align: center; }
.doc .d-h1 { font-size: 1.25em; text-align: center; margin: .3em 0; }
.doc--cert .d-h1 { font-size: 2.3em; letter-spacing: .12em; }
.doc .d-h2 { font-size: 1em; text-align: center; margin: .2em 0 .5em; }
.doc .d-center { text-align: center; } .doc .d-right { text-align: right; } .doc .d-left { text-align: left; }
.doc .d-para { text-indent: 2.2em; text-align: justify; margin: 0 0 .4em; }
.doc .d-plain { margin: 0 0 .4em; }
.doc table { border-collapse: collapse; }
.doc .d-dateline { margin: .5em 0 .8em; }
.doc .d-persons { margin: 0 0 .6em 2em; width: auto; }
.doc .d-persons td { vertical-align: top; padding: 2px 4px; }
.doc .d-num { text-align: right; width: 2em; }
.doc .d-sig { margin-top: 1.6em; }
.doc .d-sig td { vertical-align: middle; padding: 2px 0; }
.doc .d-sig img { max-height: 92px; }
.doc .d-sig-empty { color: #999; font-size: .8em; border-bottom: 1px solid #999; }
.doc .d-qr { margin-top: 1em; text-align: left; }
.doc .d-qr td { vertical-align: middle; font-size: .78em; color: #333; padding-right: 10px; }
.doc .d-qr svg { width: 90px; height: 90px; display: block; }
.doc .d-small { font-size: .85em; color: #555; overflow-wrap: anywhere; }
.doc .d-table { width: 100%; margin: .4em 0 .8em; }
.doc .d-table th, .doc .d-table td { border: 1px solid #888; padding: 4px 6px; font-size: .85em; vertical-align: top; text-align: left; }
.doc .d-table th { background: #f2f2f2; }
.doc .d-c { text-align: center !important; }
.doc .d-meta td { padding: 3px 6px; vertical-align: top; text-align: left; }
.doc .d-person__name { font-size: 1.9em; font-weight: 700; margin: .3em 0 .1em; }
.doc .d-person__info { color: #333; }
.doc .d-journal { margin: .3em 0; }
.doc .d-journal__name { font-size: 1.4em; font-weight: 700; }
.doc .d-journal__kind { color: #444; font-size: .9em; }
.doc .d-journal__logo img { height: 70px; }
.doc .d-pagebreak { border: 0; border-top: 2px dashed #bbb; margin: 1.6em 0; }
.doc--review h2.d-h2 { text-align: left; margin-top: 1em; }
@media (max-width: 640px) { .doc-paper { padding: 18px 14px; font-size: 13px; } .doc .d-persons { margin-left: .5em; } }
.diff { background: #fafbfc; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 10px; overflow-x: auto; font-size: .82rem; line-height: 1.5; white-space: pre-wrap; }
.diff__add { background: #e6f6ea; color: #116329; display: block; }
.diff__del { background: #fdecec; color: #a40e26; display: block; text-decoration: line-through; }
.diff__eq { color: #555; display: block; }
.dt-layout { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.dt-text { width: 100%; min-height: 380px; }
.dt-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.dt-side h2 { font-size: 1rem; margin: 12px 0 6px; }
.dt-chips { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dt-chips .chip { cursor: pointer; }
.dt-colors { display: flex; gap: 18px; flex-wrap: wrap; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 10px 14px; margin: 10px 0; }
.dt-colors label { display: flex; gap: 6px; align-items: center; }
.check-page { display: flex; justify-content: center; padding: 20px 0; }
.check-card { border-top: 6px solid #999; width: 100%; max-width: 640px; }
.check-card--ok { border-top-color: #16a34a; } .check-card--bad { border-top-color: #dc2626; } .check-card--warn { border-top-color: #d97706; }
.check-card--ok .check-card__status { color: #15803d; } .check-card--bad .check-card__status { color: #b91c1c; } .check-card--warn .check-card__status { color: #b45309; }
.check-persons { margin: 0; padding-left: 20px; }
.doc .d-c1 { color: #1B2F6E; } .doc .d-c2 { color: #3BB4F2; } .doc .d-c3 { color: #0A7F3A; }
.doc--cert .d-sig__img img { max-height: 84px; }
.form.dt-editor, form.dt-editor { max-width: none; }
.dt-editor .dt-layout, .dt-layout { width: 100%; }
.check-card .lang-tabs { margin-top: 16px; }
.form--wide { max-width: 980px; }
.md-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
/* Sertifikat (namuna: A4 tik) — veb ko'rinish */
.doc-paper--cert { border: 1px solid var(--c-line); border-top: 14px solid #3BB4F2; padding: 0 0 18px; text-align: center; font-family: "Open Sans", Arial, sans-serif; }
.doc-paper--cert::before { content: ""; display: block; height: 3px; background: #E5262A; }
.doc--cert { padding: 14px 30px 0; }
.doc--cert .c-head { width: 100%; text-align: left; }
.doc--cert .c-head td { vertical-align: middle; }
.doc--cert .c-logo { height: 92px; }
.doc--cert .c-jname { font: 800 1.45em/1.15 "Russo One", Arial, sans-serif; color: #1B2F6E; letter-spacing: .02em; }
.doc--cert .c-jsub { font-size: .75em; color: #1B2F6E; }
.doc--cert .c-addr { font-size: .78em; color: #333; text-align: left; border-bottom: 3px solid #E5262A; padding: 8px 0; margin-bottom: 18px; }
.doc--cert .c-h1 { font: 700 2.6em/1.1 Georgia, "DejaVu Serif", serif; color: #1B2F6E; }
.doc--cert .c-h2 { font: 1.1em Georgia, "DejaVu Serif", serif; color: #1B2F6E; margin: 4px 0 26px; }
.doc--cert .c-lead { text-align: left; }
.doc--cert .c-name { font: 2.2em/1.2 "Great Vibes", "Brush Script MT", cursive; color: #1B2F6E; margin-top: 4px; }
.doc--cert .c-info { font-style: italic; }
.doc--cert .c-statement { font-weight: 700; margin: 22px 0 16px; }
.doc--cert .c-jkind { font-style: italic; color: #1a3fbf; font-size: .9em; }
.doc--cert .c-jtitle { font: 800 1.6em/1.2 "Russo One", Arial, sans-serif; color: #1B2F6E; margin-bottom: 22px; }
.doc--cert .c-sig { width: 100%; }
.doc--cert .c-sig td { vertical-align: middle; }
.doc--cert .c-sig__img { text-align: right; } .doc--cert .c-sig__img img { max-width: 100%; max-height: 110px; }
.doc--cert .c-sig__who { text-align: left; padding-left: 10px; }
.doc--cert .c-sig__pos { color: #888; font-size: .8em; }
.doc--cert .c-contacts { width: 100%; margin-top: 18px; } .doc--cert .c-contacts td { font-size: .72em; color: #333; }
.doc--cert .c-ic { color: #E5262A; }
.d-qr__wrap { position: relative; display: inline-block; line-height: 0; }
.d-qr__wrap .d-qr__logo { position: absolute; left: 38%; top: 38%; width: 24%; height: 24%; object-fit: contain; background: #fff; padding: 1px; }
.doc .d-letterhead img { width: 100%; height: auto; display: block; margin-bottom: 10px; }
@font-face { font-family: "Great Vibes"; src: url("../fonts/GreatVibes-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Russo One"; src: url("../fonts/RussoOne-Regular.ttf") format("truetype"); font-display: swap; }
.doc--cert .c-head__logo { width: 110px; } .doc--cert .c-logo { height: auto; max-height: 96px; max-width: 105px; }

/* ---- HTML+CSS hujjat muharriri (0.7.0) ---- */
.he-bar { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.he-modes { display: flex; gap: .25rem; }
.he-modes .is-active { background: var(--primary, #1f4e8c); color: #fff; }
.he-toolbar { display: flex; flex-wrap: wrap; gap: .35rem .75rem; padding: .4rem; border: 1px solid var(--border, #d0d7de); border-radius: 6px; background: var(--surface-2, #f6f8fa); position: sticky; top: 0; z-index: 5; }
.he-group { display: inline-flex; flex-wrap: wrap; gap: .2rem; align-items: center; }
.he-toolbar select, .he-toolbar .he-link { font-size: .85rem; padding: .15rem .3rem; max-width: 12rem; }
.he-toolbar .he-link { width: 9rem; }
.he-color { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; cursor: pointer; }
.he-color input { width: 1.6rem; height: 1.6rem; padding: 0; border: 0; background: none; }
.he-file { position: relative; overflow: hidden; cursor: pointer; }
.he-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.he-visual { width: 100%; min-height: 600px; border: 1px solid var(--border, #d0d7de); border-radius: 6px; background: #e9ecef; display: block; }
.he .he-code, .he .he-css { width: 100%; font-size: .85rem; line-height: 1.4; tab-size: 2; }
.he.he--js:not(.he--code) .he-code { display: none; }
.he:not(.he--js) .he-visual, .he.he--code .he-visual, .he.he--css .he-visual { display: none; }
.he.he--css .he-pane { display: none; }
.he-css-pane { display: none; margin-top: .5rem; }
.he:not(.he--js) .he-css-pane, .he.he--css .he-css-pane { display: block; }
.he.he--code .he-visual-only, .he.he--css .he-visual-only { display: none; }
.he-status { min-height: 1.2em; margin: .25rem 0; }
.he-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 1rem; align-items: start; }
.he-preview { position: sticky; top: .5rem; }
.he-preview iframe { width: 100%; height: 82vh; border: 1px solid var(--border, #d0d7de); border-radius: 6px; background: #fff; }
.he-preview__bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.doc-pdf { width: 100%; height: 85vh; border: 1px solid var(--border, #d0d7de); border-radius: 6px; background: #fff; }
@media (max-width: 1000px) { .he-layout { grid-template-columns: 1fr; } .he-preview iframe { height: 70vh; } }
.js .he-toolbar.js-only { display: flex; }
.js .he-visual.js-only { display: block; }
.js .he.he--code .he-visual, .js .he.he--css .he-visual { display: none; }
.js .he.he--code .he-visual-only, .js .he.he--css .he-visual-only { display: none; }
.check-page { flex-direction: column; align-items: center; gap: 16px; }
.check-doc { width: 100%; max-width: 900px; }
.check-doc .doc-pdf { height: 80vh; }
.he-presets { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; margin-bottom: .6rem; padding-bottom: .6rem; border-bottom: 1px dashed var(--border, #d0d7de); }
.js .he-presets.js-only { display: flex; }
.check-doc .doc-html { height: 82vh; min-height: 420px; }
@media (max-width: 600px) { .check-doc .doc-html { height: 70vh; } }
.card--danger { border: 1px solid #e0b4b4; background: #fff8f8; }
.card--danger h2 { color: #b91c1c; }
.sig-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.sig-item { border: 1px solid var(--border, #d0d7de); border-radius: 6px; padding: .5rem; }
.sig-item.is-default { border-color: #16a34a; }
.sig-item .signature-preview { max-width: 100%; max-height: 90px; display: block; margin-bottom: .4rem; }
.sig-item__meta { display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; }
.sig-pick { display: flex; flex-wrap: wrap; gap: .5rem; margin: .3rem 0; }
.sig-pick__item { border: 1px solid var(--border, #d0d7de); border-radius: 6px; padding: .3rem; display: flex; flex-direction: column; align-items: center; cursor: pointer; width: 120px; }
.sig-pick__item.is-current { border-color: #1f4e8c; background: #eef3fb; }
.sig-pick__item img { max-width: 110px; max-height: 50px; }
/* Muharrir joyi: ko'rinishsiz (bir ustun) va to'liq ekran */
.he-tools { display: none; gap: .4rem; margin-bottom: .5rem; }
.js .he-tools.js-only { display: flex; }
.he-tools .is-active { background: var(--primary, #1f4e8c); color: #fff; }
.he-layout--nopreview { grid-template-columns: 1fr; }
.he-layout--nopreview .he-preview { display: none; }
.he-fullscreen .sidenav, .he-fullscreen .topbar, .he-fullscreen .page-head, .he-fullscreen .he-intro { display: none !important; }
.he-fullscreen .shell, .he-fullscreen .main { max-width: none; padding: 8px 12px; }
.he-fullscreen .he-visual { min-height: 80vh; }
.he-fullscreen .he .he-code, .he-fullscreen .he .he-css { min-height: 80vh; }
.he .he-code, .he .he-css { resize: vertical; min-height: 420px; }
.he-fullscreen .he-layout--nopreview > .card, .he-fullscreen .form--wide { max-width: none; }
