:root {
  --bg: #f3f8f6;
  --surface: #ffffff;
  --surface-soft: #f7fbfa;
  --surface-strong: #e8f2ef;
  --text: #183044;
  --muted: #60717a;
  --border: #dce9e5;
  --border-strong: #c7ddd6;
  --primary: #2657a4;
  --primary-hover: #1d457d;
  --primary-soft: #edf4ff;
  --success: #359a7e;
  --success-soft: #edf9f5;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --violet: #359a7e;
  --sidebar: #173b69;
  --sidebar-muted: #c4d9e4;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .14);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --sidebar-width: 260px;
  --topbar-height: 76px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111827;
  --surface-soft: #172033;
  --surface-strong: #1f2937;
  --text: #f8fafc;
  --muted: #9ca3af;
  --border: #263244;
  --border-strong: #38465c;
  --primary-soft: #162a52;
  --success-soft: #12352d;
  --warning-soft: #3b2c12;
  --danger-soft: #3a171a;
  --shadow-md: 0 16px 38px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); font-family: "Vazirmatn", system-ui, sans-serif; font-size: 14px; line-height: 1.7; overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { color: inherit; }
:focus-visible { outline: 3px solid rgba(38, 87, 164, .28); outline-offset: 2px; }
::selection { background: rgba(37, 99, 235, .2); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 0 0 auto; z-index: 50; width: var(--sidebar-width); height: 100dvh; display: flex; flex-direction: column; gap: 18px; padding: 20px 16px; overflow-y: auto; background: linear-gradient(180deg, var(--sidebar) 0%, #2657a4 58%, #236f69 100%); color: #fff; }
.brand { min-height: 54px; display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.brand-mark { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; overflow:hidden; border-radius: 13px; background: rgba(255,255,255,.08); box-shadow: 0 8px 22px rgba(20,52,94,.24); } .brand-mark img { width:100%;height:100%;object-fit:contain; }
.brand > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.brand strong { font-size: 17px; letter-spacing: -.2px; }
.brand small { color: var(--sidebar-muted); font-size: 10px; white-space: nowrap; }
.workspace-card { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(255,255,255,.05); }
.workspace-logo { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; color: #e5f4ef; background: rgba(59,130,246,.2); font-weight: 800; }
.workspace-card > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.workspace-card small { color: var(--sidebar-muted); font-size: 10px; }
.workspace-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.workspace-switcher { position:relative;margin:0; }.workspace-switcher label { min-width:0;flex:1;display:flex;flex-direction:column; }.workspace-switcher select { width:100%;padding:0 0 0 18px;border:0;outline:0;color:#fff;background:transparent;appearance:none;font-size:11px;font-weight:700;white-space:nowrap;text-overflow:ellipsis; }.workspace-switcher select option { color:#142033;background:#fff; }.workspace-switcher > i { position:absolute;inset-inline-end:12px;bottom:15px;color:var(--sidebar-muted);font-size:9px;pointer-events:none; }
.main-nav { display: flex; flex-direction: column; gap: 5px; }
.main-nav a { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border-radius: 12px; color: #cbd5e1; transition: .18s ease; font-weight: 600; }
.main-nav a i { width: 20px; text-align: center; font-size: 16px; }
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(-2px); }
.main-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(38,87,164,.35), rgba(53,154,126,.20)); box-shadow: inset -3px 0 #5b88c9; }
.sidebar-spacer { flex: 1; }
.sidebar-help { display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 13px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.05); }
.sidebar-help > i { color: #5b88c9; font-size: 22px; }
.sidebar-help div { display: flex; flex-direction: column; line-height: 1.5; }
.sidebar-help strong { font-size: 11px; }
.sidebar-help small { color: var(--sidebar-muted); font-size: 10px; }
.sidebar-help .button { grid-column: 1 / -1; }

.app-main { grid-column: 2; min-width: 0; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; min-height: var(--topbar-height); display: flex; align-items: center; gap: 16px; padding: 12px clamp(16px, 2.5vw, 34px); border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); }
.topbar-heading { min-width: 0; margin-inline-end: auto; }
.topbar-heading h1 { margin: 0; font-size: clamp(17px, 2vw, 23px); line-height: 1.35; letter-spacing: -.4px; }
.topbar-heading p { margin: 1px 0 0; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.page-content { width: 100%; max-width: 1640px; margin: 0 auto; padding: clamp(16px, 2.5vw, 34px); }

.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 15px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; transition: .16s ease; font-weight: 700; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .55; pointer-events: none; }
.button-primary { color: #fff; background: var(--primary); box-shadow: 0 8px 18px rgba(37,99,235,.18); }
.button-primary:hover { background: var(--primary-hover); }
.button-secondary { color: var(--text); border-color: var(--border); background: var(--surface); }
.button-secondary:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.button-light { color: #1d457d; background: #fff; }
.button-ghost-light { color: #fff; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); }
.button-danger { color: #fff; background: var(--danger); }
.button-danger-soft { color: var(--danger); border-color: #fecaca; background: var(--danger-soft); }
.button-success-soft { color: var(--success); border-color: #a7f3d0; background: var(--success-soft); }
.button-sm { min-height: 34px; padding: 5px 11px; border-radius: 9px; font-size: 11px; }
.button-lg { min-height: 48px; padding-inline: 22px; }
.button-block { width: 100%; }
.icon-button { width: 40px; height: 40px; flex: 0 0 40px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 11px; cursor: pointer; background: var(--surface); transition: .16s ease; }
.icon-button:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.icon-button.danger { color: var(--danger); }

.user-menu { position: relative; }
.user-menu-trigger { min-height: 45px; display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 10px; border: 1px solid var(--border); border-radius: 13px; cursor: pointer; background: var(--surface); }
.avatar { width: 35px; height: 35px; flex: 0 0 35px; display: inline-grid; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(145deg, #2657a4, #359a7e); font-weight: 800; }
.user-menu-copy { min-width: 90px; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.4; }
.user-menu-copy strong { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.user-menu-copy small { color: var(--muted); font-size: 9px; }
.dropdown-menu { position: absolute; top: calc(100% + 9px); inset-inline-end: 0; z-index: 90; width: 190px; display: none; padding: 7px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-lg); }
.dropdown-menu.open { display: block; animation: dropdownIn .15s ease; }
.dropdown-menu a, .dropdown-menu button { width: 100%; min-height: 39px; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 0; border-radius: 9px; cursor: pointer; background: transparent; text-align: start; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-soft); }
.dropdown-menu form { margin: 0; }
@keyframes dropdownIn { from { opacity: 0; transform: translateY(-4px); } }

.panel-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.section-head { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.section-head > div { min-width: 0; }
.section-head h3 { margin: 0; font-size: 15px; }
.section-head p { margin: 1px 0 0; color: var(--muted); font-size: 10px; }
.section-head > a { color: var(--primary); font-size: 11px; font-weight: 700; }

.hero-card { position: relative; min-height: 244px; display: flex; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; padding: clamp(25px, 4vw, 48px); border-radius: var(--radius-lg); color: #fff; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.16), transparent 30%), linear-gradient(120deg, #1d457d 0%, #4f46e5 55%, #359a7e 100%); box-shadow: 0 20px 50px rgba(49,46,129,.2); }
.hero-card h2 { max-width: 680px; margin: 7px 0 6px; font-size: clamp(21px, 3vw, 34px); line-height: 1.5; }
.hero-card p { max-width: 650px; margin: 0; color: #e5f4ef; }
.eyebrow { display: inline-flex; padding: 5px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.1); font-size: 10px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.hero-illustration { position: relative; width: 210px; height: 160px; flex: 0 0 210px; display: grid; place-items: center; }
.hero-illustration i { position: relative; z-index: 3; font-size: 78px; filter: drop-shadow(0 18px 20px rgba(0,0,0,.18)); }
.hero-illustration span { position: absolute; width: 120px; height: 145px; border: 2px solid rgba(255,255,255,.22); border-radius: 12px; background: rgba(255,255,255,.08); transform: rotate(9deg) translate(-15px, 7px); }
.hero-illustration span:last-child { transform: rotate(-7deg) translate(18px, 6px); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.stat-card { min-height: 116px; display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.stat-icon { width: 47px; height: 47px; flex: 0 0 47px; display: grid; place-items: center; border-radius: 14px; font-size: 18px; }
.stat-icon.blue { color: #2657a4; background: #edf4ff; }.stat-icon.green { color: #059669; background: #ecfdf5; }.stat-icon.amber { color: #d97706; background: #fffbeb; }.stat-icon.violet { color: #359a7e; background: #f5f3ff; }
.stat-card > div { display: flex; flex-direction: column; line-height: 1.45; }
.stat-card small { color: var(--muted); font-size: 10px; }
.stat-card strong { font-size: 25px; letter-spacing: -.5px; }
.stat-card span { color: var(--muted); font-size: 9px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; margin-top: 16px; }
.span-2 { min-width: 0; }
.document-mini-list { padding: 6px 12px 12px; }
.document-mini-list > a { display: grid; grid-template-columns: 42px minmax(0,1fr) auto 14px; align-items: center; gap: 10px; min-height: 66px; padding: 9px 7px; border-bottom: 1px solid var(--border); border-radius: 10px; }
.document-mini-list > a:last-child { border-bottom: 0; }
.document-mini-list > a:hover { background: var(--surface-soft); }
.doc-type-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: var(--primary); background: var(--primary-soft); }
.document-mini-list a > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.document-mini-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.document-mini-list small { color: var(--muted); font-size: 9px; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-badge.published, .status-badge.ticket-resolved { color: #047857; background: #ecfdf5; }.status-badge.draft, .status-badge.ticket-open { color: #b45309; background: #fffbeb; }.status-badge.archived, .status-badge.ticket-closed { color: #64748b; background: #f1f5f9; }.status-badge.ticket-pending { color: #1d457d; background: #edf4ff; }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; padding: 14px; }
.quick-actions a { min-height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); font-weight: 700; }
.quick-actions a:hover { color: var(--primary); border-color: #bfdbfe; background: var(--primary-soft); transform: translateY(-2px); }
.quick-actions i { font-size: 21px; }
.empty-compact { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted); }
.empty-compact i { font-size: 27px; }.empty-compact p { margin: 0; }
.empty-state { min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; }
.empty-state > i { margin-bottom: 16px; color: var(--primary); font-size: 55px; }.empty-state h2 { margin: 0; }.empty-state p { max-width: 460px; margin: 6px 0 20px; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { color: var(--text); font-size: 11px; font-weight: 700; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]), .field select, .field textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 11px; color: var(--text); background: var(--surface); transition: .16s ease; }
.field textarea { resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-strong); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #5b88c9; box-shadow: 0 0 0 4px rgba(59,130,246,.1); outline: none; }
.form-grid { display: grid; gap: 14px; }.form-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }.form-grid .span-2 { grid-column: 1/-1; }
.check-row, .switch-row { min-height: 38px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check-row input, .switch-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.input-with-icon { position: relative; }
.input-with-icon > i { position: absolute; inset-inline-start: 13px; top: 50%; color: var(--muted); transform: translateY(-50%); }
.input-with-icon input { padding-inline-start: 39px !important; }
.password-toggle { position: absolute; inset-inline-end: 5px; top: 50%; width: 36px; height: 36px; border: 0; border-radius: 9px; cursor: pointer; background: transparent; transform: translateY(-50%); }
.search-input { min-width: min(360px, 100%); min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.search-input.compact { min-width: 240px; min-height: 38px; }
.search-input i { color: var(--muted); }.search-input input { width: 100%; border: 0; color: var(--text); background: transparent; outline: 0; }
.select-wrap { position: relative; min-width: 160px; min-height: 44px; display: flex; align-items: center; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.select-wrap i { position: absolute; inset-inline-start: 12px; z-index: 1; color: var(--muted); pointer-events: none; }
.select-wrap select { width: 100%; height: 42px; padding: 0 36px 0 10px; border: 0; color: var(--text); background: transparent; outline: 0; }

.document-toolbar { margin-bottom: 16px; padding: 12px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 9px; }
.filter-bar .search-input { flex: 1 1 320px; }
.documents-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.document-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: .18s ease; }
.document-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.document-card-preview { position: relative; aspect-ratio: 16/9; overflow: hidden; padding: 28px 28px; background: linear-gradient(145deg,#e5f4ef,#eef7f4); }
.document-card-preview::before { content: ""; position: absolute; inset: 17px 25px; border-radius: 7px; background: #fff; box-shadow: 0 9px 25px rgba(15,23,42,.12); transform: rotate(-2deg); }
.document-card-preview i { position: absolute; inset-inline-end: 42px; bottom: 29px; z-index: 2; color: #2657a4; font-size: 28px; }
.paper-line { position: relative; z-index: 2; width: 55%; height: 5px; display: block; margin: 11px; border-radius: 5px; background: #cbd5e1; }.paper-line.wide { width: 72%; height: 8px; background: #5b88c9; }.paper-line.short { width: 38%; }
.document-card-preview.theme-letter { background: linear-gradient(145deg,#fef3c7,#fff7ed); }.document-card-preview.theme-letter i { color: #d97706; }.document-card-preview.theme-user_guide { background: linear-gradient(145deg,#dcfce7,#ecfdf5); }.document-card-preview.theme-user_guide i { color: #059669; }.document-card-preview.theme-article { background: linear-gradient(145deg,#f3e8ff,#f5f3ff); }.document-card-preview.theme-article i { color: #359a7e; }
.document-card-body { padding: 14px; }
.document-card-heading { display: flex; justify-content: space-between; gap: 8px; }
.type-chip, .role-chip { min-height: 24px; display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; color: var(--primary); background: var(--primary-soft); font-size: 9px; font-weight: 700; }.role-chip.owner { color: #359a7e; background: #f5f3ff; }
.document-card h3 { margin: 10px 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.document-card-model { width: fit-content; max-width: 100%; min-height: 27px; display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 3px; padding: 4px 8px; border: 1px solid color-mix(in srgb,var(--primary) 20%,var(--border)); border-radius: 9px; color: var(--text); background: var(--primary-soft); font-size: 9px; } .document-card-model i { color: var(--primary); font-size: 10px; } .document-card-model span { color: var(--muted); } .document-card-model strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--primary); font-size: 10px; }
.document-card-creator{display:grid;text-decoration:none;color:inherit;grid-template-columns:46px minmax(0,1fr);align-items:center;gap:10px;margin:10px 0 8px;padding:8px 10px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft)}.creator-logo{width:46px;height:46px;border-radius:12px;overflow:hidden;display:grid;place-items:center;background:#fff;border:1px solid var(--border)}.creator-logo img{width:100%;height:100%;display:block;object-fit:contain;padding:5px}.creator-logo.is-fallback{background:linear-gradient(145deg,#2657a4,#359a7e);color:#fff;border-color:transparent}.creator-logo b{font-size:18px}.creator-copy{min-width:0;display:flex;flex-direction:column;line-height:1.45}.creator-copy strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.creator-copy small{font-size:9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.document-card-creator:hover{border-color:rgba(38,87,164,.28);background:var(--surface)}
.document-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: 9px; }.document-meta span { display: flex; align-items: center; gap: 4px; }
.document-card-actions { display: flex; align-items: center; gap: 6px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--border); }.document-card-actions .button { margin-inline-end: auto; }.document-card-actions form { display: contents; }

.create-document-layout { display: grid; gap: 16px; padding-bottom: 80px; }
.create-basics, .template-picker-section { overflow: hidden; }.create-basics .form-grid { padding: 18px; }
.step-number { width: 30px; height: 30px; float: right; display: inline-grid; place-items: center; margin-inline-end: 10px; border-radius: 9px; color: #fff; background: var(--primary); }
.template-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; padding: 18px; }
.template-option { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; transition: .17s ease; }
.template-option:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }.template-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.template-option input { position: absolute; opacity: 0; pointer-events: none; }
.template-preview { position: relative; aspect-ratio: 4/3; display: block; background-color: var(--surface-soft); background-size: cover; background-position: center; }
.selected-mark { position: absolute; top: 9px; inset-inline-end: 9px; width: 28px; height: 28px; display: none; place-items: center; border-radius: 50%; color: #fff; background: var(--primary); }.template-option:has(input:checked) .selected-mark { display: grid; }
.template-copy { display: flex; flex-direction: column; padding: 12px; }.template-copy strong { font-size: 12px; }.template-copy small { color: var(--muted); font-size: 9px; }
.sticky-form-actions { position: sticky; bottom: 12px; z-index: 20; display: flex; justify-content: flex-end; gap: 9px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb,var(--surface) 92%,transparent); box-shadow: var(--shadow-md); backdrop-filter: blur(16px); }

.subnav { display: flex; align-items: center; gap: 5px; overflow-x: auto; margin-bottom: 16px; padding: 5px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); scrollbar-width: none; }.subnav::-webkit-scrollbar { display:none; }.subnav a { min-height: 39px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 10px; color: var(--muted); font-weight: 700; white-space: nowrap; }.subnav a.active { color: var(--primary); background: var(--primary-soft); }
.responsive-table { width: 100%; overflow-x: auto; }.responsive-table table { width: 100%; min-width: 760px; border-collapse: collapse; }.responsive-table th { padding: 11px 16px; color: var(--muted); background: var(--surface-soft); text-align: right; font-size: 10px; }.responsive-table td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: middle; }.text-left { text-align: left !important; }
.table-user { display: flex; align-items: center; gap: 9px; }.table-user > span:last-child { display: flex; flex-direction: column; line-height: 1.45; }.table-user strong { font-size: 11px; }.table-user small { color: var(--muted); font-size: 9px; }
.company-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }.company-card { padding: 17px; }.company-card-head { display: flex; align-items: flex-start; justify-content: space-between; }.company-logo { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg,#2657a4,#359a7e); font-size: 20px; font-weight: 800; }.company-card h3 { margin: 14px 0 0; }.company-card > p { margin: 1px 0 15px; color: var(--muted); font-size: 10px; }.company-metrics { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }.company-metrics span { display: grid; grid-template-columns: 26px 1fr; padding: 9px; border-radius: 11px; background: var(--surface-soft); }.company-metrics i { grid-row: 1/3; align-self:center; color: var(--primary); }.company-metrics strong { font-size: 16px; }.company-metrics small { color: var(--muted); font-size: 9px; }.company-status-field { margin-top: 14px; }
.roles-layout { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 16px; }.role-list-panel,.role-detail-panel { overflow:hidden; }.role-list { padding: 8px; }.role-item { width: 100%; min-height: 58px; display: grid; grid-template-columns: 13px minmax(0,1fr) 14px; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; cursor:pointer; background:transparent; text-align:right; }.role-item:hover,.role-item.active { background:var(--surface-soft); }.role-item > span:nth-child(2) { display:flex;flex-direction:column; }.role-item small { color:var(--muted);font-size:9px; }.role-dot { width: 11px;height:11px;display:inline-block;border-radius:50%;background:var(--role-color); }.role-dot.large { width:18px;height:18px; }.role-permissions-view { display:none;padding:18px; }.role-permissions-view.active { display:block; }.role-view-title { display:flex;align-items:center;gap:10px;margin-bottom:16px; }.role-view-title h3,.role-view-title p { margin:0; }.role-view-title p { color:var(--muted);font-size:10px; }.permission-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }.permission-item { min-height:52px;display:flex;align-items:center;gap:9px;padding:9px 11px;border:1px solid var(--border);border-radius:11px;opacity:.55; }.permission-item.enabled { opacity:1;border-color:#bfdbfe;background:var(--primary-soft); }.permission-item > i { width:26px;height:26px;display:grid;place-items:center;border-radius:8px;background:var(--surface-strong); }.permission-item.enabled > i { color:#fff;background:var(--primary); }.permission-item span { display:flex;flex-direction:column; }.permission-item strong { font-size:10px; }.permission-item small { color:var(--muted);font-size:8px;direction:ltr;text-align:right; }
.permission-checkbox-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:420px;overflow:auto;margin:14px 0; }.permission-checkbox-grid label { display:flex;align-items:flex-start;gap:8px;padding:10px;border:1px solid var(--border);border-radius:11px;cursor:pointer; }.permission-checkbox-grid label:has(input:checked) { border-color:#93c5fd;background:var(--primary-soft); }.permission-checkbox-grid input { margin-top:3px;accent-color:var(--primary); }.permission-checkbox-grid span { display:flex;flex-direction:column; }.permission-checkbox-grid strong { font-size:10px; }.permission-checkbox-grid small { color:var(--muted);font-size:8px; }
.settings-layout { display:grid;gap:16px;padding-bottom:80px; }.settings-layout .panel-card { padding-bottom:18px; }.settings-layout > .panel-card > .field,.large-switch { margin:18px; }.large-switch { min-height:90px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft);cursor:pointer; }.large-switch > span { display:flex;flex-direction:column; }.large-switch small { max-width:700px;color:var(--muted);font-size:10px; }.large-switch input { width:48px;height:25px;accent-color:var(--primary); }.service-indicator { display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-size:9px;font-weight:700; }.service-indicator.online { color:var(--success);background:var(--success-soft); }.service-indicator.offline { color:var(--danger);background:var(--danger-soft); }
.feature-list { display:grid;gap:10px;padding:16px; }.feature-list > div { display:flex;align-items:center;gap:12px;padding:13px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft); }.feature-list i { width:38px;height:38px;display:grid;place-items:center;border-radius:11px;color:var(--primary);background:var(--primary-soft); }.feature-list span { display:flex;flex-direction:column; }.feature-list strong { font-size:11px; }.feature-list small { color:var(--muted);font-size:9px; }.stack-actions { display:grid;gap:8px;padding:16px; }

.ticket-list { padding:6px 10px 12px; }.ticket-list a { min-height:67px;display:grid;grid-template-columns:12px minmax(0,1fr) auto 135px 14px;align-items:center;gap:10px;padding:10px 8px;border-bottom:1px solid var(--border);border-radius:10px; }.ticket-list a:hover { background:var(--surface-soft); }.ticket-priority { font-size:8px; }.ticket-priority.low { color:#94a3b8; }.ticket-priority.normal { color:#2657a4; }.ticket-priority.high { color:#f59e0b; }.ticket-priority.urgent { color:#dc2626; }.ticket-main { min-width:0;display:flex;flex-direction:column; }.ticket-main strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px; }.ticket-main small,.ticket-list time { color:var(--muted);font-size:9px; }.ticket-detail-layout { display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:16px; }.conversation { overflow:hidden; }.conversation-head { display:flex;align-items:center;justify-content:space-between;padding:15px 18px;border-bottom:1px solid var(--border); }.message-list { display:flex;flex-direction:column;gap:14px;min-height:300px;padding:20px; }.message { display:flex;align-items:flex-start;gap:9px;max-width:86%; }.message.staff { align-self:flex-start; }.message.customer { align-self:flex-end;flex-direction:row-reverse; }.message-avatar { width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:10px;color:#fff;background:#64748b;font-weight:800; }.message.customer .message-avatar { background:var(--primary); }.message-bubble { min-width:0;padding:11px 13px;border:1px solid var(--border);border-radius:13px;background:var(--surface-soft); }.message.customer .message-bubble { color:#fff;border-color:var(--primary);background:var(--primary); }.message.internal .message-bubble { border-style:dashed;border-color:#f59e0b;background:var(--warning-soft);color:var(--text); }.message-bubble header { display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:4px; }.message-bubble header strong { font-size:10px; }.message-bubble header span { color:#b45309;font-size:8px; }.message-bubble time { margin-inline-start:auto;color:var(--muted);font-size:8px; }.message.customer .message-bubble time { color:#e5f4ef; }.message-bubble p { margin:0;white-space:pre-wrap; }.reply-box { padding:16px;border-top:1px solid var(--border); }.reply-actions { display:flex;justify-content:flex-end;margin-top:10px; }.ticket-info { align-self:start;padding:16px; }.ticket-info h3 { margin-top:0; }.ticket-info dl { margin:0 0 16px; }.ticket-info dl div { display:flex;justify-content:space-between;gap:8px;padding:9px 0;border-bottom:1px solid var(--border); }.ticket-info dt { color:var(--muted); }.ticket-info dd { margin:0;font-weight:700; }

.modal { position:fixed;inset:0;z-index:200;display:none;place-items:center;padding:16px;background:rgba(15,23,42,.58);backdrop-filter:blur(6px); }.modal.open { display:grid; }.modal-dialog { width:min(680px,100%);max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-lg);animation:modalIn .18s ease; }.modal-dialog.modal-sm { width:min(470px,100%); }.modal-head { display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:17px 18px;border-bottom:1px solid var(--border); }.modal-head h2 { margin:0;font-size:17px; }.modal-head p { margin:2px 0 0;color:var(--muted);font-size:10px; }.modal-body { padding:18px; }.inline-invite { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;padding-bottom:16px;border-bottom:1px solid var(--border); }.permission-checks { grid-column:1/-1;display:flex;flex-wrap:wrap;gap:12px; }.permission-checks label { display:flex;align-items:center;gap:6px; }.collaborator-list { display:grid;gap:7px;margin-top:14px; }.collaborator-list > div { display:grid;grid-template-columns:35px minmax(0,1fr) auto 40px;align-items:center;gap:9px;padding:8px;border:1px solid var(--border);border-radius:11px; }.collaborator-list > div > span:nth-child(2) { display:flex;flex-direction:column; }.collaborator-list strong { font-size:10px; }.collaborator-list small,.access-summary { color:var(--muted);font-size:8px; }.help-text { display:flex;gap:7px;margin:13px 0;color:var(--muted);font-size:10px; }.version-list { display:grid;gap:7px; }.version-list > div { display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px;border:1px solid var(--border);border-radius:11px; }.skeleton-list span { display:block;height:45px;border-radius:10px;background:linear-gradient(90deg,var(--surface-soft),var(--surface-strong),var(--surface-soft));background-size:200% 100%;animation:skeleton 1.4s infinite; }
@keyframes modalIn { from { opacity:0;transform:translateY(10px) scale(.98); } } @keyframes skeleton { to { background-position:-200% 0; } }

.toast-region { position:fixed;inset-inline-start:20px;bottom:20px;z-index:500;display:grid;gap:8px;width:min(360px,calc(100vw - 40px)); }.toast { display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border:1px solid var(--border);border-radius:13px;background:var(--surface);box-shadow:var(--shadow-lg);animation:toastIn .2s ease; }.toast.success i { color:var(--success); }.toast.error i { color:var(--danger); }.toast.warning i { color:var(--warning); }.toast span { display:flex;flex-direction:column; }.toast strong { font-size:11px; }.toast small { color:var(--muted);font-size:9px; }.toast button { margin-inline-start:auto;border:0;background:transparent;cursor:pointer; }
@keyframes toastIn { from { opacity:0;transform:translateY(10px); } }

.auth-page { background:#eef7f4; }.auth-shell { min-height:100dvh;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(420px,.95fr); }.auth-visual { position:relative;display:flex;align-items:center;overflow:hidden;padding:clamp(35px,6vw,90px);color:#fff;background:radial-gradient(circle at 25% 20%,rgba(255,255,255,.18),transparent 30%),linear-gradient(140deg,#173b69,#2657a4 58%,#359a7e); }.auth-visual::after { content:"";position:absolute;width:430px;height:430px;inset-inline-end:-180px;bottom:-170px;border:80px solid rgba(255,255,255,.06);border-radius:50%; }.auth-visual-content { position:relative;z-index:2;max-width:650px; }.auth-logo { display:inline-flex;align-items:center;gap:9px;margin-bottom:32px;font-size:20px;font-weight:800; }.auth-visual h1 { margin:0 0 28px;font-size:clamp(27px,4vw,50px);line-height:1.55; }.auth-visual > div > p { color:#e5f4ef;font-size:15px; }.auth-feature { display:flex;align-items:center;gap:12px;margin:15px 0; }.auth-feature > i { width:43px;height:43px;display:grid;place-items:center;border-radius:13px;background:rgba(255,255,255,.11);font-size:17px; }.auth-feature span { display:flex;flex-direction:column; }.auth-feature small { color:#cbd5e1;font-size:11px; }.auth-form-wrap { display:grid;place-items:center;padding:26px;background:var(--surface); }.auth-card { width:min(520px,100%);display:grid;gap:14px; }.auth-card-head { margin-bottom:8px; }.auth-card-head h2 { margin:0;font-size:28px; }.auth-card-head p { margin:5px 0 0;color:var(--muted); }.auth-switch { margin:5px 0 0;text-align:center;color:var(--muted); }.auth-switch a { color:var(--primary);font-weight:700; }

.editor-page .page-content { max-width:none;padding:0; }.editor-page .topbar { position:relative; }.editor-title-wrap { display:flex;align-items:center;gap:10px; }.editor-title-input { width:min(420px,45vw);padding:2px 5px;border:1px solid transparent;border-radius:8px;color:var(--text);background:transparent;font-size:inherit;font-weight:800; }.editor-title-input:hover,.editor-title-input:focus { border-color:var(--border);background:var(--surface);outline:0; }.save-state { color:var(--success);font-size:9px;font-weight:500;white-space:nowrap; }.save-state.saving { color:var(--warning); }.save-state.error { color:var(--danger); }
.editor-shell { height:calc(100dvh - var(--topbar-height));display:grid;grid-template-columns:380px minmax(0,1fr);overflow:hidden; }.editor-controls { min-width:0;overflow-y:auto;border-inline-end:1px solid var(--border);background:var(--surface); }.editor-tabs { position:sticky;top:0;z-index:5;display:grid;grid-template-columns:repeat(3,1fr);padding:7px;border-bottom:1px solid var(--border);background:var(--surface); }.editor-tabs button { min-height:42px;display:flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:10px;cursor:pointer;color:var(--muted);background:transparent;font-weight:700; }.editor-tabs button.active { color:var(--primary);background:var(--primary-soft); }.editor-tab-panel { display:none;padding-bottom:30px; }.editor-tab-panel.active { display:block; }.control-section { padding:15px;border-bottom:1px solid var(--border); }.control-section.compact { padding-bottom:8px; }.control-section > h3,.control-section-head h3 { margin:0 0 11px;font-size:12px; }.control-section-head { display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px; }.control-section-head h3 { margin:0; }.hint { color:var(--muted);font-size:8px; }
.page-list,.block-list { display:grid;gap:6px; }.page-item,.block-item { min-height:44px;display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:7px;padding:6px;border:1px solid var(--border);border-radius:10px;cursor:pointer;background:var(--surface); }.page-item.active,.block-item.active { border-color:#93c5fd;background:var(--primary-soft); }.page-item.dragging,.block-item.dragging { opacity:.45; }.drag-handle { width:28px;height:28px;display:grid;place-items:center;color:var(--muted);cursor:grab; }.page-item span,.block-item span { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:700; }.page-item-actions,.block-item-actions { display:flex; }.page-item-actions button,.block-item-actions button { width:28px;height:28px;border:0;border-radius:8px;cursor:pointer;background:transparent; }.page-item-actions button:hover,.block-item-actions button:hover { background:var(--surface-strong); }.block-library { display:grid;grid-template-columns:repeat(4,1fr);gap:7px; }.block-library button { min-height:65px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:6px;border:1px solid var(--border);border-radius:10px;cursor:pointer;background:var(--surface-soft);font-size:9px; }.block-library button:hover { color:var(--primary);border-color:#93c5fd;background:var(--primary-soft);transform:translateY(-1px); }.block-library i { font-size:16px; }
.empty-inspector { min-height:110px;display:grid;place-items:center;align-content:center;color:var(--muted);text-align:center; }.empty-inspector i { font-size:22px; }.empty-inspector p { margin:5px 0;font-size:10px; }.inspector-fields { display:grid;gap:11px; }.rich-editor-toolbar { display:flex;flex-wrap:wrap;gap:4px;padding:5px;border:1px solid var(--border);border-bottom:0;border-radius:10px 10px 0 0;background:var(--surface-soft); }.rich-editor-toolbar button { width:31px;height:31px;border:0;border-radius:7px;cursor:pointer;background:transparent; }.rich-editor-toolbar button:hover { background:var(--surface-strong); }.rich-editor { min-height:160px;padding:10px;border:1px solid var(--border);border-radius:0 0 10px 10px;background:var(--surface);outline:0; }.rich-editor:focus { border-color:#5b88c9;box-shadow:0 0 0 4px rgba(59,130,246,.08); }.image-uploader { display:grid;gap:9px; }.image-dropzone { min-height:130px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:14px;border:2px dashed var(--border-strong);border-radius:12px;cursor:pointer;background:var(--surface-soft);text-align:center; }.image-dropzone:hover,.image-dropzone.dragover { border-color:#5b88c9;background:var(--primary-soft); }.image-dropzone i { color:var(--primary);font-size:26px; }.image-dropzone small { color:var(--muted);font-size:9px; }.image-dropzone img { max-height:160px;border-radius:8px; }.range-row { display:grid;grid-template-columns:minmax(0,1fr) 50px;align-items:center;gap:8px; }.range-row output { text-align:center;color:var(--muted);font-size:9px; }.color-field { display:grid;grid-template-columns:48px minmax(0,1fr);gap:7px; }.color-field input[type=color] { width:48px;height:44px;padding:3px;border:1px solid var(--border);border-radius:10px;background:var(--surface); }.preset-grid { display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:10px; }.preset-grid button { min-height:45px;border:1px solid var(--border);border-radius:9px;cursor:pointer;background:var(--surface-soft);font-size:9px; }.preset-grid button.active { color:var(--primary);border-color:#5b88c9;background:var(--primary-soft); }.publish-actions { display:grid;gap:7px;margin-top:12px; }.danger-zone { background:color-mix(in srgb,var(--danger-soft) 70%,transparent); }
.editor-preview { min-width:0;display:flex;flex-direction:column;overflow:hidden;background:#dfe5ee; }.preview-toolbar { min-height:51px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 12px;border-bottom:1px solid #cbd5e1;background:#f8fafc;color:#334155; }.preview-toolbar > div { display:flex;align-items:center;gap:6px; }.preview-toolbar .icon-button { width:33px;height:33px;flex-basis:33px;background:#fff; }.preview-toolbar [data-zoom-label] { width:45px;text-align:center;font-size:10px;font-weight:700; }.preview-stage { flex:1;overflow:auto;padding:36px 30px;direction:ltr; }.preview-document { width:794px;margin:0 auto;transform-origin:top center;direction:rtl; }.preview-page { position:relative;width:794px;min-height:1123px;overflow:hidden;margin:0 auto 28px;padding:var(--preview-padding,38px);color:var(--preview-text,#172033);background:var(--preview-surface,#fff);box-shadow:0 18px 45px rgba(15,23,42,.18);font-family:var(--preview-font,"Vazirmatn");direction:var(--preview-direction,rtl); }.preview-page.cover { display:grid;place-items:center; }.preview-cover-shape { position:absolute;inset:0;background:linear-gradient(145deg,var(--preview-accent),color-mix(in srgb,var(--preview-accent) 50%,#359a7e));clip-path:polygon(0 0,100% 0,100% 69%,72% 78%,38% 68%,0 81%); }.preview-page.cover.shape-diagonal .preview-cover-shape { clip-path:polygon(0 0,100% 0,100% 62%,0 90%); }.preview-page.cover.shape-frame .preview-cover-shape { inset:28px;border:4px solid var(--preview-accent);background:transparent;clip-path:none; }.preview-page.cover.shape-minimal .preview-cover-shape { inset:auto 0 0;height:14px;clip-path:none; }.preview-cover-content { position:relative;z-index:2;width:76%;text-align:center; }.preview-page.cover:not(.shape-frame):not(.shape-minimal) .preview-cover-content { color:#fff; }.preview-cover-company { display:inline-flex;margin-bottom:28px;padding:6px 13px;border-radius:999px;background:rgba(255,255,255,.14);font-size:13px; }.preview-cover-content h1 { margin:0;font-size:44px;line-height:1.5; }.preview-cover-content p { font-size:19px; }.preview-cover-model { display:inline-flex;margin-top:22px;padding:7px 18px;border:1px solid currentColor;border-radius:9px; }.preview-header { min-height:50px;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:calc(var(--preview-padding,38px) * -1);margin-bottom:28px;padding:0 var(--preview-padding,38px);border-bottom:2px solid var(--preview-accent);font-size:11px; }.preview-header.band { color:#fff;border:0;background:var(--preview-accent); }.preview-header.boxed { margin-top:0;border:1px solid var(--preview-accent);border-radius:8px; }.preview-header.minimal { border-color:#e2e8f0; }.preview-footer { position:absolute;inset-inline:var(--preview-padding,38px);bottom:0;min-height:42px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e2e8f0;font-size:10px; }.preview-footer.band { inset-inline:0;padding-inline:var(--preview-padding,38px);color:#fff;border:0;background:var(--preview-accent); }.preview-footer.split::before { content:"";position:absolute;inset-inline-start:0;top:-2px;width:35%;height:3px;background:var(--preview-accent); }.preview-page-content { padding-bottom:48px; }.preview-block { position:relative;margin:0 0 17px;border:1px solid transparent;border-radius:7px;transition:.12s ease; }.preview-block:hover { border-color:#93c5fd;box-shadow:0 0 0 3px rgba(59,130,246,.08); }.preview-block.selected { border-color:var(--preview-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preview-accent) 18%,transparent); }.preview-block h1,.preview-block h2,.preview-block h3 { color:var(--preview-accent);line-height:1.5; }.preview-block h1 { font-size:28px; }.preview-block h2 { font-size:22px; }.preview-block h3 { font-size:18px; }.preview-block .rich-content { font-size:14px;line-height:2; }.preview-block .callout { padding:14px;border-inline-start:4px solid var(--preview-accent);border-radius:7px;background:color-mix(in srgb,var(--preview-accent) 8%,#fff); }.preview-block figure { margin:0; }.preview-block img { max-width:100%;border-radius:5px; }.preview-block figcaption { margin-top:5px;color:#64748b;font-size:10px; }.preview-data-table { width:100%;border-collapse:collapse;font-size:11px; }.preview-data-table th,.preview-data-table td { padding:8px;border:1px solid #d8dee8;text-align:start; }.preview-data-table th { color:#fff;background:var(--preview-accent); }.preview-columns { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px; }.preview-formula { padding:14px;border-radius:8px;background:#f8fafc;text-align:center;direction:ltr;font-family:monospace;font-size:17px; }.editor-mobile-tabs { display:none; }

.sidebar-scrim { display:none; }.mobile-only { display:none; }

@media (max-width: 1280px) {
  :root { --sidebar-width: 230px; }
  .documents-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .template-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .editor-shell { grid-template-columns:350px minmax(0,1fr); }
  .user-menu-copy { display:none; }
}

@media (max-width: 1024px) {
  .app-shell { grid-template-columns:1fr; }
  .app-main { grid-column:1; }
  .sidebar { transform:translateX(105%);transition:.22s ease;box-shadow:var(--shadow-lg); }
  .sidebar.open { transform:translateX(0); }
  .sidebar-scrim { position:fixed;inset:0;z-index:40;background:rgba(15,23,42,.48); }.sidebar-scrim.open { display:block; }
  .mobile-only { display:inline-grid; }
  .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns:1fr; }
  .documents-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .template-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .company-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ticket-detail-layout { grid-template-columns:1fr; }.ticket-info { order:-1; }
  .editor-page .topbar { position:sticky; }
  .editor-mobile-tabs { position:sticky;top:var(--topbar-height);z-index:29;display:grid;grid-template-columns:repeat(2,1fr);padding:6px;border-bottom:1px solid var(--border);background:var(--surface); }.editor-mobile-tabs button { min-height:40px;border:0;border-radius:9px;color:var(--muted);background:transparent;font-weight:700; }.editor-mobile-tabs button.active { color:var(--primary);background:var(--primary-soft); }
  .editor-shell { height:calc(100dvh - var(--topbar-height) - 53px);display:block; }.editor-controls,.editor-preview { width:100%;height:100%; }.editor-preview { display:none; }.editor-shell.show-preview .editor-controls { display:none; }.editor-shell.show-preview .editor-preview { display:flex; }
}

@media (max-width: 768px) {
  :root { --topbar-height:68px; }
  .topbar { gap:8px;padding:10px 12px; }.topbar-heading p { display:none; }.topbar-actions { gap:5px; }.topbar-actions .button,.topbar-actions .icon-button { width:38px;min-width:38px;height:38px;padding:0; }.desktop-label { display:none; }.user-menu-trigger { width:40px;min-height:40px;padding:2px;border:0; }.user-menu-trigger > i { display:none; }
  .page-content { padding:14px; }
  .hero-card { min-height:unset;padding:25px; }.hero-illustration { display:none; }
  .stats-grid { grid-template-columns:1fr 1fr;gap:9px; }.stat-card { min-height:95px;padding:12px; }.stat-icon { width:40px;height:40px;flex-basis:40px; }.stat-card strong { font-size:21px; }
  .documents-grid { gap:11px; }.document-card-preview { padding:15px; }.document-card-body { padding:11px; }.document-meta span:last-child { display:none; }
  .filter-bar .search-input,.select-wrap,.filter-bar .button { width:100%;flex:1 1 100%; }
  .roles-layout { grid-template-columns:1fr; }.permission-grid { grid-template-columns:1fr; }.role-detail-panel { min-height:300px; }
  .ticket-list a { grid-template-columns:10px minmax(0,1fr) auto 14px; }.ticket-list time { display:none; }
  .message { max-width:96%; }
  .inline-invite { grid-template-columns:1fr; }.inline-invite .button { width:100%; }
  .permission-checkbox-grid { grid-template-columns:1fr; }
  .auth-shell { grid-template-columns:1fr; }.auth-visual { min-height:280px;padding:25px; }.auth-visual h1 { font-size:25px; }.auth-feature { display:none; }.auth-logo { margin-bottom:18px; }.auth-form-wrap { padding:22px 16px; }.auth-card-head h2 { font-size:23px; }
}

@media (max-width: 560px) {
  .topbar-heading { max-width:calc(100vw - 190px); }.topbar-heading h1 { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px; }
  .form-grid.two { grid-template-columns:1fr; }.form-grid .span-2 { grid-column:auto; }
  .stats-grid { grid-template-columns:1fr; }.stat-card { min-height:84px; }
  .documents-grid,.template-grid,.company-grid { grid-template-columns:1fr; }
  .document-card { display:grid;grid-template-columns:120px minmax(0,1fr); }.document-card-preview { height:100%;aspect-ratio:auto; }.document-card-body { min-width:0; }.document-card-actions .button { width:35px;min-width:35px;padding:0; }.document-card-actions .button { font-size:0; }.document-card-actions .button i { font-size:12px; }
  .quick-actions { grid-template-columns:1fr 1fr; }.hero-actions .button { width:100%; }
  .sticky-form-actions { bottom:6px; }.sticky-form-actions .button { flex:1; }
  .subnav { margin-inline:-3px; }
  .large-switch { align-items:flex-start; }.large-switch input { flex:0 0 48px; }
  .preset-grid { grid-template-columns:repeat(2,1fr); }.block-library { grid-template-columns:repeat(4,1fr); }.block-library button { min-height:58px;font-size:8px; }
  .preview-stage { padding:20px 10px; }.preview-toolbar .button { width:auto;min-width:max-content;padding:0 9px;font-size:9px; }.preview-toolbar .button i { font-size:12px; }
  .modal { align-items:end;padding:0; }.modal-dialog,.modal-dialog.modal-sm { width:100%;max-height:92dvh;border-radius:20px 20px 0 0; }
  .toast-region { inset-inline:10px;bottom:10px;width:auto; }
}

@media (max-width: 380px) {
  .page-content { padding:10px; }.topbar { padding-inline:8px; }.topbar-heading { max-width:100px; }
  .block-library { grid-template-columns:repeat(3,1fr); }
  .document-card { grid-template-columns:100px minmax(0,1fr); }.document-card-actions .icon-button { width:32px;height:32px;flex-basis:32px; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior:auto !important;animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important; }
}

/* Role assignment and administrative refinements */
.role-chip-list,.table-actions,.role-view-actions { display:flex;align-items:center;flex-wrap:wrap;gap:6px; }
.role-chip[style] { color:var(--role-color);background:color-mix(in srgb,var(--role-color) 12%,var(--surface)); }
.role-view-actions { margin-inline-start:auto; }
.role-check-field { margin:14px 0;padding:0;border:0; }.role-check-field legend { margin-bottom:8px;font-size:11px;font-weight:800; }
.permission-checkbox-grid.compact { max-height:260px; }
.notice-card { display:flex;align-items:flex-start;gap:12px;margin-bottom:16px;padding:14px 16px;border:1px solid #fde68a;border-radius:14px;color:#92400e;background:#fffbeb; }.notice-card > i { margin-top:3px; }.notice-card strong,.notice-card p { display:block;margin:0; }.notice-card p { margin-top:3px;font-size:10px;line-height:1.8; }
.emergency-card { border-color:color-mix(in srgb,var(--danger) 35%,var(--border)); }
@media (max-width:768px) { .table-actions { flex-wrap:nowrap; }.role-view-title { flex-wrap:wrap; }.role-view-actions { width:100%;margin-inline-start:28px; } }

/* Touch-friendly editor ordering and structured content controls */
.page-item-actions button:disabled,.block-item-actions button:disabled,.structured-editor-table button:disabled,.structured-list-row button:disabled { opacity:.3;cursor:not-allowed; }
.inspector-divider { margin-top:16px;padding-top:16px;border-top:1px solid var(--border); }
.structured-toolbar { display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px; }
.structured-toolbar>span { display:flex;gap:6px;flex-wrap:wrap; }
.button-xs { min-height:34px;padding:6px 10px;font-size:10px; }
.structured-table-wrap { max-width:100%;overflow:auto;border:1px solid var(--border);border-radius:10px;background:var(--surface); }
.structured-editor-table { width:max-content;min-width:100%;border-collapse:collapse; }
.structured-editor-table td { padding:4px;border:1px solid var(--border); }
.structured-editor-table input { width:140px;min-height:38px;border:0;background:transparent;padding:7px; }
.structured-editor-table input:focus { outline:2px solid var(--primary);outline-offset:-2px;border-radius:6px; }
.structured-row-action { width:40px;text-align:center; }
.structured-row-action button,.structured-list-row>button { width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--danger);cursor:pointer; }
.structured-list { display:grid;gap:8px; }
.structured-list-row { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px;gap:7px;align-items:center; }
.structured-list-row input { min-width:0;min-height:42px;border:1px solid var(--border);border-radius:9px;padding:8px 10px;background:var(--surface);color:var(--text); }
.structured-columns-editor { display:grid;gap:10px; }
.structured-columns-editor>div { padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft); }
.button-danger-text { color:var(--danger);background:transparent;border-color:transparent; }
@media (max-width:760px) {
  .page-item,.block-item { min-height:52px; }
  .page-item-actions button,.block-item-actions button { width:34px;height:34px; }
  .drag-handle { display:none; }
  .page-item,.block-item { grid-template-columns:minmax(0,1fr) auto; }
  .structured-list-row { grid-template-columns:1fr; }
  .structured-list-row>button { justify-self:end; }
}

/* Landing page */
.landing-page { background: #f5f7fb; }
.landing-nav { width: min(1180px, calc(100% - 32px)); min-height: 76px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.landing-brand { display: inline-flex; align-items: center; gap: 11px; }
.landing-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.landing-brand strong { font-size: 18px; }
.landing-brand small { color: var(--muted); font-size: 10px; }
.landing-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.landing-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: clamp(16px, 3vw, 38px) 0 56px; }
.landing-hero { min-height: 560px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); align-items: center; gap: clamp(24px, 5vw, 64px); padding: clamp(28px, 5vw, 64px); border: 1px solid var(--border); border-radius: 32px; background: radial-gradient(circle at 18% 10%, rgba(37,99,235,.14), transparent 28%), radial-gradient(circle at 92% 20%, rgba(124,58,237,.12), transparent 30%), var(--surface); box-shadow: var(--shadow-lg); }
.landing-copy h1 { margin: 14px 0 12px; font-size: clamp(30px, 5vw, 58px); line-height: 1.28; letter-spacing: -1px; }
.landing-copy p { max-width: 630px; margin: 0; color: var(--muted); font-size: clamp(14px, 1.4vw, 17px); }
.landing-preview { position: relative; display: grid; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 28px; background: linear-gradient(180deg, #ffffff, #f8fafc); box-shadow: 0 24px 70px rgba(15,23,42,.12); }
.preview-top { display: flex; gap: 6px; padding: 4px 2px 8px; }
.preview-top span { width: 10px; height: 10px; border-radius: 999px; background: var(--border-strong); }
.preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.preview-card { min-height: 112px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.preview-card i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: #1d457d; background: var(--primary-soft); font-size: 18px; }
.preview-card strong { font-size: 15px; }
.preview-card small { color: var(--muted); font-size: 11px; }
.preview-card.wide { min-height: 128px; }
.preview-card.muted { background: var(--surface-soft); }
.landing-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.landing-features article { padding: 22px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.landing-features i { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 15px; color: #fff; background: linear-gradient(145deg, #2657a4, #359a7e); }
.landing-features h2 { margin: 0 0 4px; font-size: 16px; }
.landing-features p { margin: 0; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) { .landing-hero { grid-template-columns: 1fr; min-height: auto; } .landing-preview { order: -1; } .landing-features { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .landing-nav { align-items: flex-start; flex-direction: column; padding: 14px 0; } .landing-actions, .landing-actions .button { width: 100%; } .landing-hero { padding: 22px; border-radius: 24px; } .preview-grid { grid-template-columns: 1fr; } }

.auth-logo img{width:46px;height:46px;object-fit:contain;border-radius:12px}.auth-logo{gap:12px}.app-logo-image{display:block;width:100%;height:100%;object-fit:contain}

/* DocMaker v3: preserved document identity + clearer interactions */
html{scrollbar-width:thin;scrollbar-color:#7b9dc6 #e9eff7}::-webkit-scrollbar{width:11px;height:11px}::-webkit-scrollbar-track{background:#e9eff7;border-radius:999px}::-webkit-scrollbar-thumb{border:3px solid #e9eff7;border-radius:999px;background:linear-gradient(180deg,#2657a4,#359a7e)}::-webkit-scrollbar-thumb:hover{background:#244f91}
.button{white-space:nowrap}.button i+span,.button span+i{margin-inline-start:2px}.dropdown-menu{min-width:245px;padding:8px;border-radius:16px;box-shadow:0 20px 55px rgba(15,23,42,.18)}.dropdown-menu a,.dropdown-menu button{min-height:44px;border-radius:10px}.user-menu-trigger{border:1px solid var(--border);border-radius:15px;background:var(--surface);box-shadow:var(--shadow-sm)}
.document-language-strip{display:flex;align-items:center;gap:8px;max-width:100%;padding:8px 3px;overflow-x:auto}.language-flag{position:relative;min-width:48px;min-height:48px;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:5px;border:2px solid var(--border);border-radius:12px;color:var(--text);background:var(--surface);text-decoration:none;cursor:pointer}.language-flag img{width:27px;height:18px;object-fit:cover;border-radius:3px}.language-flag span{font-size:8px;white-space:nowrap}.language-flag i{position:absolute;inset-inline-end:-4px;bottom:-4px;border:2px solid var(--surface);border-radius:50%;background:var(--surface);font-size:11px}.language-flag.is-ready{border-color:#22c55e}.language-flag.is-ready i{color:#16a34a}.language-flag.is-missing{border-color:#ef4444}.language-flag.is-missing i{color:#dc2626}.language-flag.active{box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 15%,transparent)}
.documents-grid-rich{grid-template-columns:repeat(auto-fill,minmax(360px,1fr))}.document-card.rich{overflow:hidden}.document-card.rich .document-card-preview{position:relative;height:205px;display:block;overflow:hidden;background:linear-gradient(180deg,#eef3f8,#f8fafc)}.document-card-preview.has-image>img{width:100%;height:100%;display:block;object-fit:contain;object-position:center center;padding:14px;background:#fff;transition:transform .35s ease}.document-card-preview.has-image:hover>img{transform:scale(1.035)}.preview-overlay{position:absolute;inset:auto 10px 10px;min-height:38px;display:flex;align-items:center;justify-content:center;gap:7px;border-radius:11px;color:#fff;background:rgba(20,39,67,.82);backdrop-filter:blur(6px);opacity:0;transform:translateY(5px);transition:.2s}.document-card-preview:hover .preview-overlay{opacity:1;transform:none}.preview-placeholder{width:100%;height:100%;display:grid;place-items:center;color:var(--primary);font-size:44px;background:linear-gradient(145deg,var(--primary-soft),#fff)}.document-card-languages{display:flex;gap:6px;margin:10px 0;padding-bottom:4px;overflow-x:auto}.document-card-languages .language-flag{min-width:39px;min-height:39px}.document-card-languages .language-flag span{display:none}.labeled-actions{display:flex;flex-wrap:wrap;gap:7px}.labeled-actions form{display:flex}.labeled-actions .button{min-height:38px;width:auto!important;min-width:max-content!important;padding:7px 11px!important;font-size:10px!important}.labeled-actions .button i{font-size:11px!important}
.header-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.header-choice-grid button{position:relative;min-height:105px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:7px;border:2px solid var(--border);border-radius:13px;color:var(--text);background:var(--surface);cursor:pointer;overflow:hidden}.header-choice-grid button img{width:100%;height:65px;object-fit:cover;border-radius:7px}.header-choice-grid button>i{position:absolute;top:7px;inset-inline-end:7px;color:#16a34a;opacity:0}.header-choice-grid button.active{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}.header-choice-grid button.active>i{opacity:1}.custom-header-icon{height:65px;width:100%;display:grid;place-items:center;border-radius:8px;color:var(--primary);background:var(--primary-soft);font-size:24px}.asset-picker,.asset-editor{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:10px}.asset-preview,.selected-asset{width:100%;min-height:72px;display:flex;align-items:center;gap:10px;padding:9px;border:1px dashed var(--border-strong);border-radius:12px;background:var(--surface-soft)}.asset-preview.compact{min-height:60px}.asset-preview>img,.selected-asset .asset-thumb{width:58px;height:48px;display:grid;place-items:center;flex:0 0 58px;border-radius:8px;object-fit:contain;overflow:hidden;background:#fff}.asset-preview>img{object-fit:contain}.selected-asset .asset-thumb img{width:100%;height:100%;object-fit:contain}.asset-preview span,.selected-asset>span:nth-child(2){min-width:0;display:flex;flex-direction:column}.asset-preview strong,.selected-asset strong{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.asset-preview small,.selected-asset small{color:var(--muted);font-size:9px}.asset-editor .selected-asset{display:grid;grid-template-columns:58px minmax(0,1fr) auto}.asset-editor .selected-asset.empty{display:flex}.logo-picker{margin-top:14px}.license-note{display:flex;align-items:flex-start;gap:9px;margin-top:12px;padding:11px;border:1px solid #fde68a;border-radius:11px;color:#92400e;background:#fffbeb;font-size:10px;line-height:1.8}.header-fields{margin-top:12px}.control-section-head .button-xs{flex:0 0 auto}.page-main,.block-main{min-width:0;display:flex;align-items:center;gap:8px;border:0;color:inherit;background:none;text-align:start;cursor:pointer}.page-main{flex:1}.page-number{width:25px;height:25px;display:grid;place-items:center;flex:0 0 25px;border-radius:8px;color:var(--primary);background:var(--primary-soft);font-size:10px}.block-select{display:grid;place-items:center}.block-select input{width:17px;height:17px}.page-item{grid-template-columns:minmax(0,1fr) auto}.block-item{grid-template-columns:25px minmax(0,1fr) auto}.block-item.active{border-color:var(--primary);background:var(--primary-soft)}.page-break-marker{margin:12px 0!important;border-top:2px dashed #94a3b8;text-align:center}.page-break-marker span{display:inline-block;transform:translateY(-50%);padding:2px 9px;color:#64748b;background:#fff;font-size:9px}.image-grid{display:grid;grid-template-columns:repeat(var(--grid-columns,2),minmax(0,1fr));gap:var(--grid-gap,12px)}.image-grid figure{height:var(--grid-height,220px);display:grid;place-items:center;overflow:hidden;border-radius:7px;background:#f8fafc}.image-grid img{width:100%;height:100%}.signature-label{display:block;margin-top:7px}.document-language-strip+.editor-mobile-tabs{margin-top:2px}
.preview-stage{display:flex;justify-content:center;align-items:flex-start;overflow:auto;overscroll-behavior:contain}.preview-document{width:max-content;min-width:0;transform-origin:top center}.preview-document .doc-page{width:794px;min-height:1123px}.preview-toolbar-group{display:flex;align-items:center;gap:7px}.preview-toolbar-group>[data-zoom-label]{min-width:42px;text-align:center;font-weight:800}.editor-controls{scrollbar-gutter:stable}.editor-shell.show-preview .preview-stage{justify-content:center}.asset-picker[data-custom-header-upload]{display:none}.asset-picker[data-custom-header-upload].visible{display:flex}
.role-picker{display:grid;gap:8px}.role-option{display:grid;grid-template-columns:38px minmax(0,1fr) 24px;align-items:center;gap:9px;min-height:54px;padding:8px;border:1px solid var(--border);border-radius:12px;background:var(--surface);cursor:pointer}.role-option:hover{border-color:var(--primary)}.role-option .role-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;color:var(--role-color,#64748b);background:color-mix(in srgb,var(--role-color,#64748b) 12%,var(--surface))}.role-option span{display:flex;flex-direction:column}.role-option small{color:var(--muted)}.role-option input{width:18px;height:18px}.role-chip i{margin-inline-end:4px}
.profile-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:18px}.profile-aside{align-self:start;position:sticky;top:88px}.profile-image-large{width:112px;height:112px;display:grid;place-items:center;margin:0 auto 14px;border-radius:30px;overflow:hidden;color:var(--primary);background:var(--primary-soft);font-size:38px}.profile-image-large img{width:100%;height:100%;object-fit:cover}.company-logo-large{width:150px;height:100px;display:grid;place-items:center;margin:0 auto 14px;border:1px solid var(--border);border-radius:18px;overflow:hidden;background:#fff}.company-logo-large img{max-width:100%;max-height:100%;object-fit:contain}
@media(max-width:900px){.documents-grid-rich{grid-template-columns:1fr}.profile-layout{grid-template-columns:1fr}.profile-aside{position:static;order:-1}.editor-shell{min-height:0}.editor-shell.show-preview .editor-controls{display:none}.editor-shell:not(.show-preview) .editor-preview{display:none}.editor-preview{min-width:0}.preview-stage{min-height:calc(100dvh - 210px);padding:12px 4px;justify-content:center}.preview-document{margin-inline:auto}.preview-toolbar{position:sticky;top:0;z-index:4;flex-wrap:wrap}.document-language-strip{margin-bottom:6px}}
@media(max-width:560px){.document-card.rich{display:flex;flex-direction:column}.document-card.rich .document-card-preview{width:100%;height:185px;order:0}.document-card-preview.has-image>img{padding:10px}.document-card.rich .document-card-body{order:1}.document-card-actions .button{font-size:10px!important}.preview-overlay{opacity:1;transform:none}.header-choice-grid{grid-template-columns:1fr 1fr}.asset-editor .selected-asset{grid-template-columns:48px minmax(0,1fr)}.asset-editor .selected-asset .button{grid-column:1/-1;width:100%!important}.preview-toolbar-group .button{font-size:9px;padding:0 9px;width:auto;min-width:max-content}.preview-toolbar-group .button i{font-size:12px}.preview-toolbar-group>[data-zoom-label]{font-size:10px}.block-library{grid-template-columns:repeat(3,1fr)}.document-language-strip .language-flag{min-width:43px}.labeled-actions .button{flex:1 1 calc(50% - 7px);justify-content:center}.labeled-actions form{flex:1 1 calc(50% - 7px)}.labeled-actions form .button{width:100%!important}}

/* v3 — navigation, dashboard, profiles and independent admin console */
.avatar img,.workspace-logo img{width:100%;height:100%;object-fit:cover;border-radius:inherit}.language-trigger{width:auto;min-width:48px;padding-inline:8px;gap:5px}.language-trigger img,.menu-flag{width:25px;height:17px;object-fit:cover;border-radius:3px}.language-dropdown a{display:grid;grid-template-columns:28px minmax(0,1fr) 18px;gap:8px;align-items:center}.language-dropdown a.active{color:var(--primary);background:var(--primary-soft)}.nav-divider{display:flex;align-items:center;gap:8px;margin:11px 8px 5px;color:var(--sidebar-muted);font-size:9px}.nav-divider:after{content:"";height:1px;flex:1;background:rgba(255,255,255,.14)}.main-nav .admin-entry{border:1px solid rgba(53,154,126,.35);background:rgba(53,154,126,.12)}.main-nav .admin-entry>i:last-child{margin-inline-start:auto;font-size:9px}.workspace-logo{overflow:hidden}.identity-stack{display:flex;flex-direction:column;gap:2px}.identity-stack small,.last-login,.muted-text{display:block;color:var(--muted);font-size:10px}.account-type-chip.hoghooghi{color:#2657a4;background:#edf4ff}.account-type-chip.haghighi{color:#287d68;background:#edf9f5}.role-chip.global{color:#7c3aed;background:#f5f3ff}.role-chip{border:1px solid color-mix(in srgb,var(--role-color,#64748b) 28%,transparent);color:var(--role-color,#64748b);background:color-mix(in srgb,var(--role-color,#64748b) 9%,var(--surface))}
.activity-chart{height:230px;display:grid;grid-template-columns:repeat(14,minmax(22px,1fr));align-items:end;gap:8px;padding:14px 8px 0;border-bottom:1px solid var(--border);background:linear-gradient(to top,color-mix(in srgb,var(--border) 25%,transparent) 1px,transparent 1px);background-size:100% 25%}.chart-column{height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:7px}.chart-bars{width:100%;height:185px;display:flex;align-items:flex-end;justify-content:center;gap:3px}.chart-bars .bar{width:min(11px,40%);height:max(3px,var(--bar-height));border-radius:7px 7px 2px 2px;transition:height .4s ease}.chart-bars .views{background:linear-gradient(180deg,#3b82f6,#2657a4)}.chart-bars .changes{background:linear-gradient(180deg,#4ade80,#359a7e)}.chart-column small{font-size:8px;color:var(--muted);writing-mode:vertical-rl;transform:rotate(180deg)}.chart-legend{display:flex;gap:12px;color:var(--muted);font-size:10px}.chart-legend span{display:flex;align-items:center;gap:5px}.chart-legend i{width:9px;height:9px;border-radius:3px}.chart-legend .views{background:#2657a4}.chart-legend .changes{background:#359a7e}.activity-feed{display:grid;gap:6px}.activity-item{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:9px;padding:8px;border-radius:11px;transition:.2s}.activity-item:hover{background:var(--surface-soft)}.activity-item>span:nth-child(2){min-width:0;display:flex;flex-direction:column}.activity-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:9px}.activity-avatar{width:38px;height:38px;display:grid;place-items:center;overflow:hidden;border-radius:11px;color:var(--primary);background:var(--primary-soft);font-weight:800}.activity-avatar img{width:100%;height:100%;object-fit:cover}
.admin-console-body{background:#eef3f8}.admin-console{min-height:100vh;display:grid;grid-template-columns:280px minmax(0,1fr);direction:rtl}.admin-sidebar{position:fixed;inset:0 0 0 auto;z-index:50;width:280px;display:flex;flex-direction:column;padding:18px 14px;color:#dbeafe;background:linear-gradient(165deg,#111c31 0%,#173b69 62%,#153e51 100%);box-shadow:0 0 38px rgba(15,23,42,.18)}.admin-brand{display:flex;align-items:center;gap:10px;padding:8px 7px 18px;border-bottom:1px solid rgba(255,255,255,.12)}.admin-brand img{width:48px;height:48px;object-fit:contain}.admin-brand span{display:flex;flex-direction:column}.admin-brand strong{color:#fff;font-size:15px}.admin-brand small{color:#9fb6d2;font-size:9px}.admin-workspace{margin:15px 0 9px}.admin-workspace label{display:flex;flex-direction:column;gap:5px}.admin-workspace span{color:#9fb6d2;font-size:9px}.admin-workspace select{width:100%;height:44px;padding:0 11px;border:1px solid rgba(255,255,255,.16);border-radius:11px;color:#fff;background:#102641}.admin-nav{display:grid;gap:5px;margin-top:7px}.admin-nav a{min-height:46px;display:flex;align-items:center;gap:11px;padding:9px 12px;border-radius:11px;color:#c7d7ea;transition:.2s}.admin-nav a i{width:20px;text-align:center}.admin-nav a:hover,.admin-nav a.active{color:#fff;background:rgba(255,255,255,.11)}.admin-nav a.active{box-shadow:inset -3px 0 #4ade80}.admin-sidebar-footer{display:grid;gap:6px;margin-top:auto;padding-top:13px;border-top:1px solid rgba(255,255,255,.12)}.admin-sidebar-footer a,.admin-sidebar-footer button{width:100%;min-height:42px;display:flex;align-items:center;gap:9px;padding:8px 10px;border:0;border-radius:9px;color:#c7d7ea;background:transparent;cursor:pointer}.admin-sidebar-footer a:hover,.admin-sidebar-footer button:hover{color:#fff;background:rgba(255,255,255,.1)}.admin-main{grid-column:2;min-width:0}.admin-topbar{min-height:78px;position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 24px;border-bottom:1px solid #d8e3ef;background:rgba(255,255,255,.92);backdrop-filter:blur(14px)}.admin-topbar h1{margin:0;font-size:18px}.admin-topbar p{margin:1px 0 0;color:var(--muted);font-size:10px}.admin-top-actions{display:flex;align-items:center;gap:9px}.admin-user{display:flex;align-items:center;gap:7px;padding-inline-start:9px;border-inline-start:1px solid var(--border)}.admin-user>span:last-child{display:flex;flex-direction:column}.admin-user small{color:var(--muted);font-size:9px}.admin-content{padding:22px;max-width:1700px;width:100%;margin-inline:auto}.admin-activity-chart{height:230px;display:grid;grid-template-columns:repeat(14,minmax(20px,1fr));align-items:end;gap:8px;padding:18px 8px 0;border-bottom:1px solid var(--border)}.admin-chart-column{height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:7px}.admin-chart-column i{width:min(24px,70%);height:max(4px,var(--bar-height));border-radius:9px 9px 3px 3px;background:linear-gradient(180deg,#4ade80,#2657a4)}.admin-chart-column small{font-size:8px;color:var(--muted);transform:rotate(-45deg);transform-origin:center}.role-list-icon,.role-hero-icon,.selected-role-preview>span{display:grid;place-items:center;color:var(--role-color);background:color-mix(in srgb,var(--role-color) 12%,var(--surface));border:1px solid color-mix(in srgb,var(--role-color) 25%,transparent)}.role-list-icon{width:40px;height:40px;border-radius:11px}.role-hero-icon{width:56px;height:56px;border-radius:16px;font-size:20px}.role-item{grid-template-columns:40px minmax(0,1fr) 14px}.selected-role-preview{display:flex;align-items:center;gap:10px;padding:11px;margin-bottom:14px;border:1px solid var(--border);border-radius:13px;background:var(--surface-soft)}.selected-role-preview>span{--role-color:#2563eb;width:44px;height:44px;border-radius:12px}.selected-role-preview>div{display:flex;flex-direction:column}.role-icon-select{cursor:pointer}
@media(max-width:1100px){.admin-console{grid-template-columns:1fr}.admin-main{grid-column:1}.admin-sidebar{transform:translateX(105%);transition:transform .25s}.admin-sidebar.open{transform:none}.admin-content{padding:16px}.admin-topbar{padding:10px 15px}.admin-user>span:last-child{display:none}}
@media(max-width:760px){.activity-chart,.admin-activity-chart{gap:3px;overflow-x:auto;grid-template-columns:repeat(14,32px);justify-content:start}.chart-legend{display:none}.admin-top-actions .language-menu{display:none}.admin-content{padding:11px}.admin-topbar{align-items:flex-start}.admin-dashboard-grid{grid-template-columns:1fr}.admin-dashboard-grid>.span-2{grid-column:auto}.responsive-table table{min-width:940px}}
.preview-stage{direction:ltr!important;width:100%;display:grid!important;grid-template-columns:minmax(0,1fr);justify-items:center!important;align-content:start}.preview-document{direction:rtl;margin:0 auto!important;justify-self:center;max-width:none}.preview-document[dir="ltr"]{direction:ltr}.preview-document[dir="rtl"]{direction:rtl}@media(max-width:900px){.preview-stage{overflow-x:hidden!important}.preview-document{transform-origin:top center!important}}

/* Full workspace activity log */
.activity-filter-head{align-items:flex-end}.activity-search{width:min(620px,100%);display:grid;grid-template-columns:20px minmax(180px,1fr) auto auto;align-items:center;gap:8px}.activity-search>i{color:var(--muted)}.activity-search input{min-width:0}.full-activity-list{display:grid;gap:9px}.full-activity-item{display:grid;grid-template-columns:44px minmax(0,1fr) minmax(180px,260px) auto;align-items:center;gap:12px;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--surface);transition:.16s ease}.full-activity-item:hover{border-color:color-mix(in srgb,var(--primary) 35%,var(--border));box-shadow:var(--shadow-sm);transform:translateY(-1px)}.activity-event-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;color:var(--primary);background:var(--primary-soft)}.activity-event-icon.event-document{color:#2657a4;background:#edf4ff}.activity-event-icon.event-company{color:#287d68;background:#edf9f5}.full-activity-main{min-width:0}.full-activity-title{display:flex;align-items:center;gap:8px;min-width:0}.full-activity-title strong{font-size:12px}.event-code{padding:3px 7px;border-radius:999px;color:var(--muted);background:var(--surface-soft);font-family:monospace;font-size:8px;direction:ltr}.full-activity-main p{margin:4px 0 0;color:var(--muted);font-size:10px}.full-activity-main p a{display:inline-flex;align-items:center;gap:5px;color:var(--primary);font-weight:750}.activity-actor{display:flex;align-items:center;gap:8px;min-width:0}.activity-actor>span:last-child{min-width:0}.activity-actor strong,.activity-actor small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.activity-actor small{color:var(--muted);font-size:9px}.full-activity-item time{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:9px;white-space:nowrap}.pagination{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:18px}.pagination>span{color:var(--muted);font-size:10px}
@media(max-width:900px){.activity-filter-head{align-items:stretch}.activity-search{grid-template-columns:20px minmax(120px,1fr) auto}.activity-search .button-ghost{grid-column:2/-1}.full-activity-item{grid-template-columns:42px minmax(0,1fr)}.activity-actor{grid-column:2}.full-activity-item time{grid-column:2}.event-code{display:none}}
/* v4 accessibility, editor and bidirectional layout */
.button{min-height:48px;padding:10px 18px;border-radius:13px;font-size:13px}.button-sm{min-height:42px;padding:8px 13px;font-size:11px}.button-xs{min-height:38px;padding:6px 10px}.icon-button{width:48px;height:48px;flex-basis:48px;border-radius:13px}.dropdown-menu{width:min(300px,calc(100vw - 24px));padding:9px;border-radius:16px}.dropdown-menu a,.dropdown-menu button{min-height:48px;padding:9px 12px;font-size:12px}.language-dropdown{max-height:min(560px,70vh);overflow:auto}.language-dropdown a{grid-template-columns:34px 1fr 20px}.menu-flag,.language-trigger img{width:32px!important;height:23px!important;border-radius:5px;object-fit:cover}.language-trigger{width:auto;min-width:58px;padding-inline:10px;gap:7px}.role-item{min-height:66px;grid-template-columns:34px minmax(0,1fr) 20px;text-align:start}.role-item .role-icon,.role-view-title>i{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;color:var(--role-color);background:color-mix(in srgb,var(--role-color) 12%,var(--surface))}.role-item strong{font-size:12px}.role-item small{font-size:10px}.permission-item{min-height:64px}.permission-item strong{font-size:12px}.permission-item small{font-size:9px}.field>span,.switch-row>span,.check-row>span{font-size:11px;font-weight:750}.field input,.field select,.field textarea{min-height:48px;font-size:13px}.switch-row{min-height:48px}.toast{min-height:66px;padding:14px 16px}.toast strong{font-size:13px}.toast small{font-size:11px;line-height:1.7}.editor-shell{grid-template-columns:minmax(360px,430px) minmax(0,1fr)}.editor-tabs button{min-height:50px;font-size:12px}.page-item,.block-item{min-height:54px}.page-item span,.block-item span{font-size:11px}.page-item-actions button,.block-item-actions button,.drag-handle{width:36px;height:36px}.block-library{grid-template-columns:repeat(3,minmax(0,1fr))}.block-library button{min-height:82px;font-size:10px}.block-library i{font-size:20px}.preview-toolbar{min-height:60px;flex-wrap:wrap}.preview-stage{position:relative;min-width:0;width:100%;height:calc(100dvh - var(--topbar-height) - 60px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable both-edges;display:block;padding:30px max(16px,calc((100% - 794px)/2));background:radial-gradient(circle at 50% 0,rgba(38,87,164,.08),transparent 35%),#dce4ea}.preview-document{width:794px;min-width:794px;margin:0 auto;transform-origin:top center}.asset-picker{gap:10px}.asset-preview{min-height:120px}.cover-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.cover-choice{position:relative;display:grid;gap:6px;padding:8px;border:2px solid var(--border);border-radius:13px;background:var(--surface);cursor:pointer}.cover-choice:has(input:checked){border-color:var(--primary);box-shadow:0 0 0 4px var(--primary-soft)}.cover-choice img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px}.standards-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.standard-option{position:relative;min-height:76px;padding:7px;border:1px solid var(--border);border-radius:10px;display:grid;place-items:center;cursor:pointer}.standard-option input{position:absolute;opacity:0}.standard-option img{max-width:100%;height:36px;object-fit:contain}.standard-option.selected{border-color:var(--success);background:var(--success-soft)}.dynamic-spec-editor{display:grid;gap:12px}.dynamic-section-editor{padding:12px;border:1px solid var(--border);border-radius:13px;background:var(--surface-soft)}.font-picker-row{display:flex;gap:8px;flex-wrap:wrap}.font-preview{min-height:58px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;display:flex;align-items:center;gap:10px;background:var(--surface-soft)}.editor-mobile-tabs{min-height:58px}.document-card-actions{flex-wrap:wrap}.document-card-actions .button{margin-inline-end:0;flex:1}.document-card-actions .icon-button{width:auto;flex:1;padding:0 12px;display:inline-flex;gap:8px}.document-card-actions .icon-button::after{content:attr(data-label);font-size:11px;font-weight:750}.sample-preview-image{width:100%;height:100%;object-fit:cover;position:relative;z-index:2}
*{scrollbar-width:thin;scrollbar-color:#77a798 #edf3f6}*::-webkit-scrollbar{width:11px;height:11px}*::-webkit-scrollbar-track{background:#edf3f6;border-radius:999px}*::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#77a798,#477d8c);border:3px solid #edf3f6;border-radius:999px}*::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#5e9484,#356b7a)}
[dir="ltr"] .role-item,[dir="ltr"] .dropdown-menu a,[dir="ltr"] .dropdown-menu button,[dir="ltr"] .field,[dir="ltr"] .topbar-heading,[dir="ltr"] .document-card-body{text-align:left}[dir="ltr"] .sidebar{direction:ltr}[dir="ltr"] .admin-console,[dir="ltr"] .app-shell,[dir="ltr"] .editor-shell{direction:ltr}[dir="ltr"] .admin-sidebar{border-right:1px solid var(--border);border-left:0}[dir="ltr"] .editor-controls{border-right:1px solid var(--border);border-left:0}[dir="ltr"] .fa-arrow-right,[dir="ltr"] .fa-chevron-left{transform:scaleX(-1)}
@media(max-width:900px){.editor-shell{height:auto;min-height:calc(100dvh - var(--topbar-height));display:block;overflow:visible}.editor-controls,.editor-preview{display:none;width:100%;border:0}.editor-shell:not(.show-preview) .editor-controls{display:block}.editor-shell.show-preview .editor-preview{display:block}.preview-stage{height:calc(100dvh - var(--topbar-height) - 118px);padding:16px 8px;overflow:auto;display:block}.preview-document{margin-inline:auto}.editor-controls{max-height:none;overflow:visible}.editor-mobile-tabs{position:sticky;bottom:0;z-index:35;background:var(--surface);box-shadow:0 -8px 28px rgba(15,23,42,.12)}.block-library{grid-template-columns:repeat(3,minmax(0,1fr))}.standards-picker{grid-template-columns:repeat(3,minmax(0,1fr))}.preview-toolbar{position:sticky;top:var(--topbar-height);z-index:20;padding:8px}.preview-toolbar .button{min-height:44px}.document-grid{grid-template-columns:1fr}.document-card{display:grid;grid-template-columns:1fr}.document-card-preview{order:0;aspect-ratio:16/10}.document-card-body{order:1}.roles-layout{grid-template-columns:1fr}.permission-grid{grid-template-columns:1fr}}
@media(max-width:520px){.button{min-height:52px;font-size:13px}.icon-button{width:52px;height:52px}.topbar-actions{gap:6px}.user-menu-copy{display:none}.block-library{grid-template-columns:repeat(2,minmax(0,1fr))}.standards-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.cover-choice-grid{grid-template-columns:1fr}.preview-toolbar-group{width:100%;display:grid;grid-template-columns:1fr auto 1fr}.preview-toolbar-group .button{white-space:normal}.toast-region{inset-inline:10px;bottom:10px;width:calc(100vw - 20px)}}
.company-members-panel{margin-top:18px}.member-invite-form{display:grid;grid-template-columns:minmax(240px,1fr) minmax(300px,2fr) auto;gap:14px;align-items:end}.role-choice-grid{display:flex;gap:8px;flex-wrap:wrap}.role-choice{position:relative;min-height:48px;display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--border);border-radius:12px;cursor:pointer}.role-choice input{position:absolute;opacity:0}.role-choice i{color:var(--role-color);font-size:18px}.role-choice:has(input:checked){border-color:var(--role-color);background:color-mix(in srgb,var(--role-color) 10%,var(--surface));box-shadow:0 0 0 3px color-mix(in srgb,var(--role-color) 18%,transparent)}.pending-invites,.company-member-list{display:grid;gap:8px;margin-top:18px}.pending-invites>div,.company-member-list>div{min-height:64px;display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 11px;border:1px solid var(--border);border-radius:13px}.pending-invites span:nth-child(2),.company-member-list span:nth-child(2){display:flex;flex-direction:column}.pending-invites small,.company-member-list small{color:var(--muted)}.invitation-stack{display:grid;gap:12px;margin-bottom:16px}.invitation-card{display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:16px;border-color:#86d4b8;background:linear-gradient(135deg,#f0fdf9,#fff)}.company-logo-small{width:58px;height:58px;display:grid;place-items:center;border-radius:15px;background:#fff;border:1px solid #ccebe1;overflow:hidden;color:#359a7e;font-size:24px}.company-logo-small img{width:100%;height:100%;object-fit:contain}.invitation-card h3,.invitation-card p{margin:0}.invitation-card p{color:var(--muted);margin-top:4px}.invitation-actions{display:flex;gap:8px}.invitation-actions form{margin:0}@media(max-width:850px){.member-invite-form{grid-template-columns:1fr}.invitation-card{grid-template-columns:54px 1fr}.invitation-actions{grid-column:1/-1}.invitation-actions form,.invitation-actions .button{flex:1}.invitation-actions form{display:flex}}

/* v4 editor/mobile/accessibility refinements */
.cover-choice-grid button,.header-choice-grid button{position:relative;min-height:118px;display:grid;grid-template-rows:76px auto;align-items:center;gap:7px;padding:8px;border:2px solid var(--border);border-radius:14px;color:var(--text);background:var(--surface);cursor:pointer;overflow:hidden;text-align:center}
.cover-choice-grid button img,.header-choice-grid button img{width:100%;height:76px;object-fit:cover;border-radius:8px;background:#f8fafc}
.cover-choice-grid button>i,.header-choice-grid button>i{position:absolute;inset-inline-end:7px;top:7px;color:var(--success);background:#fff;border-radius:50%;opacity:0;transform:scale(.7);transition:.18s}
.cover-choice-grid button.active,.header-choice-grid button.active{border-color:var(--primary);box-shadow:0 0 0 4px var(--primary-soft)}
.cover-choice-grid button.active>i,.header-choice-grid button.active>i{opacity:1;transform:none}
.cover-choice-grid .custom-header-icon,.header-choice-grid .custom-header-icon{height:76px;display:grid;place-items:center;border-radius:8px;background:var(--surface-soft);font-size:25px;color:var(--primary)}
.asset-picker[data-custom-cover-upload]{display:none}.asset-picker[data-custom-cover-upload].visible{display:flex}
.editor-page .topbar{min-height:72px}.editor-title-input{min-height:46px;font-size:clamp(15px,1.25vw,19px)}
.document-language-strip{gap:10px}.document-language-strip .language-flag{min-width:68px;min-height:58px;padding:7px}.document-language-strip .language-flag img{width:34px;height:24px}.document-language-strip .language-flag span{font-size:10px;font-weight:800}
.role-choice{min-height:58px;padding:10px;border:1px solid var(--border);border-radius:13px;display:flex;align-items:center;gap:9px;background:var(--surface);cursor:pointer}.role-choice:has(input:checked){border-color:var(--role-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--role-color) 16%,transparent)}.role-choice input{width:20px;height:20px}.role-choice i{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;color:var(--role-color);background:color-mix(in srgb,var(--role-color) 12%,var(--surface))}
[dir="ltr"] .editor-title-wrap,[dir="ltr"] .editor-tabs,[dir="ltr"] .editor-tab-panel,[dir="ltr"] .modal-body,[dir="ltr"] .panel-card,[dir="ltr"] .profile-layout,[dir="ltr"] .company-members-panel{text-align:left}
[dir="ltr"] .block-item,[dir="ltr"] .page-item,[dir="ltr"] .control-section-head,[dir="ltr"] .section-head{direction:ltr}
[dir="ltr"] .topbar-actions,[dir="ltr"] .document-card-actions{direction:ltr}
@media(max-width:900px){
  .editor-page .app-main{overflow:visible}
  .editor-mobile-tabs{display:grid;grid-template-columns:1fr 1fr;position:sticky;top:var(--topbar-height);bottom:auto;z-index:45;border-bottom:1px solid var(--border);box-shadow:0 8px 22px rgba(15,23,42,.09)}
  .editor-shell{height:calc(100dvh - var(--topbar-height) - 58px);min-height:0;overflow:hidden}
  .editor-shell:not(.show-preview) .editor-controls{display:block;height:100%;overflow-y:auto;padding-bottom:84px}
  .editor-shell.show-preview .editor-preview{display:flex;height:100%;overflow:hidden}
  .preview-toolbar{position:relative;top:auto;flex:0 0 auto;min-height:62px}
  .preview-stage{flex:1;height:auto;min-height:0;overflow:auto!important;padding:14px 8px 40px!important;display:grid!important;grid-template-columns:1fr!important;justify-items:center!important;direction:ltr!important}
  .preview-document{width:794px!important;min-width:794px!important;max-width:none!important;margin:0 auto!important;justify-self:center!important;transform-origin:top center!important}
  .preview-document[dir="ltr"]{direction:ltr!important}.preview-document[dir="rtl"]{direction:rtl!important}
}
@media(max-width:520px){
  .block-library{grid-template-columns:repeat(2,minmax(0,1fr))}
  .document-language-strip .language-flag{min-width:62px;min-height:56px}
  .cover-choice-grid button,.header-choice-grid button{min-height:132px;grid-template-rows:88px auto}
  .cover-choice-grid button img,.header-choice-grid button img,.cover-choice-grid .custom-header-icon,.header-choice-grid .custom-header-icon{height:88px}
}


/* v5 — manual pagination, stable Persian typography and direction-safe application shells */
html[lang="fa"] body,
html[lang="fa"] button,
html[lang="fa"] input,
html[lang="fa"] select,
html[lang="fa"] textarea,
html[lang="ar"] body,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea{
  font-family:"Vazirmatn","Noto Naskh Arabic",Tahoma,Arial,sans-serif;
  font-synthesis:none;
  text-rendering:optimizeLegibility;
}
html[dir="rtl"] body{letter-spacing:normal}
.preview-document[dir="rtl"],.preview-document[dir="rtl"] button,.preview-document[dir="rtl"] input,.preview-document[dir="rtl"] textarea{
  font-family:var(--doc-font,"Vazirmatn"),"Vazirmatn","Noto Naskh Arabic",Tahoma,sans-serif;
  font-synthesis:none;
}
.page-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.button-smart{color:#fff;border-color:#267d69;background:linear-gradient(135deg,#2657a4,#359a7e);box-shadow:0 8px 18px rgba(38,87,164,.16)}
.button-smart:hover{filter:brightness(.96)}
.pagination-help{margin:-2px 0 10px;padding:8px 10px;border-radius:10px;color:#31586d;background:linear-gradient(135deg,#edf4ff,#edf9f5)}
.smart-pagination-measurer{margin:0!important;transform:none!important}
.app-shell{direction:ltr;grid-template-columns:minmax(0,1fr) var(--sidebar-width)}
.sidebar{right:0;left:auto;direction:rtl}
.app-main{grid-column:1;direction:rtl}
html[dir="ltr"] .app-shell{grid-template-columns:var(--sidebar-width) minmax(0,1fr)}
html[dir="ltr"] .sidebar{right:auto;left:0;direction:ltr}
html[dir="ltr"] .app-main{grid-column:2;direction:ltr}
.editor-shell{direction:rtl}
.editor-controls{direction:rtl}
.editor-preview{direction:ltr}
html[dir="ltr"] .editor-shell,html[dir="ltr"] .editor-controls{direction:ltr}
.admin-console{direction:ltr;grid-template-columns:minmax(0,1fr) 280px}
.admin-sidebar{right:0;left:auto;direction:rtl}
.admin-main{grid-column:1;direction:rtl}
html[dir="ltr"] .admin-console{grid-template-columns:280px minmax(0,1fr)}
html[dir="ltr"] .admin-sidebar{right:auto;left:0;direction:ltr}
html[dir="ltr"] .admin-main{grid-column:2;direction:ltr}
@media(max-width:1024px){
  .app-shell,html[dir="ltr"] .app-shell{grid-template-columns:1fr}
  .app-main,html[dir="ltr"] .app-main{grid-column:1}
  html[dir="ltr"] .sidebar{transform:translateX(-105%)}
  html[dir="ltr"] .sidebar.open{transform:translateX(0)}
}
@media(max-width:1100px){
  .admin-console,html[dir="ltr"] .admin-console{grid-template-columns:1fr}
  .admin-main,html[dir="ltr"] .admin-main{grid-column:1}
  html[dir="ltr"] .admin-sidebar{transform:translateX(-105%)}
  html[dir="ltr"] .admin-sidebar.open{transform:translateX(0)}
}
@media(max-width:560px){
  .page-toolbar-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .page-toolbar-actions .button{width:100%;white-space:normal;line-height:1.45}
}

/* v6 — mobile document editor rebuilt as a stable single-column workspace */
.field textarea[data-multiline-list]{min-height:190px;resize:vertical;line-height:1.9;white-space:pre-wrap}
.control-section[data-block-inspector]{padding-bottom:110px}
@media(max-width:900px){
  .editor-page .topbar{position:sticky;top:0;z-index:80;min-height:auto;padding:8px 10px;align-items:flex-start;gap:8px}
  .editor-page .topbar-heading{min-width:0;flex:1}
  .editor-page .topbar-heading h1{font-size:13px;line-height:1.5}
  .editor-page .topbar-heading p{display:none}
  .editor-page .topbar-actions{width:100%;display:flex;overflow-x:auto;gap:7px;padding-bottom:4px;scrollbar-width:thin}
  .editor-page .topbar-actions .button{flex:0 0 auto;min-height:44px;padding:8px 12px;white-space:nowrap}
  .editor-page .editor-mobile-tabs{top:0;position:sticky;z-index:70;min-height:58px;background:var(--surface)}
  .editor-page .editor-shell{height:auto;min-height:calc(100dvh - 116px);overflow:visible;background:var(--surface-soft)}
  .editor-page .editor-controls{height:auto!important;min-height:calc(100dvh - 116px);overflow:visible!important;padding-bottom:96px;background:var(--surface)}
  .editor-page .editor-tabs{top:58px;grid-template-columns:repeat(3,minmax(0,1fr));padding:6px;overflow:visible}
  .editor-page .editor-tabs button{min-width:0;padding:7px 5px;font-size:11px;white-space:normal}
  .editor-page .control-section{padding:14px 12px}
  .editor-page .control-section-head{align-items:flex-start;flex-direction:column}
  .editor-page .page-toolbar-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .editor-page .page-toolbar-actions .button{min-height:48px}
  .editor-page .page-item,.editor-page .block-item{grid-template-columns:auto minmax(0,1fr);gap:8px;padding:8px}
  .editor-page .page-item-actions,.editor-page .block-item-actions{grid-column:1/-1;width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .editor-page .page-item-actions button,.editor-page .block-item-actions button{width:100%;min-height:42px;border:1px solid var(--border);background:var(--surface-soft)}
  .editor-page .block-library{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .editor-page .block-library button{min-height:86px}
  .editor-page .structured-list-row,.editor-page .spec-feature-editor,.editor-page .feature-values-grid,.editor-page .form-grid.two{grid-template-columns:1fr!important}
  .editor-page .structured-table-wrap{overflow-x:auto;margin-inline:-4px;padding-bottom:6px}
  .editor-page .structured-editor-table{min-width:620px}
  .editor-page .model-chip-editor{display:grid;grid-template-columns:1fr}
  .editor-page .asset-editor .selected-asset{grid-template-columns:58px minmax(0,1fr);align-items:center}
  .editor-page .asset-editor .selected-asset .button{grid-column:1/-1}
  .editor-page .editor-shell.show-preview{height:calc(100dvh - 116px);overflow:hidden}
  .editor-page .editor-shell.show-preview .editor-preview{height:100%;min-height:0}
  .editor-page .preview-toolbar{position:sticky;top:0;display:grid;grid-template-columns:1fr;gap:7px;padding:8px;background:#f8fafc}
  .editor-page .preview-toolbar-group{width:100%;display:grid;grid-template-columns:1fr auto 1fr;gap:6px}
  .editor-page .preview-toolbar-group .button{min-width:0;padding:7px 8px;font-size:10px;white-space:normal}
  .editor-page .preview-stage{height:auto!important;min-height:0!important;overflow:auto!important;padding:12px 8px 42px!important;display:flex!important;justify-content:flex-start!important;align-items:flex-start!important;scrollbar-gutter:auto!important}
  .editor-page .preview-document{flex:0 0 794px;width:794px!important;min-width:794px!important;margin:0!important;transform-origin:top left!important}
  .editor-page[dir="rtl"] .preview-document,.editor-page .preview-document[dir="rtl"]{transform-origin:top right!important}
}
@media(max-width:520px){
  .editor-page .topbar-actions .button span{display:inline}
  .editor-page .page-toolbar-actions{grid-template-columns:1fr}
  .editor-page .editor-tabs button i{display:none}
  .editor-page .language-flag{min-width:68px;min-height:58px}
  .editor-page .control-section[data-block-inspector]{padding-bottom:130px}
}

/* v6.1 — final mobile editor override: one stable panel at a time */
@media(max-width:900px){
  .editor-page .editor-shell{
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
  .editor-page .editor-controls,
  .editor-page .editor-preview{
    width:100%!important;
    min-width:0!important;
    border:0!important;
  }
  .editor-page .editor-shell:not(.show-preview) .editor-controls{
    display:block!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
  .editor-page .editor-shell:not(.show-preview) .editor-preview{display:none!important}
  .editor-page .editor-shell.show-preview .editor-controls{display:none!important}
  .editor-page .editor-shell.show-preview .editor-preview{
    display:flex!important;
    flex-direction:column!important;
    height:calc(100dvh - 118px)!important;
    min-height:560px!important;
    overflow:hidden!important;
  }
  .editor-page .preview-toolbar{
    position:relative!important;
    top:auto!important;
    flex:0 0 auto!important;
    grid-template-columns:1fr!important;
  }
  .editor-page .preview-stage{
    flex:1 1 auto!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    overflow:auto!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    justify-items:center!important;
    align-items:start!important;
    justify-content:center!important;
    padding:12px 8px 42px!important;
    direction:ltr!important;
    overscroll-behavior:contain!important;
  }
  .editor-page .preview-document,
  .editor-page .preview-document[dir="rtl"],
  .editor-page .preview-document[dir="ltr"]{
    width:794px!important;
    min-width:794px!important;
    max-width:none!important;
    margin:0 auto!important;
    justify-self:center!important;
    transform-origin:top center!important;
  }
  .editor-page .editor-mobile-tabs{
    position:sticky!important;
    top:0!important;
    bottom:auto!important;
    z-index:75!important;
  }
  .editor-page .editor-tabs{
    position:sticky!important;
    top:58px!important;
    z-index:60!important;
    background:var(--surface)!important;
  }
  .editor-page .editor-tab-panel{overflow:visible!important}
  .editor-page .control-section{overflow:visible!important}
  .editor-page .asset-editor,
  .editor-page .structured-list,
  .editor-page .dynamic-spec-editor{min-width:0!important;max-width:100%!important}
  .editor-page .structured-list-row{align-items:stretch!important}
  .editor-page .structured-list-row input,
  .editor-page .structured-list-row textarea,
  .editor-page .spec-section-head input{width:100%!important;min-width:0!important}
}
@media(max-width:520px){
  .editor-page .topbar{position:relative!important}
  .editor-page .topbar-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important}
  .editor-page .topbar-actions .button{width:100%!important;min-width:0!important;justify-content:center!important}
  .editor-page .editor-shell.show-preview .editor-preview{height:calc(100dvh - 116px)!important;min-height:500px!important}
  .editor-page .preview-toolbar-group{grid-template-columns:1fr auto 1fr!important}
  .editor-page .preview-toolbar-group:last-child{grid-template-columns:1fr 1fr!important}
}

.media-size-presets{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0 12px}.field-switch{display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--border);border-radius:11px;background:var(--surface-soft)}.field-switch>span{margin:0!important}.field-switch input{width:22px!important;height:22px!important;flex:0 0 22px}.pagination-result-highlight{border-radius:12px}

/* DocMaker v8: reliable media controls, categorized standards and compact language rows */
.selection-move-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.standards-groups{display:grid;gap:14px}
.standards-group{padding:11px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}
.standards-group h4{display:flex;align-items:center;gap:8px;margin:0 0 10px;color:var(--text);font-size:12px}
.standards-group h4 i{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;color:var(--primary);background:var(--primary-soft)}
.standards-picker{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.standard-option{min-height:100px;padding:9px;background:var(--surface)}
.standard-option img{width:100%;max-width:98px;height:58px;object-fit:contain}
.standard-option span{font-size:10px;font-weight:800;color:var(--muted)}
.document-language-strip{display:flex;flex-wrap:wrap;align-items:center;gap:7px;overflow:visible;max-width:100%;padding:7px 2px}
.document-language-strip .language-flag{flex:0 0 auto;min-width:54px;min-height:50px}
.document-language-strip.compact .language-flag{min-width:48px;min-height:46px}
.document-card-languages{display:flex;flex-wrap:wrap;overflow:visible;gap:6px}
@media(max-width:900px){
  .selection-move-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .selection-move-actions .button{width:100%;justify-content:center;white-space:normal}
  .standards-picker{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:560px){
  .standards-picker{grid-template-columns:repeat(2,minmax(0,1fr))}
  .standard-option{min-height:92px}
  .standard-option img{height:50px}
}

/* DocMaker v8.2 — readable controls and redesigned dynamic specification editor. */
body:not(.rendered-document) :where(p,span,small,strong,b,em,a,label,button,input,textarea,select,option,li,td,th,time,code):not(:where(.preview-document *,.document-viewer *,.rendered-document *,.rich-editor *)){
  font-size:max(14px,1em)!important;
}
body:not(.rendered-document) :where(button,[role="button"],.icon-button) i{font-size:max(17px,1em)!important}
.button,.button-sm,.button-xs{font-size:14px!important;min-height:42px}
.button-xs{padding:8px 11px}
.field input,.field select,.field textarea{font-size:14px!important;line-height:1.65}
.help-text{font-size:14px!important;line-height:1.8}
.page-item-actions button,.block-item-actions button,.drag-handle{
  width:42px!important;height:42px!important;min-width:42px;min-height:42px;border-radius:11px;
}
.page-item-actions button i,.block-item-actions button i,.drag-handle i{font-size:17px!important}
.block-library button{font-size:14px!important;min-height:92px}
.block-library i{font-size:23px!important}

.cover-image-controls{display:grid;gap:12px;margin-top:12px;padding:14px;border:1px solid var(--border);border-radius:15px;background:var(--surface-soft)}
.cover-image-range-grid{align-items:end}
.cover-image-controls .asset-picker{margin:0}

.dynamic-spec-editor{display:grid;gap:16px}
.dynamic-editor-intro{
  display:grid;grid-template-columns:36px minmax(0,1fr);align-items:start;gap:10px;padding:12px 13px;
  border:1px solid color-mix(in srgb,var(--primary) 28%,var(--border));border-radius:14px;
  color:var(--text);background:color-mix(in srgb,var(--primary) 7%,var(--surface));
}
.dynamic-editor-intro>i{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;color:var(--primary);background:var(--primary-soft);font-size:18px!important}
.dynamic-editor-intro p{margin:0;line-height:1.85;color:var(--muted)}
.dynamic-models-section{display:grid;gap:12px;padding:14px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}
.dynamic-spec-editor .structured-toolbar{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.dynamic-spec-editor .structured-toolbar strong{display:inline-flex;align-items:center;gap:8px}
.dynamic-spec-editor .structured-toolbar strong i{color:var(--primary);font-size:18px!important}
.model-chip-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dynamic-model-card{
  min-width:0;display:grid;grid-template-columns:32px minmax(0,1fr) 42px;align-items:center;gap:9px;
  padding:10px;border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:0 4px 12px rgba(15,23,42,.035);
}
.dynamic-card-number,.spec-section-order{
  width:30px;height:30px;display:grid;place-items:center;border-radius:9px;color:var(--primary);background:var(--primary-soft);font-weight:850;
}
.dynamic-card-field{display:grid;gap:5px;min-width:0}
.dynamic-card-field small{color:var(--muted);font-weight:750}
.dynamic-model-card textarea,.dynamic-textarea-field textarea,.dynamic-value-row textarea,.spec-section-head textarea{
  width:100%;min-width:0;min-height:58px;resize:vertical;padding:10px 11px;border:1px solid var(--border);
  border-radius:11px;color:var(--text);background:var(--surface);font:inherit;line-height:1.65;outline:none;
}
.dynamic-model-card textarea:focus,.dynamic-textarea-field textarea:focus,.dynamic-value-row textarea:focus,.spec-section-head textarea:focus{
  border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft);
}
.dynamic-icon-action{
  width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--border);border-radius:11px;
  color:var(--muted);background:var(--surface);cursor:pointer;
}
.dynamic-icon-action i{font-size:17px!important}
.dynamic-icon-action.danger:hover{color:var(--danger);border-color:color-mix(in srgb,var(--danger) 45%,var(--border));background:var(--danger-soft)}
.dynamic-sections-toolbar{padding-inline:2px}
.dynamic-section-list,.dynamic-feature-list{display:grid;gap:12px}
.spec-section-editor{
  display:grid;gap:13px;padding:14px;border:1px solid var(--border);border-radius:17px;background:var(--surface-soft);
  box-shadow:0 5px 18px rgba(15,23,42,.035);
}
.spec-section-head{
  display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:end;gap:9px;padding-bottom:12px;border-bottom:1px solid var(--border);
}
.spec-section-head>label{display:grid;gap:6px;min-width:0;color:var(--muted);font-weight:750}
.dynamic-feature-card{display:grid;gap:11px;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
.dynamic-feature-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.dynamic-feature-index{font-weight:850;color:var(--primary)}
.dynamic-item-actions,.dynamic-section-actions,.dynamic-order-actions{display:flex;align-items:center;gap:7px}
.dynamic-section-actions{justify-content:flex-end;flex-wrap:wrap}
.dynamic-order-actions{padding:3px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft)}
.dynamic-order-actions .dynamic-icon-action{width:36px;height:36px;min-width:36px;min-height:36px;border:0;background:transparent}
.dynamic-icon-action.order:hover:not(:disabled){color:var(--primary);background:var(--primary-soft)}
.dynamic-icon-action:disabled{opacity:.34;cursor:not-allowed;pointer-events:none}
.dynamic-textarea-field{display:grid;gap:6px;color:var(--muted);font-weight:750}
.dynamic-value-list{display:grid;gap:8px}
.dynamic-value-row{
  display:grid;grid-template-columns:minmax(125px,.7fr) minmax(0,1.3fr);align-items:stretch;gap:9px;
  padding:8px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);
}
.dynamic-value-model{display:flex;align-items:center;padding:8px 10px;border-radius:9px;background:var(--surface);font-weight:750;overflow-wrap:anywhere}
.dynamic-value-row textarea{min-height:54px;background:var(--surface)}
.dynamic-empty-state{
  min-height:72px;display:flex;align-items:center;justify-content:center;gap:9px;padding:12px;border:1px dashed var(--border);
  border-radius:13px;color:var(--muted);background:var(--surface);
}
.dynamic-empty-state.large{min-height:110px;flex-direction:column}
.dynamic-empty-state i{font-size:22px!important;color:var(--primary)}

@media(max-width:720px){
  .model-chip-editor{grid-template-columns:1fr}
  .spec-section-head{grid-template-columns:34px minmax(0,1fr)}
  .dynamic-section-actions{grid-column:1/-1;width:100%}
  .dynamic-section-actions .button{flex:1}
  .dynamic-value-row{grid-template-columns:1fr}
  .cover-image-range-grid{grid-template-columns:1fr!important}
}

body:not(.rendered-document) button:has(>i:only-child){min-width:42px;min-height:42px}

/* Keep the inspector readable inside its narrow desktop sidebar as well. */
.editor-page .model-chip-editor{grid-template-columns:1fr}
.editor-page .spec-section-head{grid-template-columns:34px minmax(0,1fr);align-items:end}
.editor-page .spec-section-head>.spec-section-order{grid-column:1;grid-row:1}
.editor-page .spec-section-head>.dynamic-section-identity{grid-column:2;grid-row:1}
.editor-page .spec-section-head>.dynamic-section-actions{grid-column:1/-1;grid-row:2;width:100%;justify-content:flex-end}
.editor-page .spec-section-head>.dynamic-section-actions .button{flex:1}
.editor-page .dynamic-feature-head{align-items:flex-start}
.editor-page .dynamic-item-actions{flex-wrap:wrap;justify-content:flex-end}


/* DocMaker v8.3 — readable per-image editor and artwork color controls. */
.grid-assets-editor{display:grid;gap:14px}
.grid-asset-card{display:block!important;padding:12px!important;border:1px solid var(--border)!important;border-radius:16px!important;background:var(--surface)!important;overflow:hidden}
.grid-asset-summary{display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:11px}
.grid-asset-summary .asset-thumb{width:64px!important;height:64px!important;border-radius:12px!important;background:var(--surface-soft)}
.grid-asset-name{min-width:0;display:grid;gap:3px}
.grid-asset-name strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.grid-asset-name small{font-size:13px;color:var(--muted)}
.grid-asset-controls{margin-top:12px;padding-top:12px;border-top:1px dashed var(--border);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.grid-mini-field{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:7px;padding:9px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft)}
.grid-mini-field>span{grid-column:1/-1;font-size:14px;font-weight:750;color:var(--text)}
.grid-mini-field input[type="range"]{min-width:0;width:100%}
.grid-mini-field select{grid-column:1/-1;width:100%;min-height:42px;font-size:14px}
.grid-mini-field output{min-width:62px;font-size:14px;font-weight:800;text-align:center;color:var(--primary)}
.artwork-color-controls{margin:12px 0;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}
.artwork-color-controls input[type="color"]{width:100%;height:48px;padding:4px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}
@media(max-width:680px){.grid-asset-summary{grid-template-columns:56px minmax(0,1fr)}.grid-asset-summary .button{grid-column:1/-1}.grid-asset-controls{grid-template-columns:1fr}}


/* DocMaker v8.4 — understandable User Guide cover designer. */
.cover-designer{display:grid;gap:14px}
.cover-designer-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important}
.cover-designer-head>div{min-width:0}
.cover-designer-head h3{display:flex;align-items:center;gap:8px;margin:0 0 5px}
.cover-designer-head p{margin:0;color:var(--muted);font-size:14px;line-height:1.65}
.compact-switch{flex:0 0 auto;min-width:150px;margin:0!important;padding-inline:12px!important;background:var(--surface-soft);border:1px solid var(--border);border-radius:12px}
.cover-ug-preview{
  --cover-preview-model-color:var(--primary);
  --cover-preview-model-text:#fff;
  position:relative;isolation:isolate;min-height:300px;padding:22px;overflow:hidden;
  display:flex;flex-direction:column;align-items:center;
  border:1px solid var(--border);border-radius:18px;background:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.7),0 12px 34px rgba(15,23,42,.08)
}
.cover-ug-preview::before,.cover-ug-preview::after{content:"";position:absolute;z-index:-2;top:0;bottom:0;width:42%;opacity:.12;background-image:linear-gradient(var(--cover-preview-model-color) 1px,transparent 1px),linear-gradient(90deg,var(--cover-preview-model-color) 1px,transparent 1px);background-size:14px 14px}
.cover-ug-preview::before{left:0;clip-path:polygon(0 0,78% 0,35% 100%,0 100%)}
.cover-ug-preview::after{right:0;clip-path:polygon(22% 0,100% 0,100% 100%,65% 100%)}
.cover-ug-preview-brand{width:100%;min-height:70px;padding-bottom:12px;display:flex;justify-content:center;align-items:center;gap:12px;border-bottom:1px solid color-mix(in srgb,var(--cover-preview-model-color) 20%,#dce3eb);text-align:center}
.cover-ug-preview-brand>strong{max-width:240px;font-size:16px;line-height:1.45;color:#172033;overflow-wrap:anywhere}
.cover-ug-preview-logo{width:80px;height:58px;display:grid;place-items:center;flex:0 0 80px}
.cover-ug-preview-logo img{max-width:80px;max-height:58px;display:block;object-fit:contain}
.cover-ug-preview-logo.is-empty{border:1px dashed #cbd5e1;border-radius:10px;color:#94a3b8;background:#f8fafc}
.cover-ug-preview-title{width:min(92%,330px);margin-top:54px;padding:14px 16px;border-radius:13px;background:rgba(255,255,255,.9);font-size:21px;font-weight:900;line-height:1.55;color:#172033;text-align:center;overflow-wrap:anywhere}
.cover-ug-preview-model{width:min(78%,270px);min-height:44px;margin-top:14px;padding:8px 18px;box-sizing:border-box;display:grid;place-items:center;border-radius:8px;background:var(--cover-preview-model-color);color:var(--cover-preview-model-text);font-family:Montserrat,sans-serif;font-size:15px;font-weight:800;text-align:center;direction:ltr;overflow-wrap:anywhere}
.cover-ug-preview-art{position:absolute;z-index:-1;inset:auto 0 12px;height:90px;opacity:.22;background:repeating-radial-gradient(ellipse at 50% 100%,transparent 0 15px,var(--cover-preview-model-color) 16px 17px,transparent 18px 27px)}
.cover-settings-card{display:grid;gap:12px;padding:14px;border:1px solid var(--border);border-radius:15px;background:var(--surface-soft)}
.cover-settings-card-head{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--border)}
.cover-settings-card-head>i{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:var(--primary-soft);color:var(--primary);font-size:17px}
.cover-settings-card-head div{display:grid;gap:2px}
.cover-settings-card-head strong{font-size:15px;color:var(--text)}
.cover-settings-card-head small{font-size:14px;line-height:1.55;color:var(--muted)}
.cover-model-color-field .color-field{display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:10px}
.cover-model-color-field input[type="color"]{width:76px;height:50px;padding:4px;border:1px solid var(--border);border-radius:11px;background:var(--surface);cursor:pointer}
.cover-color-hint{font-size:14px!important;font-weight:600!important;color:var(--muted)}
.cover-designer .cover-image-controls{margin:0;background:var(--surface-soft)}
.compact-cover-settings{margin-bottom:0}
@media(max-width:620px){
  .cover-designer-head{align-items:stretch!important;flex-direction:column}
  .compact-switch{width:100%;box-sizing:border-box}
  .cover-ug-preview{min-height:320px;padding:16px}
  .cover-ug-preview-title{margin-top:46px}
  .cover-model-color-field .color-field{grid-template-columns:64px minmax(0,1fr)}
  .cover-model-color-field input[type="color"]{width:64px}
}

/* DocMaker v8.5 — clearer editor groups, two-level topbar and accessible controls */
:root{--topbar-stack-height:116px}
.topbar-stack{position:sticky;top:0;z-index:40;background:var(--surface);box-shadow:0 1px 0 var(--border)}
.topbar-stack .topbar{position:relative;top:auto;z-index:2;min-height:76px;background:var(--surface);backdrop-filter:none}
.topbar-heading{flex:1 1 320px;min-width:180px;margin-inline-end:0}
.topbar-heading h1{width:100%}
.topbar-actions{flex:0 1 auto;min-width:0;display:flex;align-items:center;gap:12px}
.topbar-primary-actions,.topbar-utility-actions{display:flex;align-items:center;gap:8px}
.topbar-primary-actions:empty{display:none}
.topbar-utility-actions{padding-inline-start:12px;border-inline-start:1px solid var(--border-strong)}
.topbar-secondary{min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:5px clamp(16px,2.5vw,34px);border-top:1px solid var(--border);border-bottom:1px solid var(--border);background:var(--surface-soft)}
.topbar-secondary-copy{min-width:0;display:flex;align-items:center;gap:16px;overflow:hidden;color:var(--muted);font-size:12px;font-weight:650;white-space:nowrap}
.topbar-secondary-copy span{display:inline-flex;align-items:center;gap:6px}
.topbar-secondary-actions{display:flex;align-items:center;gap:12px;margin-inline-start:auto}
.topbar-autosave-switch{min-height:32px;display:inline-flex;align-items:center;gap:8px;padding:3px 5px 3px 10px;border:1px solid #a7d8c8;border-radius:999px;color:#216a58;background:var(--success-soft);cursor:pointer;font-size:12px;font-weight:800;white-space:nowrap}
.topbar-autosave-switch>span{display:inline-flex;align-items:center;gap:6px}
.topbar-autosave-switch input{width:38px;height:20px;margin:0;accent-color:var(--success);cursor:pointer}
.topbar-autosave-switch b{min-width:42px;padding:2px 8px;border-radius:999px;background:var(--surface);text-align:center;font-size:11px}
.topbar-autosave-switch.is-off{border-color:#f2c87d;color:#9a5b00;background:var(--warning-soft)}
.editor-page .topbar-heading{flex:1 1 auto;min-width:260px}
.editor-title-wrap{width:100%;display:block}
.editor-title-input{display:block;width:100%!important;min-width:0!important;max-width:none!important;height:48px;min-height:48px;padding:8px 10px!important;overflow-x:auto;overflow-y:hidden;resize:none;white-space:pre;font-size:clamp(16px,1.35vw,21px)!important;line-height:30px!important;scrollbar-width:thin}
.editor-page .save-state{min-width:92px;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:11px;font-weight:750}
.editor-shell{height:calc(100dvh - var(--topbar-stack-height))}

/* Strong visual separation between inspector sections. */
.editor-tab-panel{padding:14px 12px 30px}
.editor-tab-panel .control-section{position:relative;margin:0 0 14px;padding:16px;border:1px solid var(--border-strong);border-radius:16px;background:var(--surface);box-shadow:0 1px 0 rgba(15,23,42,.025)}
.editor-tab-panel .control-section:last-child{margin-bottom:0}
.editor-tab-panel .control-section.compact{padding-bottom:14px}
.editor-tab-panel .control-section-head{min-height:42px;margin:-4px -4px 12px;padding:0 4px 10px;border-bottom:1px solid var(--border)}
.editor-tab-panel .control-section>h3{margin:0 0 12px;padding-bottom:10px;border-bottom:1px solid var(--border);font-size:14px}
.editor-tab-panel .control-section-head h3{font-size:14px}
.editor-tab-panel .control-section-head h3 i,.editor-tab-panel .control-section>h3 i{width:28px;height:28px;display:inline-grid;place-items:center;margin-inline-end:7px;border-radius:8px;color:var(--primary);background:var(--primary-soft)}
.editor-tab-panel .control-section[data-block-inspector]{border-inline-start:4px solid var(--primary);background:linear-gradient(90deg,color-mix(in srgb,var(--primary-soft) 52%,transparent),transparent 28%),var(--surface)}
.editor-tab-panel .control-section.danger-zone{border-color:#f4b8b8;border-inline-start:4px solid var(--danger)}

/* Cover model: title and model are independent and all three colors are editable. */
.form-grid.three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.cover-model-colors .field{min-width:0}
.color-field-with-value{display:grid!important;grid-template-columns:58px minmax(0,1fr)!important;gap:8px!important}
.color-field-with-value input[type="color"]{width:58px;min-width:58px;height:48px;padding:4px}
.color-field-with-value output{min-height:48px;display:flex;align-items:center;padding:0 10px;border:1px solid var(--border);border-radius:11px;direction:ltr;color:var(--muted);background:var(--surface-soft);font-family:monospace;font-size:12px}
.model-color-help{margin-top:8px!important}
.cover-ug-preview{--cover-preview-model-bg:var(--primary);--cover-preview-model-text:#fff;--cover-preview-model-border:var(--primary)}
.cover-ug-preview-model{width:auto!important;min-width:92px;max-width:78%;min-height:34px!important;margin-top:10px!important;padding:5px 14px!important;border:2px solid var(--cover-preview-model-border)!important;border-radius:7px!important;background:var(--cover-preview-model-bg)!important;color:var(--cover-preview-model-text)!important;font-size:12px!important;box-shadow:none!important}

.documents-pagination{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;margin:22px 0 4px}
.documents-pagination .page-link{min-width:42px;height:42px;display:inline-grid;place-items:center;padding:0 10px;border:1px solid var(--border);border-radius:11px;background:var(--surface);font-weight:800}
.documents-pagination .page-link:hover{border-color:var(--primary);color:var(--primary)}
.documents-pagination .page-link.active{border-color:var(--primary);color:#fff;background:var(--primary)}
.documents-pagination .pagination-summary{margin-inline:8px;color:var(--muted);font-size:12px}
.activity-unavailable{margin-bottom:14px;padding:12px 14px;border:1px solid #f2c87d;border-radius:12px;color:#8a5500;background:var(--warning-soft)}

@media(max-width:1180px){
  .topbar-stack .topbar{flex-wrap:wrap}
  .topbar-heading{flex:1 1 calc(100% - 58px)}
  .topbar-actions{width:100%;justify-content:space-between}
  .topbar-primary-actions{overflow-x:auto;padding-bottom:2px}
  :root{--topbar-stack-height:166px}
}
@media(max-width:900px){
  :root{--topbar-stack-height:154px}
  .topbar-stack{position:relative;top:auto}
  .editor-page .topbar{display:flex!important;flex-wrap:wrap!important;align-items:center!important}
  .editor-page .topbar-heading{flex:1 1 calc(100% - 54px)!important;min-width:0!important}
  .editor-page .topbar-actions{width:100%;display:flex;align-items:center;justify-content:space-between;overflow:visible!important}
  .editor-page .topbar-primary-actions{min-width:0;overflow-x:auto}
  .editor-page .topbar-utility-actions{flex:0 0 auto}
  .topbar-secondary{min-height:44px;padding:6px 10px}
  .topbar-secondary-copy{gap:10px;font-size:11px;overflow-x:auto}
  .topbar-secondary-actions{gap:7px}
  .topbar-autosave-switch>span{display:none}
  .editor-page .save-state{display:none}
  .editor-title-input{height:46px;min-height:46px;font-size:15px!important}
  .editor-page .editor-mobile-tabs{top:0}
  .form-grid.three{grid-template-columns:1fr}
}
@media(max-width:620px){
  .topbar-secondary-copy span:nth-child(n+2){display:none}
  .topbar-utility-actions{padding-inline-start:7px;gap:5px}
  .user-menu-copy{display:none}
  .topbar-primary-actions .button span{display:none}
  .topbar-primary-actions .button{width:44px;padding:0}
}

/* DocMaker v8.5.1 — cover model visibility and lighter smart pagination */
.cover-model-input{margin:12px 0 10px;padding:12px;border:1px solid var(--border,#dbe3ec);border-radius:12px;background:var(--surface-soft,#f7f9fc)}
.cover-model-input>span{font-weight:800;color:var(--text,#172033)}
.cover-model-input input{min-height:46px;font-size:15px;font-weight:700;direction:ltr;text-align:left;background:var(--surface,#fff)}
[data-smart-paginate][data-paginating=true]{cursor:progress;opacity:.82}
.smart-pagination-measurer{contain:layout style;content-visibility:visible}

/* DocMaker v8.6.1 — dynamic hierarchy editor, footer preset cards and font-size controls. */
.dynamic-section-identity{min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;flex:1}
.dynamic-section-identity label{min-width:0;display:grid;gap:6px}
.dynamic-section-identity label>span,.dynamic-parameter-title{font-size:14px;font-weight:800;color:var(--text)}
.dynamic-section-identity textarea{width:100%;min-height:64px;resize:vertical}
.dynamic-parameter-title{display:flex;align-items:center;gap:7px;margin:10px 0 7px;padding:7px 9px;border-radius:9px;background:var(--primary-soft);color:var(--primary)}
.dynamic-feature-card{border-inline-start:3px solid color-mix(in srgb,var(--primary) 60%,transparent)}
.font-size-controls{margin-top:10px;padding:12px;border:1px solid var(--border);border-radius:13px;background:var(--surface-soft)}
.font-size-controls .field>span{font-size:14px}

.footer-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 14px}
.footer-choice-grid>button{position:relative;min-width:0;display:grid;grid-template-columns:76px minmax(0,1fr) 20px;grid-template-rows:auto auto;align-items:center;gap:2px 10px;padding:10px;border:2px solid var(--border);border-radius:14px;color:var(--text);background:var(--surface);cursor:pointer;text-align:start;transition:.18s ease}
.footer-choice-grid>button:hover{border-color:color-mix(in srgb,var(--primary) 55%,var(--border));transform:translateY(-1px)}
.footer-choice-grid>button.active{border-color:var(--primary);background:var(--primary-soft);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 13%,transparent)}
.footer-choice-grid>button>strong{grid-column:2;font-size:14px}
.footer-choice-grid>button>small{grid-column:2;color:var(--muted);font-size:12px}
.footer-choice-grid>button>.fa-circle-check{grid-column:3;grid-row:1/3;opacity:0;color:var(--primary)}
.footer-choice-grid>button.active>.fa-circle-check{opacity:1}
.footer-preset-preview{grid-column:1;grid-row:1/3;position:relative;width:76px;height:48px;display:grid;grid-template-columns:16px 1fr 14px;align-items:end;gap:4px;padding:6px;border-radius:8px;background:#fff;border:1px solid #d8e0e9;overflow:hidden;direction:ltr}
.footer-preset-preview::before{content:"";position:absolute;left:6px;right:6px;top:7px;height:2px;background:#d6dee7}
.footer-preset-preview i{width:12px;height:12px;border:2px solid #9da9b7;border-radius:2px}
.footer-preset-preview b{height:5px;border-radius:99px;background:#c7d0db}
.footer-preset-preview em{width:14px;height:14px;display:grid;place-items:center;border-radius:50%;background:var(--primary);color:#fff;font:700 7px/1 Arial}
.footer-preset-preview.preset-line::before{height:3px;background:var(--primary)}
.footer-preset-preview.preset-line em{border-radius:3px;background:#fff;color:var(--primary);border:1px solid var(--primary)}
.footer-preset-preview.preset-capsule b{height:16px;border:1px solid #d8e0e9;background:#f4f7fa}
.footer-preset-preview.preset-technical{border-top:3px solid #27364a;border-radius:3px}
.footer-preset-preview.preset-technical::after{content:"";position:absolute;right:5px;top:0;width:24px;height:3px;background:var(--primary)}
.footer-preset-preview.preset-technical em{border-radius:2px;background:#27364a}

.cover-ug-preview-brand>strong{font-size:var(--cover-preview-company-size,16px)!important}
.cover-ug-preview-title{font-size:var(--cover-preview-title-size,21px)!important}
.cover-ug-preview-model{font-size:var(--cover-preview-model-size,12px)!important}

@media(max-width:620px){
  .dynamic-section-identity,.footer-choice-grid{grid-template-columns:1fr}
  .footer-choice-grid>button{grid-template-columns:68px minmax(0,1fr) 20px}
  .footer-preset-preview{width:68px}
}


/* v8.6.2 — clearer document typography controls. */
.document-font-size-controls{margin-top:12px}
.dynamic-section-identity textarea{font-size:14px;line-height:1.65}


/* DocMaker v8.6.3 — mobile editor visibility, stacking and responsive smoothness. */
.topbar-stack{z-index:220!important;overflow:visible!important}
.topbar-stack .topbar,.topbar-actions,.topbar-primary-actions,.topbar-utility-actions,.language-menu,.user-menu{overflow:visible!important}
.topbar-stack .dropdown-menu{z-index:420!important}
.editor-page .editor-mobile-tabs{z-index:100!important}

@media(max-width:900px){
  :root{--topbar-stack-height:auto}
  .editor-page .topbar-stack{position:relative!important;top:auto!important;z-index:220!important;overflow:visible!important}
  .editor-page .topbar{
    display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;align-items:center!important;
    gap:8px 10px!important;padding:9px 10px!important;overflow:visible!important;
  }
  .editor-page .topbar>.mobile-only{grid-column:1;grid-row:1;margin:0!important}
  .editor-page .topbar-heading{
    grid-column:2;grid-row:1;display:block!important;width:100%!important;max-width:none!important;min-width:0!important;
    flex:none!important;margin:0!important;overflow:visible!important;
  }
  .editor-page .topbar-heading h1{display:block!important;width:100%!important;max-width:none!important;margin:0!important;overflow:visible!important}
  .editor-page .editor-title-wrap{display:block!important;width:100%!important;min-width:0!important}
  .editor-page .editor-title-input{
    display:block!important;visibility:visible!important;opacity:1!important;width:100%!important;max-width:none!important;
    min-width:0!important;height:48px!important;min-height:48px!important;padding:8px 10px!important;font-size:15px!important;
    line-height:30px!important;white-space:pre!important;overflow-x:auto!important;overflow-y:hidden!important;
  }
  .editor-page .topbar-actions{
    grid-column:1/-1;grid-row:2;width:100%!important;min-width:0!important;display:flex!important;
    align-items:center!important;justify-content:space-between!important;gap:8px!important;overflow:visible!important;
  }
  .editor-page .topbar-primary-actions{min-width:0!important;display:flex!important;gap:7px!important;overflow-x:auto!important;overflow-y:visible!important}
  .editor-page .topbar-utility-actions{position:relative;z-index:3;flex:0 0 auto!important;display:flex!important;gap:6px!important;padding-inline-start:8px!important;overflow:visible!important}
  .editor-page .topbar-secondary{
    position:relative;z-index:2;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;gap:8px!important;min-height:50px!important;padding:7px 10px!important;overflow:visible!important;
  }
  .editor-page .topbar-secondary-copy{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:11px!important}
  .editor-page .topbar-secondary-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;min-width:max-content!important}
  .editor-page .topbar-autosave-switch{
    display:inline-flex!important;visibility:visible!important;opacity:1!important;min-height:38px!important;
    gap:7px!important;padding:4px 7px 4px 10px!important;font-size:12px!important;
  }
  .editor-page .topbar-autosave-switch>span{display:inline-flex!important;align-items:center!important;gap:5px!important}
  .editor-page .topbar-autosave-switch input{display:block!important;width:38px!important;height:20px!important}
  .editor-page .topbar-autosave-switch b{display:block!important;min-width:42px!important;font-size:11px!important}
  .editor-page .user-menu,.editor-page .language-menu{position:relative!important;z-index:5!important}
  .editor-page .dropdown-menu{top:calc(100% + 7px)!important;z-index:500!important;max-height:min(62dvh,520px)!important;overflow:auto!important}
  .editor-page .editor-mobile-tabs{position:sticky!important;top:0!important;z-index:100!important}
  .editor-shell{contain:layout style}
  .editor-preview,.editor-controls{content-visibility:auto;contain-intrinsic-size:800px 900px}
}
@media(max-width:620px){
  .editor-page .topbar-secondary{grid-template-columns:1fr!important}
  .editor-page .topbar-secondary-copy{display:none!important}
  .editor-page .topbar-secondary-actions{width:100%!important;justify-content:stretch!important}
  .editor-page .topbar-autosave-switch{width:100%!important;justify-content:space-between!important;border-radius:12px!important}
  .editor-page .topbar-primary-actions .button{width:44px!important;min-width:44px!important;padding:0!important}
  .editor-page .topbar-primary-actions .button span{display:none!important}
  .editor-page .user-menu-trigger{width:44px!important;min-width:44px!important;height:44px!important;padding:2px!important}
}

/* DocMaker v8.7 — final responsive system and faithful UG designer preview. */
.cover-ug-preview{
  --cover-preview-accent:#2657a4;
  position:relative!important;
  min-height:420px!important;
  overflow:hidden!important;
  display:block!important;
  padding:18px!important;
  border:1px solid var(--border)!important;
  border-radius:18px!important;
  background:#fff!important;
  isolation:isolate;
}
.cover-ug-preview::before{
  content:"";position:absolute;inset:0;z-index:-5;background:#fff;
}
.cover-ug-preview-art{
  position:absolute!important;top:0!important;bottom:0!important;width:42%!important;height:100%!important;
  opacity:.28!important;pointer-events:none!important;background-color:transparent!important;
  background-image:linear-gradient(color-mix(in srgb,var(--cover-preview-accent) 32%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--cover-preview-accent) 32%,transparent) 1px,transparent 1px)!important;
  background-size:15px 15px!important;
}
.cover-ug-preview-art-left{left:0!important;clip-path:polygon(0 0,82% 0,36% 100%,0 100%)!important}
.cover-ug-preview-art-right{right:0!important;clip-path:polygon(18% 0,100% 0,100% 100%,64% 100%)!important}
.cover-ug-preview-waves{
  position:absolute;z-index:-1;left:0;right:0;bottom:12px;height:92px;opacity:.35;pointer-events:none;
  background:repeating-radial-gradient(ellipse at 50% 115%,transparent 0 16px,var(--cover-preview-accent) 17px 18px,transparent 19px 28px);
}
.cover-ug-preview-logo{
  position:relative;z-index:4;width:118px;height:72px;margin:4px auto 0;display:grid;place-items:center;
  border:0!important;border-radius:0!important;background:transparent!important;color:#94a3b8;
}
.cover-ug-preview-logo img{max-width:118px;max-height:72px;object-fit:contain;display:block}
.cover-ug-preview-logo.is-empty{border:1px dashed #cbd5e1!important;border-radius:12px!important;background:#f8fafc!important}
.cover-ug-preview-main{
  position:relative;z-index:4;width:min(88%,410px);margin:8px auto 0;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;
}
.cover-ug-preview-title{
  width:100%!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;color:var(--cover-preview-title-color,#1f2937)!important;font-family:var(--cover-preview-title-font,var(--font))!important;font-weight:900!important;line-height:1.45!important;text-align:center!important;
}
.cover-ug-preview-company{
  max-width:92%;color:var(--cover-preview-company-color,var(--cover-preview-accent));font-family:var(--cover-preview-company-font,var(--font))!important;font-size:var(--cover-preview-company-size,16px)!important;font-weight:800;line-height:1.35;text-align:center;
}
.cover-ug-preview-model{
  width:auto!important;min-width:96px!important;max-width:82%!important;min-height:32px!important;margin:2px 0 0!important;
  padding:5px 16px!important;border:2px solid var(--cover-preview-model-border)!important;border-radius:999px!important;
  background:var(--cover-preview-model-bg)!important;color:var(--cover-preview-model-text)!important;box-shadow:none!important;
  font-size:var(--cover-preview-model-size,12px)!important;font-weight:850!important;line-height:1.2!important;
}
.cover-ug-preview-product{
  position:absolute;z-index:3;left:9%;right:9%;top:48%;bottom:10%;background-repeat:no-repeat;background-position:center;background-size:contain;pointer-events:auto;cursor:grab;touch-action:none;user-select:none;
}
.cover-ug-preview-product.is-dragging{cursor:grabbing;filter:drop-shadow(0 12px 18px rgba(15,23,42,.22))}
.cover-drag-help{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:10px;padding:9px 11px;border:1px dashed var(--border);border-radius:12px;background:var(--surface-muted);font-size:12px;color:var(--muted)}
.cover-drag-help span{flex:1 1 190px}
.cover-drag-help i{color:var(--primary)}

/* One coherent responsive shell; later rules intentionally supersede legacy breakpoints. */
@media(max-width:1180px){
  .app-shell{grid-template-columns:1fr!important}
  .app-main{min-width:0!important;width:100%!important;margin:0!important}
  .sidebar{transform:translateX(110%);transition:transform .22s ease;box-shadow:-18px 0 45px rgba(15,23,42,.22)}
  html[dir="ltr"] .sidebar{transform:translateX(-110%)}
  .app-shell.sidebar-open .sidebar,.sidebar.open{transform:translateX(0)!important}
  .mobile-only{display:inline-grid!important}
  .page-content{width:100%!important;max-width:none!important;padding:16px!important}
  .topbar{padding-inline:14px!important}
  .dashboard-grid,.profile-layout,.ticket-detail-layout,.roles-layout,.admin-grid,.settings-layout{grid-template-columns:1fr!important}
  .documents-grid,.documents-grid-rich,.company-grid,.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:1050px){
  .editor-page .page-content{padding:0!important;overflow:visible!important}
  .editor-page .editor-mobile-tabs{display:grid!important;grid-template-columns:1fr 1fr!important;position:sticky!important;top:0!important;z-index:160!important}
  .editor-page .editor-shell{display:block!important;width:100%!important;height:auto!important;min-height:calc(100dvh - 58px)!important;overflow:visible!important;contain:none!important}
  .editor-page .editor-controls,.editor-page .editor-preview{width:100%!important;min-width:0!important;max-width:none!important;contain:none!important;content-visibility:visible!important}
  .editor-page .editor-shell:not(.show-preview) .editor-controls{display:block!important;height:auto!important;max-height:none!important;overflow:visible!important;padding-bottom:88px!important}
  .editor-page .editor-shell:not(.show-preview) .editor-preview{display:none!important}
  .editor-page .editor-shell.show-preview .editor-controls{display:none!important}
  .editor-page .editor-shell.show-preview .editor-preview{display:flex!important;height:calc(100dvh - 58px)!important;min-height:520px!important;overflow:hidden!important}
  .editor-page .preview-stage{height:auto!important;min-height:0!important;flex:1!important;padding:18px 8px!important;overflow:auto!important;scrollbar-gutter:auto!important}
  .editor-page .preview-toolbar{position:sticky!important;top:0!important;z-index:30!important;flex-wrap:wrap!important}
  .editor-page .preview-document{width:794px!important;min-width:794px!important;margin-inline:auto!important;transform-origin:top center!important}
  .editor-page .editor-tabs{position:sticky!important;top:58px!important;z-index:80!important;background:var(--surface)!important}
  .editor-page .control-section{margin:12px!important;padding:14px!important}
  .editor-page .editor-tab-panel{padding-bottom:40px!important}
  .editor-page .block-library{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .editor-page .topbar-stack{position:relative!important;z-index:230!important;overflow:visible!important}
  .editor-page .topbar{display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;gap:8px!important;overflow:visible!important}
  .editor-page .topbar-heading{grid-column:2!important;min-width:0!important;width:100%!important}
  .editor-page .topbar-actions{grid-column:1/-1!important;width:100%!important;display:flex!important;justify-content:space-between!important;gap:8px!important;overflow:visible!important}
  .editor-page .topbar-primary-actions{display:flex!important;min-width:0!important;overflow-x:auto!important;overflow-y:visible!important;scrollbar-width:none}
  .editor-page .topbar-utility-actions{flex:0 0 auto!important;overflow:visible!important}
  .editor-page .topbar-secondary{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;overflow:visible!important}
  .editor-page .editor-title-input{display:block!important;width:100%!important;max-width:none!important;visibility:visible!important;opacity:1!important}
  .editor-page .dropdown-menu{z-index:700!important;max-height:min(65dvh,540px)!important;overflow:auto!important}
}

@media(max-width:760px){
  .page-content{padding:12px!important}
  .documents-grid,.documents-grid-rich,.company-grid,.metric-grid,.form-grid.two,.form-grid.three,.permission-grid,.role-choice-grid{grid-template-columns:1fr!important}
  .panel-card{min-width:0!important;overflow:hidden}
  .topbar-secondary{grid-template-columns:1fr!important}
  .topbar-secondary-copy{overflow-x:auto!important;white-space:nowrap!important}
  .editor-page .topbar-secondary-copy{display:none!important}
  .editor-page .topbar-secondary-actions{width:100%!important}
  .editor-page .topbar-autosave-switch{display:flex!important;width:100%!important;justify-content:space-between!important}
  .editor-page .block-library{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .editor-page .control-section-head{align-items:flex-start!important;flex-direction:column!important}
  .editor-page .page-toolbar-actions,.editor-page .selection-move-actions{width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important}
  .editor-page .page-toolbar-actions .button,.editor-page .selection-move-actions .button{width:100%!important;justify-content:center!important}
  .cover-ug-preview{min-height:380px!important}
  .cover-ug-preview-main{margin-top:62px!important}
}

@media(max-width:520px){
  .page-content{padding:8px!important}
  .topbar{padding:8px!important}
  .topbar-primary-actions .button span{display:none!important}
  .topbar-primary-actions .button{width:44px!important;min-width:44px!important;padding:0!important}
  .user-menu-copy{display:none!important}
  .editor-page .block-library{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .editor-page .editor-tabs button{font-size:11px!important;padding-inline:6px!important}
  .editor-page .control-section{margin:8px!important;padding:12px!important;border-radius:14px!important}
  .cover-settings-card{padding:11px!important}
  .cover-choice-grid,.header-choice-grid,.footer-choice-grid{grid-template-columns:1fr!important}
  .cover-ug-preview{min-height:350px!important;padding:12px!important}
  .cover-ug-preview-logo{width:94px;height:60px}
  .cover-ug-preview-logo img{max-width:94px;max-height:60px}
  .cover-ug-preview-main{width:92%;margin-top:50px!important}
}

/* Resize must be immediate; avoid delayed content-visibility state after DevTools viewport changes. */
.editor-page .editor-shell,.editor-page .editor-controls,.editor-page .editor-preview,.editor-page .preview-stage{
  content-visibility:visible!important;contain:none!important;
}
.ai-pagination-button[data-paginating="true"]{pointer-events:none;min-width:145px}
.ai-pagination-button[data-paginating="true"] i{animation:spin 1s linear infinite}

/* v8.7.1 — AI Pagination is explicit; live editing only reports overflow. */
.ai-pagination-button{position:relative;isolation:isolate}
.ai-pagination-button.needs-pagination::after{content:"";position:absolute;top:7px;inset-inline-end:7px;width:8px;height:8px;border-radius:50%;background:#f59e0b;box-shadow:0 0 0 3px color-mix(in srgb,#f59e0b 22%,transparent)}
.ai-pagination-button[data-paginating="true"]{cursor:progress;opacity:.88}
.preview-document.has-pagination-overflow::before{content:"صفحه‌بندی هوشمند";position:sticky;top:8px;z-index:80;display:block;width:max-content;margin:8px auto -38px;padding:5px 10px;border-radius:999px;background:#fff7ed;color:#b45309;border:1px solid #fed7aa;font:800 12px/1.4 Vazirmatn,Arial,sans-serif;pointer-events:none}
@media(max-width:1050px){.preview-document.has-pagination-overflow::before{display:none}}

.preview-document.is-virtualized-preview::after{content:attr(data-preview-window) " / " attr(data-preview-page-count);position:sticky;bottom:10px;z-index:90;display:block;width:max-content;max-width:calc(100% - 24px);margin:10px auto;padding:6px 11px;border:1px solid var(--border);border-radius:999px;background:color-mix(in srgb,var(--surface) 94%,transparent);box-shadow:var(--shadow-sm);color:var(--muted);font:700 12px/1.4 Vazirmatn,Arial,sans-serif;backdrop-filter:blur(8px);pointer-events:none}
@media(max-width:1050px){.preview-document.is-virtualized-preview::after{position:relative;bottom:auto}}

.database-login-warning{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:11px;margin:0 0 14px;padding:12px 13px;border:1px solid #f59e0b;border-radius:13px;background:#fffbeb;color:#92400e}.database-login-warning>i{width:42px;height:42px;display:grid;place-items:center;border-radius:11px;background:#fef3c7;font-size:18px}.database-login-warning>span{display:flex;flex-direction:column;gap:2px}.database-login-warning strong{font-size:14px}.database-login-warning small{font-size:12px;line-height:1.7}


/* DocMaker v8.7.2 — reliable identity fallbacks and zero body overflow on live device resize. */
.identity-fallback-icon{font-size:16px;line-height:1;color:currentColor}
.profile-avatar-large>.identity-fallback-icon{font-size:42px}
.creator-logo>.identity-fallback-icon{font-size:18px;color:var(--primary)}
.avatar.has-image-fallback,.activity-avatar.has-image-fallback,.profile-avatar-large.has-image-fallback{display:grid;place-items:center}
@media(max-width:1050px){
  html,body,.app-shell,.app-main,.editor-page{width:100%!important;max-width:100%!important;overflow-x:clip!important}
  .editor-page .topbar-stack,.editor-page .topbar,.editor-page .topbar-actions,.editor-page .topbar-primary-actions,.editor-page .topbar-utility-actions,.editor-page .topbar-secondary,.editor-page .topbar-secondary-actions,.editor-page .editor-shell,.editor-page .editor-controls,.editor-page .editor-preview,.editor-page .preview-stage{max-width:100%!important;min-width:0!important}
  .editor-page .editor-shell,.editor-page .editor-controls,.editor-page .editor-preview{overflow-x:clip!important}
  .editor-page .topbar-primary-actions{overscroll-behavior-inline:contain!important}
  .editor-page .preview-stage{width:100%!important}
}


/* DocMaker v8.7.3 — readable panel actions and single-line creator identity. */
.document-card .button-sm,
.documents-pagination .button-sm,
.document-toolbar .button-sm{
  min-height:44px!important;
  padding:9px 14px!important;
  font-size:14px!important;
  line-height:1.25!important;
  gap:8px!important;
}
.document-card .button-sm i{font-size:14px!important}
.document-card-creator:has(.creator-copy small){grid-template-columns:46px minmax(0,1fr)}
.document-card-creator:not(:has(.creator-copy small)) .creator-copy{justify-content:center}
.creator-copy strong{font-size:14px!important}
.creator-copy small{font-size:12px!important}

/* Keep all compact panel actions readable; no button-sm text below 14px. */
.button-sm{
  min-height:44px!important;
  padding:9px 14px!important;
  font-size:14px!important;
  line-height:1.25!important;
  gap:8px!important;
}
.button-sm i{font-size:14px!important}

/* DocMaker v8.7.4 — profile experience, role guidance and timed bans. */
.profile-workspace{display:grid;gap:18px;min-width:0}.profile-hero{position:relative;isolation:isolate;overflow:hidden;min-height:230px;padding:28px;display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,320px);align-items:center;gap:24px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 9%,var(--surface)),var(--surface) 48%,color-mix(in srgb,var(--success) 8%,var(--surface)))}.profile-hero-art{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}.profile-hero-art span{position:absolute;border-radius:50%;filter:blur(1px);opacity:.55}.profile-hero-art span:nth-child(1){width:300px;height:300px;inset:-150px auto auto -80px;background:color-mix(in srgb,var(--primary) 17%,transparent)}.profile-hero-art span:nth-child(2){width:210px;height:210px;inset:auto 14% -130px auto;background:color-mix(in srgb,var(--success) 17%,transparent)}.profile-hero-art span:nth-child(3){width:140px;height:140px;inset:20px -55px auto auto;border:20px solid color-mix(in srgb,var(--primary) 10%,transparent)}.profile-hero-main{display:flex;align-items:center;gap:20px;min-width:0}.profile-avatar-xl,.company-logo-xl{position:relative;width:132px;height:132px;flex:0 0 132px;display:grid;place-items:center;border-radius:34px;overflow:hidden;border:6px solid color-mix(in srgb,var(--surface) 88%,transparent);background:var(--surface);box-shadow:0 18px 46px rgba(15,23,42,.14);color:var(--primary);font-size:44px}.company-logo-xl{border-radius:28px}.profile-avatar-xl img,.company-logo-xl img{width:100%;height:100%;display:block;object-fit:cover}.company-logo-xl img{object-fit:contain;padding:10px}.profile-avatar-edit{position:absolute;inset:auto 8px 8px auto;width:38px;height:38px;display:grid;place-items:center;border-radius:12px;color:#fff;background:var(--primary);box-shadow:0 7px 18px rgba(15,23,42,.22);cursor:pointer}.profile-hero-copy{min-width:0}.profile-eyebrow{display:inline-flex;align-items:center;gap:7px;margin-bottom:8px;color:var(--primary);font-weight:800;font-size:13px}.profile-hero-copy h2{margin:0;font-size:clamp(24px,3vw,38px);line-height:1.3;overflow-wrap:anywhere}.profile-hero-copy>p{margin:5px 0 14px;color:var(--muted);font-size:15px}.profile-hero-chips{display:flex;flex-wrap:wrap;gap:8px}.profile-hero-chips span{min-height:38px;display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid color-mix(in srgb,var(--border) 75%,transparent);border-radius:12px;background:color-mix(in srgb,var(--surface) 82%,transparent);font-size:13px}.profile-completion-card,.company-hero-metric{position:relative;display:grid;grid-template-columns:88px 1fr;align-items:center;gap:15px;padding:18px;border:1px solid color-mix(in srgb,var(--border) 80%,transparent);border-radius:20px;background:color-mix(in srgb,var(--surface) 82%,transparent);backdrop-filter:blur(12px)}.profile-completion-ring{width:82px;height:82px;display:grid;place-items:center;border-radius:50%;background:conic-gradient(var(--primary) var(--profile-progress),var(--surface-strong) 0);position:relative}.profile-completion-ring::after{content:"";position:absolute;inset:8px;border-radius:50%;background:var(--surface)}.profile-completion-ring strong{position:relative;z-index:1;font-size:18px}.profile-completion-card>div:last-child{display:flex;flex-direction:column;gap:4px}.profile-completion-card small{color:var(--muted);line-height:1.7}.company-hero-metric{grid-template-columns:1fr;text-align:center}.company-hero-metric strong{font-size:42px;color:var(--primary);line-height:1}.company-hero-metric span{font-weight:900}.company-hero-metric small{color:var(--muted)}.profile-editor-grid{display:grid;grid-template-columns:minmax(230px,300px) minmax(0,1fr);gap:18px;align-items:start}.profile-side-stack,.profile-form-stack{display:grid;gap:16px;min-width:0}.profile-side-stack{position:sticky;top:88px}.profile-info-card,.profile-quick-facts,.profile-section-card{padding:20px}.profile-card-icon{width:50px;height:50px;display:grid;place-items:center;margin-bottom:14px;border-radius:15px;color:var(--primary);background:var(--primary-soft);font-size:21px}.profile-info-card h3,.profile-quick-facts h3{margin:0 0 8px}.profile-info-card p{margin:0;color:var(--muted);line-height:1.9}.profile-quick-facts dl{display:grid;gap:0;margin:0}.profile-quick-facts dl div{display:flex;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid var(--border)}.profile-quick-facts dl div:last-child{border-bottom:0}.profile-quick-facts dt{color:var(--muted)}.profile-quick-facts dd{margin:0;font-weight:800;text-align:end}.profile-section-head{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:12px;margin-bottom:18px;padding-bottom:15px;border-bottom:1px solid var(--border)}.profile-section-head>span{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;color:var(--primary);background:var(--primary-soft);font-size:20px}.profile-section-head h3,.profile-section-head p{margin:0}.profile-section-head p{margin-top:3px;color:var(--muted);line-height:1.7}.profile-form-grid{gap:16px}.profile-form-grid .field>span{font-size:14px}.profile-save-bar{position:sticky;bottom:14px;z-index:12;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 15px;border:1px solid var(--border);border-radius:16px;background:color-mix(in srgb,var(--surface) 90%,transparent);box-shadow:0 16px 42px rgba(15,23,42,.15);backdrop-filter:blur(16px)}.profile-save-bar>span{display:flex;align-items:center;gap:8px;color:var(--muted)}.members-command-center{padding:22px;margin-top:20px}.members-panel-head{align-items:center}.section-kicker{display:block;margin-bottom:4px;color:var(--primary);font-size:11px;font-weight:900;letter-spacing:.15em}.members-count{min-width:90px;display:flex;flex-direction:column;align-items:center;padding:10px 14px;border-radius:15px;background:var(--primary-soft);color:var(--primary)}.members-count b{font-size:24px}.role-guide-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px;margin:18px 0}.role-guide-card{position:relative;display:grid;grid-template-columns:46px minmax(0,1fr);align-items:start;gap:11px;padding:13px;border:1px solid color-mix(in srgb,var(--role-color) 28%,var(--border));border-radius:15px;background:color-mix(in srgb,var(--role-color) 5%,var(--surface))}.role-guide-icon{width:46px;height:46px;display:grid;place-items:center;border-radius:13px;color:var(--role-color);background:color-mix(in srgb,var(--role-color) 12%,var(--surface));font-size:19px}.role-guide-card strong{font-size:14px}.role-guide-card p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.75}.role-kind{position:absolute;inset:8px auto auto 8px;font-size:9px;color:var(--muted)}.modern-member-invite{grid-template-columns:1fr!important;align-items:stretch!important;padding:18px;border:1px solid var(--border);border-radius:18px;background:var(--surface-soft)}.invite-form-copy{display:flex;align-items:center;gap:12px}.invite-form-copy>i{width:46px;height:46px;display:grid;place-items:center;border-radius:14px;color:#fff;background:var(--primary);font-size:18px}.invite-form-copy>div{display:flex;flex-direction:column}.invite-form-copy small{color:var(--muted)}.detailed-role-choice{align-items:flex-start!important}.detailed-role-choice>span{display:flex;flex-direction:column;min-width:0}.detailed-role-choice small{color:var(--muted);font-size:11px;line-height:1.65}.member-list-section{margin-top:20px}.member-list-section>h4{display:flex;align-items:center;gap:8px;margin:0 0 10px}.user-status-stack{display:flex;flex-direction:column;gap:5px;align-items:flex-start}.admin-user-actions{flex-wrap:wrap;justify-content:flex-end}.detailed-role-option{align-items:flex-start!important}.detailed-role-option>span:nth-child(2){display:flex;flex-direction:column}.detailed-role-option small{color:var(--muted);line-height:1.6}.ban-mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ban-mode-grid label{position:relative;cursor:pointer}.ban-mode-grid input{position:absolute;opacity:0}.ban-mode-grid label>span{min-height:112px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:12px;border:1px solid var(--border);border-radius:15px;text-align:center;background:var(--surface-soft)}.ban-mode-grid label>span i{font-size:24px;color:var(--primary)}.ban-mode-grid label>span small{color:var(--muted)}.ban-mode-grid label:has(input:checked)>span{border-color:var(--danger);box-shadow:0 0 0 3px color-mix(in srgb,var(--danger) 16%,transparent);background:var(--danger-soft)}.ban-mode-grid label:has(input:checked)>span i{color:var(--danger)}.notice-card.danger{border-color:color-mix(in srgb,var(--danger) 35%,var(--border));background:var(--danger-soft)}
@media(max-width:1000px){.profile-hero{grid-template-columns:1fr}.profile-completion-card,.company-hero-metric{max-width:none}.profile-editor-grid{grid-template-columns:1fr}.profile-side-stack{position:static;grid-template-columns:1fr 1fr}.role-guide-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.profile-hero{padding:20px}.profile-hero-main{align-items:flex-start}.profile-avatar-xl,.company-logo-xl{width:96px;height:96px;flex-basis:96px;border-radius:25px}.profile-hero-copy h2{font-size:24px}.profile-hero-chips{display:grid}.profile-completion-card{grid-template-columns:72px 1fr}.profile-completion-ring{width:68px;height:68px}.profile-side-stack,.role-guide-grid{grid-template-columns:1fr}.profile-save-bar{position:static;align-items:stretch;flex-direction:column}.profile-save-bar .button{width:100%}.ban-mode-grid{grid-template-columns:1fr}.members-command-center{padding:14px}.profile-section-card{padding:15px}}
@media(max-width:460px){.profile-hero-main{flex-direction:column}.profile-avatar-xl,.company-logo-xl{width:108px;height:108px;flex-basis:108px}.profile-hero-chips span{width:100%;overflow-wrap:anywhere}.profile-completion-card{grid-template-columns:1fr;text-align:center}.profile-completion-ring{margin:auto}.profile-section-head{grid-template-columns:42px 1fr}.profile-section-head>span{width:42px;height:42px}.admin-user-actions .button{width:100%;justify-content:center}}

/* DocMaker v8.7.4 final profile spacing and admin safety UI. */
.profile-form-stack{padding-bottom:84px}
@media(max-width:680px){.profile-form-stack{padding-bottom:0}}


/* DocMaker v8.7.5 — dedicated document-title bar and low-cost responsive editor. */
.editor-page-label{display:inline-flex;align-items:center;gap:9px;min-height:42px;color:var(--text)}
.editor-page-label i{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;color:var(--primary);background:var(--primary-soft);font-size:15px}
.editor-document-titlebar{width:100%;min-width:0;display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:14px;padding:10px clamp(16px,2.5vw,34px) 12px;border-bottom:1px solid var(--border-strong);background:var(--surface)}
.editor-document-titlebar>label{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:14px;font-weight:850;white-space:nowrap}
.editor-document-titlebar>label i{color:var(--primary)}
.editor-document-titlebar .editor-title-wrap{min-width:0;width:100%}
.editor-document-titlebar .editor-title-input{width:100%!important;height:58px!important;min-height:58px!important;max-height:86px!important;padding:11px 16px!important;border:1px solid var(--border-strong)!important;border-radius:14px!important;overflow-x:auto!important;overflow-y:hidden!important;resize:none!important;white-space:pre!important;color:var(--text)!important;background:var(--surface-soft)!important;font-family:inherit!important;font-size:clamp(18px,1.7vw,25px)!important;font-weight:850!important;line-height:34px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.45);outline:0!important}
.editor-document-titlebar .editor-title-input:focus{border-color:var(--primary)!important;background:var(--surface)!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 13%,transparent)!important}
.editor-page .editor-shell{height:calc(100dvh - var(--topbar-stack-height))}
.editor-page .editor-controls,.editor-page .editor-preview{contain:layout paint style!important;content-visibility:auto!important}
.editor-page .editor-tab-panel:not(.active){display:none!important;content-visibility:hidden!important}
.editor-page .editor-tab-panel.active{content-visibility:auto;contain-intrinsic-size:900px}
.editor-page .preview-document{contain:layout style paint!important}
html.editor-is-resizing .editor-page .preview-document{visibility:hidden!important;pointer-events:none!important}
html.editor-is-resizing .editor-page *,html.editor-is-resizing .editor-page *::before,html.editor-is-resizing .editor-page *::after{transition:none!important;animation-play-state:paused!important}
html.editor-is-resizing .editor-page .editor-preview{contain:strict!important}
@media(max-width:1050px){
  .editor-document-titlebar{grid-template-columns:1fr;gap:5px;padding:8px 10px 10px}
  .editor-document-titlebar>label{font-size:12px;padding-inline:3px}
  .editor-document-titlebar .editor-title-input{height:56px!important;min-height:56px!important;font-size:18px!important;line-height:32px!important;padding:10px 13px!important}
  .editor-page .editor-shell{height:auto!important;min-height:calc(100dvh - var(--topbar-stack-height))!important}
  .editor-page .editor-controls,.editor-page .editor-preview{contain:layout paint style!important}
}
@media(max-width:520px){
  .editor-page-label span{font-size:14px}
  .editor-document-titlebar{padding:7px 8px 9px}
  .editor-document-titlebar .editor-title-input{height:54px!important;min-height:54px!important;font-size:17px!important;border-radius:12px!important}
}
/* Script-aware interface font: changing UI language must never turn Persian text into Arial. */
:root{--ui-font-fa:"Vazirmatn","Noto Naskh Arabic",Tahoma,sans-serif;--ui-font-latin:"Montserrat","Vazirmatn",system-ui,sans-serif;--ui-font-zh:"Noto Sans SC","Vazirmatn",system-ui,sans-serif}
html[lang="fa"] body,html[lang="ar"] body,.ui-script-fa,[lang="fa"],[lang="ar"]{font-family:var(--ui-font-fa)!important}
html[lang="zh-CN"] body,.ui-script-zh,[lang="zh-CN"]{font-family:var(--ui-font-zh)!important}
html:not([lang="fa"]):not([lang="ar"]):not([lang="zh-CN"]) body{font-family:var(--ui-font-latin)}
input.ui-script-fa,textarea.ui-script-fa,select.ui-script-fa,button.ui-script-fa{font-family:var(--ui-font-fa)!important}

/* DocMaker v8.8.0 — transform-based preview scaling and block typography controls. */
.block-typography-controls{margin-top:16px;padding:13px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}
.block-typography-controls .structured-toolbar{margin-bottom:10px}
.preview-scale-frame{position:relative;flex:0 0 auto;align-self:flex-start;margin-inline:auto;overflow:visible;transform:none!important}
.preview-scale-frame>.preview-document{width:794px!important;min-width:794px!important;margin:0!important;transform-origin:top left!important}
@media(max-width:1050px){
  .editor-page .preview-stage{overflow-x:hidden!important;justify-items:center!important}
  .editor-page .preview-scale-frame{justify-self:center!important;margin-inline:auto!important}
  .editor-page .preview-scale-frame>.preview-document,
  .editor-page .preview-scale-frame>.preview-document[dir="rtl"],
  .editor-page .preview-scale-frame>.preview-document[dir="ltr"]{transform-origin:top left!important;margin:0!important}
}

/* DocMaker v8.8.2 — document table cell alignment. */
.editor-preview .doc-content table :is(th,td){text-align:center!important;vertical-align:middle!important}
.editor-preview .doc-content table :is(th,td) :is(p,div,h1,h2,h3,h4,h5,h6,ul,ol){text-align:inherit!important}

/* v8.8.3 — user licensing and unified admin modal */
.license-economy-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.license-economy-summary article{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-sm)}.license-economy-summary article>div{min-width:0;display:grid;gap:3px}.license-economy-summary strong{font-size:14px}.license-economy-summary small{color:var(--muted);font-size:10px;line-height:1.8}.license-summary-icon{width:44px;height:44px;display:grid;place-items:center;flex:0 0 44px;border-radius:14px;font-size:19px}.license-summary-icon.free{color:#047857;background:#d1fae5}.license-summary-icon.monthly{color:#1d4ed8;background:#dbeafe}.license-summary-icon.quarterly{color:#7c3aed;background:#ede9fe}.license-summary-icon.lifetime{color:#b45309;background:#fef3c7}.admin-license-table td{vertical-align:middle}.table-user em{display:block;margin-top:2px;color:var(--muted);font-size:9px;font-style:normal}.system-role-stack,.license-cell{display:grid;justify-items:start;gap:5px}.system-role-stack small,.license-cell small{color:var(--muted);font-size:9px}.system-role-badge,.license-plan-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}.system-role-badge.root{color:#92400e;background:#fef3c7}.system-role-badge.admin{color:#5b21b6;background:#ede9fe}.system-role-badge.user{color:#334155;background:#e2e8f0}.license-plan-badge.free{color:#047857;background:#d1fae5}.license-plan-badge.monthly{color:#1d4ed8;background:#dbeafe}.license-plan-badge.quarterly{color:#6d28d9;background:#ede9fe}.license-plan-badge.lifetime{color:#b45309;background:#fef3c7}.danger-text{color:#b91c1c!important}.quota-meter{min-width:130px;display:grid;gap:5px}.quota-meter>span{display:flex;align-items:baseline;gap:5px}.quota-meter>span b{font-size:17px}.quota-meter>span small,.quota-meter em{color:var(--muted);font-size:9px;font-style:normal}.quota-meter>i{height:6px;display:block;overflow:hidden;border-radius:99px;background:var(--surface-soft)}.quota-meter>i b{width:var(--quota-percent,0%);height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,#10b981,#f59e0b,#ef4444)}.quota-meter.unlimited>span b{color:#b45309}.modal-xl{width:min(1120px,calc(100vw - 28px));max-width:1120px}.user-management-dialog{max-height:calc(100vh - 28px);overflow:hidden}.user-management-dialog .modal-body{max-height:calc(100vh - 120px);overflow:auto}.user-management-head{position:sticky;top:0;z-index:4;background:var(--surface)}.managed-user-heading{display:flex;align-items:center;gap:12px}.managed-user-avatar{width:46px;height:46px;display:grid;place-items:center;border-radius:15px;color:var(--primary);background:var(--primary-soft);font-size:18px}.managed-user-heading p{direction:ltr;text-align:right}.user-management-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.management-section{padding:16px;border:1px solid var(--border);border-radius:18px;background:var(--surface-soft)}.management-section.span-2{grid-column:1/-1}.management-section-head{display:flex;align-items:flex-start;gap:10px;margin-bottom:14px}.management-section-head>span{width:38px;height:38px;display:grid;place-items:center;flex:0 0 38px;border-radius:12px;color:var(--primary);background:var(--primary-soft)}.management-section-head h3{margin:0 0 3px;font-size:14px}.management-section-head p{margin:0;color:var(--muted);font-size:10px;line-height:1.8}.system-role-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.system-role-picker label,.license-plan-option{position:relative;cursor:pointer}.system-role-picker input,.license-plan-option input{position:absolute;opacity:0;pointer-events:none}.system-role-picker label>span{height:100%;display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;column-gap:9px;padding:12px;border:2px solid var(--border);border-radius:14px;background:var(--surface)}.system-role-picker label>span>i{grid-row:1/3;width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:var(--surface-soft)}.system-role-picker strong{font-size:11px}.system-role-picker small{color:var(--muted);font-size:9px}.system-role-picker input:checked+span{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}.license-plan-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.license-plan-option{display:grid;grid-template-columns:40px minmax(0,1fr) 20px;align-items:center;gap:9px;padding:12px;border:2px solid var(--border);border-radius:15px;background:var(--surface)}.license-plan-option>span:nth-of-type(2){display:grid;gap:3px}.license-plan-option strong{font-size:11px}.license-plan-option small{color:var(--muted);font-size:8px;line-height:1.7}.license-plan-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;font-size:17px}.license-plan-option.free .license-plan-icon{color:#047857;background:#d1fae5}.license-plan-option.monthly .license-plan-icon{color:#1d4ed8;background:#dbeafe}.license-plan-option.quarterly .license-plan-icon{color:#6d28d9;background:#ede9fe}.license-plan-option.lifetime .license-plan-icon{color:#b45309;background:#fef3c7}.license-plan-option .selected-check{color:var(--primary);opacity:0}.license-plan-option:has(input:checked){border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}.license-plan-option:has(input:checked) .selected-check{opacity:1}.license-admin-fields{margin-top:12px}.current-license-preview{display:flex;align-items:center;gap:10px;margin-top:12px;padding:10px;border:1px dashed var(--border-strong);border-radius:13px;background:var(--surface)}.current-license-preview>div{display:grid;gap:2px}.current-license-preview strong{font-size:10px}.current-license-preview small{color:var(--muted);font-size:9px}.compact-role-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.account-active-switch{display:block;cursor:pointer}.account-active-switch>input{position:absolute;opacity:0}.account-active-switch>span{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:2px 10px;padding:13px;border:1px solid var(--border);border-radius:14px;background:var(--surface)}.account-active-switch i{grid-row:1/3;position:relative;width:42px;height:24px;border-radius:99px;background:#cbd5e1;transition:.2s}.account-active-switch i:after{content:"";position:absolute;top:3px;inset-inline-start:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(0,0,0,.18);transition:.2s}.account-active-switch b{font-size:11px}.account-active-switch small{color:var(--muted);font-size:9px}.account-active-switch input:checked+span{border-color:#86efac;background:#f0fdf4}.account-active-switch input:checked+span i{background:#22c55e}.account-active-switch input:checked+span i:after{transform:translateX(-18px)}[dir=ltr] .account-active-switch input:checked+span i:after{transform:translateX(18px)}.danger-section{border-color:#fecaca;background:#fffafa}.ban-control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:10px}.ban-control-grid label{position:relative}.ban-control-grid input{position:absolute;opacity:0}.ban-control-grid span{display:block;padding:9px;border:1px solid var(--border);border-radius:10px;background:var(--surface);font-size:10px;text-align:center;cursor:pointer}.ban-control-grid input:checked+span{border-color:#ef4444;color:#b91c1c;background:#fef2f2}.user-management-controls.is-readonly{opacity:.62;pointer-events:none}.modal-sticky-actions{position:sticky;bottom:-1px;z-index:4;display:flex;justify-content:flex-end;gap:9px;margin:16px -18px -18px;padding:13px 18px;border-top:1px solid var(--border);background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(12px)}
@media(max-width:1050px){.license-economy-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.license-plan-picker{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.license-economy-summary,.user-management-grid{grid-template-columns:1fr}.management-section.span-2{grid-column:auto}.license-plan-picker,.system-role-picker,.compact-role-picker{grid-template-columns:1fr}.modal-xl{width:calc(100vw - 12px)}.user-management-dialog{max-height:calc(100vh - 12px)}.modal-sticky-actions{justify-content:stretch}.modal-sticky-actions .button{flex:1}}

/* v8.8.3 — account licensing and explicit admin license actions */
.license-apply-switch{display:block;margin:16px 0 12px;cursor:pointer}.license-apply-switch>input{position:absolute;opacity:0;pointer-events:none}.license-apply-switch>span{display:grid;grid-template-columns:42px 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;padding:14px 16px;border:1px dashed var(--border);border-radius:16px;background:var(--surface-muted,#f8fafc);transition:.2s ease}.license-apply-switch>span>i{grid-row:1/3;width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#e2e8f0;color:#64748b}.license-apply-switch b{font-size:14px}.license-apply-switch small{color:var(--muted);line-height:1.7}.license-apply-switch>input:checked+span{border-style:solid;border-color:#2563eb;background:rgba(37,99,235,.07);box-shadow:0 0 0 3px rgba(37,99,235,.08)}.license-apply-switch>input:checked+span>i{background:#2563eb;color:#fff}.license-apply-switch>input:disabled+span{opacity:.58;cursor:not-allowed}.license-admin-fields :is(select,textarea):disabled,.license-plan-option input:disabled~span{opacity:.58;cursor:not-allowed}
.license-account-banner{display:flex;align-items:center;gap:14px;margin:0 0 18px;padding:16px 18px;border:1px solid var(--border);border-radius:18px;background:linear-gradient(135deg,var(--surface,#fff),var(--surface-muted,#f8fafc));box-shadow:0 10px 28px rgba(15,23,42,.06)}.license-account-banner.compact{padding:12px 15px;border-radius:15px}.license-account-banner>div{display:grid;gap:4px;min-width:0;flex:1}.license-account-banner strong{font-size:15px}.license-account-banner small{color:var(--muted);line-height:1.7}.license-account-icon{width:48px;height:48px;display:grid;place-items:center;flex:0 0 48px;border-radius:15px;background:#e2e8f0;color:#475569;font-size:20px}.license-account-banner.compact .license-account-icon{width:42px;height:42px;flex-basis:42px;border-radius:13px}.license-account-banner.monthly .license-account-icon{background:#dbeafe;color:#1d4ed8}.license-account-banner.quarterly .license-account-icon{background:#ede9fe;color:#6d28d9}.license-account-banner.lifetime .license-account-icon{background:#fef3c7;color:#b45309}.license-account-banner.free .license-account-icon{background:#dcfce7;color:#15803d}.license-account-banner.is-locked{border-color:#fecaca;background:linear-gradient(135deg,#fff,#fff1f2)}.license-account-banner.is-locked .license-account-icon{background:#fee2e2;color:#dc2626}.license-account-banner .button{flex:0 0 auto}
@media(max-width:700px){.license-account-banner{align-items:flex-start;flex-wrap:wrap}.license-account-banner .button{width:100%}.license-apply-switch>span{grid-template-columns:38px 1fr;padding:12px}.license-apply-switch>span>i{width:38px;height:38px}}
.license-economy-summary article strong{display:flex;align-items:center;gap:8px}.license-economy-summary article strong b{min-width:24px;height:24px;display:inline-grid;place-items:center;padding:0 7px;border-radius:999px;background:rgba(100,116,139,.12);font-size:12px;color:inherit}

/* DocMaker v8.8.4 — live responsive panels and low-cost adaptive tables */
:where(.app-main,.admin-main,.page-content,.admin-content,.panel-card,.modal-dialog,.section-head,.topbar,.admin-topbar,.topbar-actions,.admin-top-actions,.form-grid,.dashboard-grid,.admin-dashboard-grid,.profile-layout,.ticket-detail-layout,.roles-layout,.settings-layout) > *{min-width:0}
:where(.page-content,.admin-content){overflow-wrap:anywhere}
:where(.panel-card,.management-section,.document-card,.stat-card){max-width:100%}
:where(.responsive-table-shell,.responsive-table,.table-wrap,.admin-table-wrap){max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
.responsive-data-table{width:100%;max-width:100%;border-collapse:collapse}
.responsive-data-table :is(th,td){overflow-wrap:anywhere;word-break:normal}

/* Long lists are painted only when they approach the viewport. This reduces initial
   admin/dashboard work without adding scroll listeners or JavaScript polling. */
@supports (content-visibility:auto){
  :where(.documents-grid>.document-card,.ticket-list>a,.full-activity-list>.full-activity-item,.company-member-list>div,.pending-invites>div){
    content-visibility:auto;
    contain-intrinsic-size:80px 320px;
  }
}

@media(max-width:1180px){
  .admin-sidebar{height:100dvh;overflow-y:auto;overscroll-behavior:contain}
  .admin-main{width:100%;min-width:0}
  .admin-topbar{flex-wrap:wrap;align-items:center;padding:10px 14px}
  .admin-topbar>div:first-of-type{flex:1 1 220px}
  .admin-top-actions{flex:1 1 auto;min-width:0;justify-content:flex-end;flex-wrap:wrap}
  .admin-content{width:100%;max-width:none;padding:16px}
  .page-content{min-width:0}
  :where(.dashboard-grid,.admin-dashboard-grid,.profile-layout,.profile-editor-grid,.ticket-detail-layout,.roles-layout,.settings-layout,.create-document-layout){grid-template-columns:minmax(0,1fr)!important}
  :where(.stats-grid,.metric-grid,.documents-grid,.documents-grid-rich,.company-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  :where(.member-invite-form,.activity-search){grid-template-columns:minmax(0,1fr) auto!important}
  .member-invite-form>.role-choice-grid{grid-column:1/-1}
}

@media(max-width:900px){
  html,body{max-width:100%;overflow-x:clip}
  .topbar-stack,.admin-topbar{backdrop-filter:none!important}
  .topbar{flex-wrap:wrap;gap:9px;padding:9px 11px}
  .topbar-heading{flex:1 1 calc(100% - 54px);min-width:0}
  .topbar-actions{width:100%;min-width:0;justify-content:space-between;gap:7px}
  .topbar-primary-actions{min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin}
  .topbar-utility-actions{flex:0 0 auto}
  .topbar-secondary{position:relative!important;flex-wrap:wrap;gap:7px;padding-inline:11px}
  .topbar-secondary-copy{flex:1 1 220px;min-width:0;overflow-x:auto}
  .topbar-secondary-actions{max-width:100%;margin-inline-start:auto;overflow-x:auto}
  .page-content,.admin-content{padding:12px!important}
  .section-head{align-items:flex-start;flex-wrap:wrap;padding:14px}
  .section-head>:last-child{max-width:100%}
  :where(.form-grid.two,.form-grid.three,.profile-form-grid,.user-management-grid,.license-economy-summary){grid-template-columns:minmax(0,1fr)!important}
  :where(.form-grid .span-2,.management-section.span-2){grid-column:auto!important}
  .modal{padding:0;align-items:end;backdrop-filter:none}
  .modal-dialog,.modal-dialog.modal-sm,.modal-xl{width:100%!important;max-width:none!important;max-height:min(94dvh,var(--live-viewport-height,94dvh));border-radius:20px 20px 0 0}
  .modal-head{position:sticky;top:0;z-index:8;background:var(--surface);padding:13px 14px}
  .modal-body{padding:14px}
  .user-management-dialog{height:min(94dvh,var(--live-viewport-height,94dvh));max-height:none!important}
  .user-management-dialog .modal-body{max-height:none!important;min-height:0;overflow:auto}
  .modal-sticky-actions{margin:14px -14px -14px;padding:11px 14px;backdrop-filter:none}
  .inline-invite{grid-template-columns:1fr}
  .permission-checks{grid-column:auto}
  .collaborator-list>div{grid-template-columns:35px minmax(0,1fr) auto}
  .collaborator-list>div>.button{grid-column:1/-1;width:100%}
  .full-activity-item{grid-template-columns:42px minmax(0,1fr) auto}
  .full-activity-item>*:nth-child(3){grid-column:2/-1}
  :where(.profile-hero,.invitation-card,.license-account-banner){max-width:100%}
}

@media(max-width:760px){
  :where(.stats-grid,.metric-grid,.documents-grid,.documents-grid-rich,.company-grid,.license-economy-summary){grid-template-columns:minmax(0,1fr)!important}
  .admin-topbar{align-items:center;gap:8px;padding:9px 10px}
  .admin-topbar>div:first-of-type{flex:1 1 calc(100% - 52px)}
  .admin-top-actions{width:100%;justify-content:space-between;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-inline:contain;padding-bottom:2px}
  .admin-top-actions .language-menu{display:block!important}
  .admin-user{flex:0 0 auto}
  .admin-content{padding:10px!important}
  .admin-dashboard-grid>.span-2{grid-column:auto!important}
  .activity-chart,.admin-activity-chart{max-width:100%;overflow-x:auto;grid-template-columns:repeat(14,30px)}
  :where(.member-invite-form,.activity-search){grid-template-columns:minmax(0,1fr)!important}
  .activity-search>*{min-width:0}
  .activity-search .button,.member-invite-form>.button{width:100%}
  .role-choice-grid{display:grid;grid-template-columns:minmax(0,1fr)}
  .role-choice{width:100%}

  /* Table-to-card transformation. app.js adds data-label from TH once; changing the
     resolution only changes CSS and therefore never needs a reload. */
  .responsive-table-shell{overflow:visible!important}
  table.responsive-data-table{display:block;min-width:0!important;border:0!important;background:transparent!important}
  table.responsive-data-table>thead{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
  table.responsive-data-table>tbody{display:grid;gap:10px;width:100%}
  table.responsive-data-table>tbody>tr{display:grid;width:100%;overflow:hidden;border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:var(--shadow-sm)}
  table.responsive-data-table>tbody>tr[hidden]{display:none!important}
  table.responsive-data-table>tbody>tr>td{width:100%!important;min-width:0!important;display:grid!important;grid-template-columns:minmax(92px,34%) minmax(0,1fr);align-items:center;gap:10px;padding:10px 12px!important;border:0!important;border-bottom:1px solid var(--border)!important;text-align:start!important;white-space:normal!important;background:transparent!important}
  table.responsive-data-table>tbody>tr>td:last-child{border-bottom:0!important}
  table.responsive-data-table>tbody>tr>td::before{content:attr(data-label);color:var(--muted);font-size:10px;font-weight:800;line-height:1.5}
  table.responsive-data-table>tbody>tr>td:empty::after{content:"—";color:var(--muted)}
  table.responsive-data-table>tbody>tr>td :where(.button,button,select,input){max-width:100%}
  table.responsive-data-table>tbody>tr>td:last-child :where(.button,button){width:100%}
  table.responsive-data-table .table-user{min-width:0}
  .responsive-table table{min-width:0!important}

  .system-role-picker,.license-plan-picker,.compact-role-picker,.ban-control-grid{grid-template-columns:minmax(0,1fr)!important}
  .management-section{padding:13px}
  .license-plan-option{grid-template-columns:38px minmax(0,1fr) 18px}
  .modal-sticky-actions{display:grid;grid-template-columns:1fr 1fr}
  .modal-sticky-actions .button{width:100%}
  .ticket-list>a,.document-mini-list>a{grid-template-columns:40px minmax(0,1fr) auto}
  .ticket-list>a>*:nth-child(n+4),.document-mini-list>a>*:nth-child(n+4){display:none}
}

@media(max-width:520px){
  .page-content,.admin-content{padding:8px!important}
  .panel-card{border-radius:13px}
  .topbar-primary-actions .button{min-width:42px;padding-inline:10px}
  .topbar-primary-actions .button span,.desktop-label{display:none!important}
  .user-menu-copy,.admin-user>span:last-child{display:none!important}
  .user-menu-trigger{min-width:44px;padding:3px}
  .section-head{padding:12px}
  .section-head>.button,.section-head>form,.section-head>form>.button{width:100%}
  .modal-sticky-actions{grid-template-columns:1fr}
  .collaborator-list>div{grid-template-columns:34px minmax(0,1fr)}
  .collaborator-list>div>:nth-child(n+3){grid-column:1/-1}
  table.responsive-data-table>tbody>tr>td{grid-template-columns:minmax(78px,31%) minmax(0,1fr);padding:9px 10px!important;gap:8px}
  .toast-region{inset-inline:8px;width:calc(100vw - 16px)}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* DocMaker v8.8.5 — per-preset header designer. */
.header-designer-section .control-section-head{align-items:flex-start;gap:14px}
.header-designer-section .control-section-head .help-text{margin:.35rem 0 0}
.header-control-group{margin-top:14px;padding:14px;border:1px solid var(--border,#dce3ec);border-radius:14px;background:color-mix(in srgb,var(--surface,#fff) 94%,var(--primary,#2563eb) 6%)}
.header-control-group-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;font-weight:800}
.header-control-group-title>span{display:inline-flex;align-items:center;gap:8px}
.header-control-group .field{transition:opacity .18s ease,filter .18s ease}
.header-control-group .field.is-control-disabled{opacity:.46;filter:grayscale(.45)}
.header-designer-section.is-header-disabled>:not(.control-section-head){opacity:.55}
.header-designer-section.is-header-disabled .header-choice-grid,
.header-designer-section.is-header-disabled .header-control-group,
.header-designer-section.is-header-disabled .header-fields,
.header-designer-section.is-header-disabled .artwork-color-controls,
.header-designer-section.is-header-disabled .logo-picker{pointer-events:none}
@media (max-width:720px){
  .header-control-group{padding:12px}
  .header-control-group-title{align-items:flex-start;flex-direction:column}
  .header-control-group-title .button{width:100%;justify-content:center}
}

/* v8.8.8 document thumbnail generation */
.document-card-preview.is-generating-preview .preview-placeholder { opacity:.9; }
.document-card-preview .preview-placeholder { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; width:100%; height:100%; }
.document-card-preview .preview-placeholder small { color:inherit; opacity:.72; font-size:11px; }


/* v8.9.0 document thumbnails: same visual language as landing sample-image */
.documents-grid-rich{grid-template-columns:repeat(auto-fill,minmax(360px,1fr))}
.document-card.rich{overflow:hidden}
.document-card.rich .document-card-preview.sample-image{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:495px;overflow:hidden;background:linear-gradient(180deg,#eef3f8,#f8fafc);padding:0}
.document-card-preview.sample-image img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:top center;background:#fff;display:block}
.document-card-preview.sample-image .preview-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:linear-gradient(145deg,var(--primary-soft),#fff);color:var(--primary);font-size:44px;text-align:center;padding:16px}
.document-card-preview.sample-image .preview-placeholder small{font-size:12px;opacity:.76}
.document-card-preview.sample-image .sample-badge{position:absolute;top:15px;inset-inline-end:15px;z-index:2;background:#2657a4;color:#fff;padding:5px 12px;border-radius:20px;font-size:.8rem;font-weight:600;box-shadow:0 3px 10px rgba(38,87,164,.3)}
.document-card-preview.sample-image .sample-open{position:absolute;inset:auto 14px 14px 14px;z-index:2;min-height:42px;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:14px;color:#fff;background:rgba(20,39,67,.86);backdrop-filter:blur(6px);opacity:0;transform:translateY(6px);transition:.2s}
.document-card-preview.sample-image:hover .sample-open{opacity:1;transform:none}
.document-card-preview.sample-image.is-generating-preview .preview-placeholder{background:linear-gradient(145deg,#edf4ff,#fff);opacity:1}
.document-card-preview.sample-image.is-generating-preview .preview-placeholder i{animation:spin 1s linear infinite}
.document-card-preview.sample-image.is-missing-preview .sample-open{opacity:1;transform:none}
@media(max-width:560px){.document-card.rich .document-card-preview.sample-image{height:390px}.document-card-preview.sample-image .sample-open{opacity:1;transform:none}}

/* v8.9.2 on-demand lightweight document previews */
.document-card-preview.sample-image.is-missing-preview{cursor:pointer}
.document-card-preview.sample-image.is-generating-preview{pointer-events:none;cursor:progress}
.document-card-preview.sample-image.is-generating-preview .sample-open{opacity:1;transform:none}
.document-card-preview.sample-image [data-preview-image]{aspect-ratio:210/297}

/* v8.9.4 — textual placeholder for not-yet-generated first-page thumbnails. */
.document-card-preview.sample-image .preview-placeholder i{position:static;inset:auto;font-size:34px;color:inherit}
.document-card-preview.sample-image .preview-placeholder strong{font-size:14px;line-height:1.5}
.document-card-preview.sample-image .preview-placeholder small{max-width:260px;line-height:1.75;font-size:11px}
.document-card-preview.sample-image.has-ready-preview .preview-placeholder{display:none}

/* 8.9.8 — Persian typography uses Vazirmatn stylistic set 01 only for fa. */
html[lang="fa"] body,
html[lang="fa"] input,
html[lang="fa"] textarea,
html[lang="fa"] select,
html[lang="fa"] button {
  font-feature-settings: "ss01" 1;
  -webkit-font-feature-settings: "ss01" 1;
}


/* DocMaker 8.9.9 — deterministic mobile editor, anchored dropdowns and help center. */
.language-menu,.user-menu{position:relative}
.topbar-utility-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto;overflow:visible}
.dropdown-menu.dropdown-menu-anchored{
  position:fixed!important;right:auto!important;bottom:auto!important;inset-inline-start:auto!important;inset-inline-end:auto!important;z-index:5000!important;
  margin:0!important;max-height:min(70dvh,560px)!important;overflow:auto!important;
}
.preview-scale-frame{position:relative;flex:0 0 auto;margin-inline:auto;direction:ltr}
.preview-scale-frame>.preview-document{position:absolute!important;top:0!important;left:0!important;right:auto!important;margin:0!important;transform-origin:top left!important}

.help-trigger{color:var(--primary);background:var(--primary-soft)}
.help-dialog{max-width:860px}
.help-quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.help-step-card{display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;padding:14px;border:1px solid var(--border);border-radius:15px;background:var(--surface-soft)}
.help-step-card>b{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;color:#fff;background:var(--primary);font-size:16px!important}
.help-step-card h3{margin:0 0 6px;font-size:15px}.help-step-card p{margin:0;color:var(--muted);line-height:1.9}
.help-center-link{grid-column:1/-1;justify-self:start}
.help-center{display:grid;gap:18px;max-width:1180px;margin:0 auto}
.help-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,390px);align-items:center;gap:20px;padding:24px}
.help-hero h2{margin:5px 0 8px;font-size:clamp(22px,3vw,34px)}.help-hero p{margin:0;color:var(--muted);line-height:1.9}
.help-search{min-height:54px;display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:9px;padding:0 14px;border:1px solid var(--border);border-radius:15px;background:var(--surface)}
.help-search input{width:100%;border:0;outline:0;background:transparent;font-size:14px}
.help-anchor-nav{display:flex;flex-wrap:wrap;gap:8px;padding:4px}.help-anchor-nav a{padding:9px 13px;border:1px solid var(--border);border-radius:999px;background:var(--surface);font-weight:750}
.help-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.help-section{padding:20px;scroll-margin-top:120px}.help-section>header{display:flex;align-items:center;gap:13px;margin-bottom:14px}.help-section>header>i{width:46px;height:46px;display:grid;place-items:center;border-radius:14px;color:var(--primary);background:var(--primary-soft);font-size:20px!important}.help-section h2{margin:0 0 3px;font-size:18px}.help-section header p{margin:0;color:var(--muted)}
.guide-steps{display:grid;gap:10px;margin:0;padding-inline-start:22px;line-height:1.95}.guide-steps li::marker{color:var(--primary);font-weight:900}.help-empty{text-align:center;padding:50px 20px;color:var(--muted)}
.sidebar-help{display:grid;grid-template-columns:34px minmax(0,1fr);gap:8px}.sidebar-help>.button{grid-column:1/-1;width:100%}

@media(max-width:900px){
  .editor-page .topbar{
    display:grid!important;grid-template-columns:48px minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;align-items:center!important;gap:8px!important;
  }
  .editor-page .topbar>.mobile-only{grid-column:1!important;grid-row:1!important}
  .editor-page .topbar-heading{grid-column:2!important;grid-row:1!important;min-width:0!important}
  .editor-page .topbar-utility-actions{
    grid-column:3!important;grid-row:1!important;position:relative!important;z-index:260!important;
    display:flex!important;align-items:center!important;gap:5px!important;padding:0!important;min-width:max-content!important;
  }
  .editor-page .topbar-utility-actions>.icon-button,
  .editor-page .topbar-utility-actions .language-trigger,
  .editor-page .topbar-utility-actions .user-menu-trigger{width:42px!important;min-width:42px!important;height:42px!important;min-height:42px!important;padding:2px!important}
  .editor-page .topbar-actions{
    grid-column:1/-1!important;grid-row:2!important;width:100%!important;display:block!important;
    min-width:0!important;overflow:visible!important;padding:0!important;
  }
  .editor-page .topbar-primary-actions{
    width:100%!important;display:flex!important;align-items:center!important;gap:7px!important;
    overflow-x:auto!important;overflow-y:hidden!important;padding:2px 0 5px!important;scrollbar-width:thin;
  }
  .editor-page .topbar-primary-actions .button{flex:0 0 auto!important}
  .editor-page .preview-stage{
    display:flex!important;justify-content:center!important;align-items:flex-start!important;
    direction:ltr!important;overflow:auto!important;padding:12px 8px 42px!important;
  }
  .editor-page .preview-scale-frame{margin:0 auto!important;align-self:flex-start!important}
  .editor-page .preview-scale-frame>.preview-document,
  .editor-page .preview-scale-frame>.preview-document[dir="rtl"],
  .editor-page .preview-scale-frame>.preview-document[dir="ltr"]{
    position:absolute!important;top:0!important;left:0!important;right:auto!important;
    width:794px!important;min-width:794px!important;max-width:none!important;margin:0!important;
    transform-origin:top left!important;
  }
  .help-quick-grid,.help-sections{grid-template-columns:1fr}.help-hero{grid-template-columns:1fr}
}
@media(max-width:560px){
  .editor-page .topbar{grid-template-columns:44px minmax(58px,1fr) auto!important;padding:8px!important}
  .editor-page .topbar-heading h1{font-size:12px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .editor-page .topbar-utility-actions{gap:3px!important}
  .editor-page .topbar-utility-actions>.icon-button,
  .editor-page .topbar-utility-actions .language-trigger,
  .editor-page .topbar-utility-actions .user-menu-trigger{width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important;border-radius:11px!important}
  .editor-page .topbar-primary-actions .button{width:auto!important;min-width:max-content!important;height:42px!important;padding:0 11px!important}
  .editor-page .topbar-primary-actions .button span{display:inline!important}
  .help-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
  .help-quick-grid{padding:10px}.help-step-card{grid-template-columns:36px minmax(0,1fr);padding:11px}.help-step-card>b{width:36px;height:36px}
  .help-hero,.help-section{padding:16px}.help-anchor-nav{overflow-x:auto;flex-wrap:nowrap}.help-anchor-nav a{flex:0 0 auto}
}

/* 8.9.10 — contextual guided tours */
.tour-help-button{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border:1px solid color-mix(in srgb,var(--primary) 28%,var(--border));border-radius:11px;color:var(--primary);background:var(--primary-soft);font-weight:850;white-space:nowrap;cursor:pointer;transition:.18s ease}
.tour-help-button:hover{transform:translateY(-1px);border-color:var(--primary);box-shadow:0 8px 22px color-mix(in srgb,var(--primary) 16%,transparent)}
.tour-help-button i{font-size:14px!important}.tour-help-button span{font-size:12px}
.guided-help-modal{z-index:5200}.guided-help-modal .help-dialog{width:min(760px,100%);overflow:hidden}.guided-help-head{align-items:center;background:linear-gradient(135deg,var(--primary-soft),var(--surface))}.guided-help-kicker{display:inline-flex;align-items:center;gap:7px;margin-bottom:7px;color:var(--primary);font-size:11px;font-weight:900}.guided-help-head h2{font-size:21px}.guided-help-head p{font-size:12px;line-height:1.8}.guided-help-body{display:grid;gap:16px;max-height:min(68dvh,680px);overflow:auto}.guided-help-question-list{display:grid;gap:10px}.guided-help-question{width:100%;display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px;border:1px solid var(--border);border-radius:15px;color:var(--text);background:var(--surface);text-align:start;cursor:pointer;transition:.18s ease}.guided-help-question:hover{border-color:var(--primary);background:var(--primary-soft);transform:translateY(-1px);box-shadow:0 10px 30px rgba(15,23,42,.08)}.guided-help-question-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;color:var(--primary);background:var(--primary-soft);font-size:19px}.guided-help-question-copy{min-width:0;display:flex;flex-direction:column;gap:4px}.guided-help-question-copy strong{font-size:14px}.guided-help-question-copy small{color:var(--muted);font-size:11px;line-height:1.7}.guided-help-question-state{display:flex;align-items:center;gap:7px;color:var(--primary);font-size:10px;white-space:nowrap}.guided-help-question-state b{font-size:10px}.guided-help-question.is-complete .guided-help-question-state{color:var(--success)}.guided-help-question.is-complete .guided-help-question-icon{color:var(--success);background:var(--success-soft)}.guided-help-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-top:14px;border-top:1px solid var(--border)}.guided-help-footer p{display:flex;align-items:flex-start;gap:8px;margin:0;color:var(--muted);font-size:10px;line-height:1.8}.guided-help-loading{min-height:160px;display:flex;align-items:center;justify-content:center;gap:9px;color:var(--muted)}
.guided-tour-root{position:fixed;inset:0;z-index:10000;direction:rtl}.guided-tour-root[hidden]{display:none!important}.guided-tour-shade{position:fixed;z-index:1;background:rgba(8,15,29,.72);backdrop-filter:grayscale(.35) brightness(.75);pointer-events:auto}.guided-tour-highlight{position:fixed;z-index:2;border:3px solid #fff;border-radius:14px;box-shadow:0 0 0 4px var(--primary),0 0 0 8px rgba(255,255,255,.2),0 18px 55px rgba(0,0,0,.36);pointer-events:none;transition:left .18s ease,top .18s ease,width .18s ease,height .18s ease}.guided-tour-popover{position:fixed;z-index:3;width:min(420px,calc(100vw - 20px));padding:17px;border:1px solid rgba(255,255,255,.24);border-radius:18px;color:var(--text);background:var(--surface);box-shadow:0 24px 80px rgba(0,0,0,.38);transition:left .18s ease,top .18s ease}.guided-tour-popover.is-centered{width:min(440px,calc(100vw - 20px))}.guided-tour-popover-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.guided-tour-progress{display:inline-flex;padding:5px 9px;border-radius:999px;color:var(--primary);background:var(--primary-soft);font-size:10px;font-weight:900}.guided-tour-close{width:34px;height:34px;display:grid;place-items:center;border:0;border-radius:10px;color:var(--muted);background:var(--surface-soft);cursor:pointer}.guided-tour-popover h3{margin:0 0 7px;font-size:18px}.guided-tour-popover p{margin:0;color:var(--muted);font-size:13px;line-height:1.95}.guided-tour-actions{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-top:17px}.guided-tour-actions .button{min-height:42px}.guided-tour-actions [data-tour-prev]:disabled{opacity:.35;pointer-events:none}.guided-tour-active{scroll-behavior:smooth}
/* Reserve an explicit label lane so Jalali dates never leave the analytics card. */
.activity-chart{height:264px;min-height:264px;align-items:stretch;padding:14px 8px 8px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-inline:contain}
.chart-column{height:100%;min-width:0;display:grid;grid-template-rows:minmax(0,1fr) 58px;align-items:stretch;justify-items:center;gap:5px;overflow:hidden}
.chart-bars{width:100%;height:auto;min-height:0;align-self:stretch}
.chart-column small{width:100%;height:58px;min-height:58px;display:flex;align-items:center;justify-content:flex-start;overflow:hidden;white-space:nowrap;writing-mode:vertical-rl;transform:rotate(180deg);line-height:1;font-size:8px}
.analytics-card{overflow:hidden}
@media(max-width:760px){.activity-chart{height:250px;min-height:250px;grid-template-columns:repeat(14,34px)!important;padding-inline:6px}.chart-column{grid-template-rows:minmax(0,1fr) 56px}.chart-column small{height:56px;min-height:56px}.guided-help-footer{align-items:stretch;flex-direction:column}.guided-help-footer .button{width:100%}.guided-help-question{grid-template-columns:42px minmax(0,1fr)}.guided-help-question-icon{width:42px;height:42px}.guided-help-question-state{grid-column:2;justify-content:flex-start}.guided-tour-popover{max-height:calc(100dvh - 20px);overflow:auto}.tour-help-button{min-width:64px;padding:0 8px}.tour-help-button i{display:none}.tour-help-button span{font-size:11px}}
@media(max-width:380px){.tour-help-button{min-width:58px;padding-inline:6px}.tour-help-button span{font-size:10px}.guided-help-body{padding:11px}.guided-help-question{padding:10px;gap:9px}.guided-help-question-copy strong{font-size:12px}.guided-help-question-copy small{font-size:10px}}

/* 8.9.11 — unified brand shell, separated command bar and smart pagination */
:root{--brand-gradient:linear-gradient(180deg,var(--sidebar) 0%,#2657a4 58%,#236f69 100%);--brand-gradient-horizontal:linear-gradient(110deg,var(--sidebar) 0%,#2657a4 58%,#236f69 100%)}
.brand-home-link{min-width:0;display:flex;align-items:center;gap:11px;color:#fff;text-decoration:none}
.brand-home-link>span:last-child{min-width:0;display:flex;flex-direction:column;line-height:1.35}
.brand-home-link:hover .brand-mark{transform:translateY(-1px);box-shadow:0 12px 28px rgba(8,25,52,.34)}
.brand-mark{transition:.18s ease}

.topbar{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;overflow:visible!important}
.topbar>.mobile-only{grid-column:1}.topbar-heading{grid-column:2;margin-inline-end:0!important}.topbar-utility-actions{grid-column:3;position:relative;z-index:360}
.topbar-commandbar{position:relative;z-index:210;display:flex;align-items:center;justify-content:flex-end;min-height:54px;padding:6px clamp(16px,2.5vw,34px);border-bottom:1px solid var(--border);background:linear-gradient(90deg,color-mix(in srgb,var(--surface) 97%,#2657a4 3%),color-mix(in srgb,var(--surface) 97%,#236f69 3%));overflow:visible}
.topbar-commandbar:not(:has(.topbar-primary-actions>*)){display:none}
.topbar-commandbar .topbar-primary-actions{width:100%;display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.topbar-commandbar .topbar-primary-actions>.button{flex:0 0 auto}
.topbar-secondary:not(:has(.topbar-secondary-copy>*)):not(:has(.topbar-secondary-actions>*)){display:none}
.editor-page .topbar-secondary-copy .editor-template-meta{font-size:10px}
.editor-page .topbar-stack{position:sticky!important;top:0!important;z-index:230!important}
.editor-page .topbar-commandbar{min-height:56px}
.editor-page .topbar-secondary{min-height:42px}

/* The control is intentionally AI-like but does not claim to call an AI service. */
.ai-pagination-button{position:relative!important;isolation:isolate;min-height:54px!important;min-width:218px;display:grid!important;grid-template-columns:42px minmax(0,1fr) 18px;align-items:center;gap:10px;padding:6px 11px!important;border:1px solid rgba(91,136,201,.55)!important;border-radius:16px!important;color:#fff!important;background:linear-gradient(125deg,#173b69 0%,#2657a4 45%,#236f69 100%)!important;box-shadow:0 12px 28px rgba(31,78,135,.22),inset 0 1px rgba(255,255,255,.18)!important;text-align:start;cursor:pointer;overflow:hidden;transition:.2s ease}
.ai-pagination-button::before{content:"";position:absolute;inset:-70% -20%;z-index:-1;background:conic-gradient(from 180deg,transparent,rgba(255,255,255,.22),transparent 34%);animation:aiButtonGlow 5s linear infinite}
.ai-pagination-button:hover{transform:translateY(-2px);box-shadow:0 16px 38px rgba(31,78,135,.32),inset 0 1px rgba(255,255,255,.2)!important}
.ai-pagination-button:active{transform:translateY(0)}
.ai-gemini-mark{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:radial-gradient(circle at 30% 20%,#fff 0 7%,#7dd3fc 18%,#818cf8 47%,#34d399 76%,rgba(255,255,255,.18) 100%);box-shadow:inset 0 0 0 1px rgba(255,255,255,.52),0 8px 18px rgba(15,23,42,.22)}
.ai-gemini-mark i{font-size:18px!important;color:#fff;filter:drop-shadow(0 2px 4px rgba(23,59,105,.45))}
.ai-pagination-copy{min-width:0;display:flex;flex-direction:column;line-height:1.35}.ai-pagination-copy strong{font-size:12px;font-weight:950}.ai-pagination-copy small{color:#dbeafe;font-size:8.5px;font-weight:700;white-space:normal}
.ai-pagination-arrow{font-size:10px;opacity:.8}.ai-pagination-button.needs-pagination::after{top:6px!important;inset-inline-end:6px!important;background:#fbbf24!important}
.ai-pagination-button[data-paginating="true"] .ai-gemini-mark i{animation:spin 1s linear infinite}
@keyframes aiButtonGlow{to{transform:rotate(360deg)}}

.translation-is-busy{opacity:.52!important;cursor:not-allowed!important;filter:grayscale(.25)}
.translation-job-active [data-open-modal="translate-modal"]{position:relative}
.translation-job-active [data-open-modal="translate-modal"]::after{content:"";width:7px;height:7px;border-radius:50%;background:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.18)}

/* A restrained trace of the sidebar identity across the whole authenticated UI. */
.panel-card,.stat-card,.document-card.rich,.profile-section-card{position:relative}
.panel-card::before,.stat-card::before,.document-card.rich::before,.profile-section-card::before{content:"";position:absolute;z-index:1;inset-inline:16px;top:-1px;height:2px;border-radius:999px;background:linear-gradient(90deg,transparent,#2657a4,#236f69,transparent);opacity:.62;pointer-events:none}
.page-content::before{content:"";position:fixed;z-index:-1;inset:0;background:radial-gradient(circle at 12% 0%,rgba(38,87,164,.07),transparent 30%),radial-gradient(circle at 88% 100%,rgba(35,111,105,.07),transparent 30%);pointer-events:none}

@media(max-width:900px){
  .topbar{grid-template-columns:44px minmax(0,1fr) auto!important;grid-template-rows:1fr!important;gap:7px!important;padding:8px 10px!important;min-height:60px!important}
  .topbar>.mobile-only{grid-column:1!important;grid-row:1!important}.topbar-heading{grid-column:2!important;grid-row:1!important}.topbar-utility-actions{grid-column:3!important;grid-row:1!important;gap:4px!important;min-width:0!important}
  .topbar-commandbar{min-height:54px;padding:5px 9px;justify-content:flex-start;overflow:hidden}
  .topbar-commandbar .topbar-primary-actions{justify-content:flex-start;overflow-x:auto!important;padding-bottom:2px;scrollbar-width:none}
  .topbar-commandbar .topbar-primary-actions .button{min-height:42px!important;width:auto!important;min-width:max-content!important;padding:0 11px!important}
  .topbar-commandbar .topbar-primary-actions .button span{display:inline!important}
  .editor-page .topbar-actions{display:none!important}
  .editor-page .topbar-secondary{grid-template-columns:minmax(0,1fr) auto!important}
  .editor-page .topbar-secondary-copy{display:flex!important;overflow:hidden!important}
  .ai-pagination-button{width:100%;min-width:0!important;grid-template-columns:42px minmax(0,1fr) 18px!important}
}
@media(max-width:560px){
  .topbar{grid-template-columns:40px minmax(42px,1fr) auto!important;padding:7px!important}
  .topbar-utility-actions{gap:2px!important}.topbar-utility-actions>.icon-button,.topbar-utility-actions .language-trigger,.topbar-utility-actions .user-menu-trigger{width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important}
  .tour-help-button{min-width:58px!important;height:36px!important;min-height:36px!important;padding:0 7px!important}.tour-help-button i{display:none!important}.tour-help-button span{display:inline!important;font-size:10px!important}
  .topbar-heading h1{font-size:11px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .topbar-commandbar .topbar-primary-actions .button{height:40px!important;min-height:40px!important;font-size:10px!important;padding-inline:10px!important}
  .editor-page .topbar-secondary-copy{display:none!important}.editor-page .topbar-secondary{grid-template-columns:1fr!important}
  .ai-pagination-copy strong{font-size:11px}.ai-pagination-copy small{font-size:8px}
}

/* DocMaker v8.9.12 — stable first paint and blue/green document library identity. */
@font-face{font-family:"DocMaker UI";src:url("/static/fonts/Vazirmatn/Vazirmatn-Regular.ttf") format("truetype");font-style:normal;font-weight:100 599;font-display:optional}
@font-face{font-family:"DocMaker UI";src:url("/static/fonts/Vazirmatn/Vazirmatn-Bold.ttf") format("truetype");font-style:normal;font-weight:600 900;font-display:optional}
:root{--ui-font-fa:"DocMaker UI","Vazirmatn",Tahoma,sans-serif}
.documents-page{background:
  radial-gradient(circle at 8% 8%,rgba(38,87,164,.11),transparent 28%),
  radial-gradient(circle at 92% 34%,rgba(35,111,105,.10),transparent 30%),
  linear-gradient(180deg,#f2f7fb 0%,#f3f8f6 54%,#eef7f4 100%)}
.documents-page .topbar-stack{background:linear-gradient(180deg,rgba(23,59,105,.045),rgba(35,111,105,.025))}
.documents-page .topbar{border-top:3px solid transparent;border-image:linear-gradient(90deg,var(--sidebar),#2657a4,#236f69) 1}
.documents-page .page-content{position:relative}
.documents-brand-hero{position:relative;isolation:isolate;min-height:190px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:28px;margin-bottom:18px;padding:clamp(24px,4vw,42px);overflow:hidden;border:1px solid rgba(255,255,255,.28);border-radius:26px;color:#fff;background:linear-gradient(180deg,var(--sidebar) 0%,#2657a4 58%,#236f69 100%);box-shadow:0 22px 54px rgba(23,59,105,.22)}
.documents-brand-hero::before,.documents-brand-hero::after{content:"";position:absolute;z-index:-1;border-radius:50%;pointer-events:none}.documents-brand-hero::before{width:320px;height:320px;inset:-190px auto auto -70px;background:rgba(255,255,255,.11)}.documents-brand-hero::after{width:240px;height:240px;inset:auto -80px -150px auto;background:rgba(90,211,177,.18)}
.documents-brand-hero-copy{max-width:760px}.documents-brand-kicker{display:inline-flex;align-items:center;gap:8px;margin-bottom:8px;padding:5px 10px;border:1px solid rgba(255,255,255,.22);border-radius:999px;background:rgba(255,255,255,.10);font-size:11px;font-weight:850}.documents-brand-hero h2{margin:0;font-size:clamp(22px,3vw,36px);line-height:1.45;letter-spacing:-.6px}.documents-brand-hero p{max-width:720px;margin:8px 0 0;color:rgba(255,255,255,.82);font-size:13px}
.documents-brand-hero-stats{display:grid;grid-template-columns:repeat(3,minmax(92px,1fr));gap:10px}.documents-brand-hero-stats>span,.documents-brand-hero-stats>a{min-width:96px;min-height:92px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:12px;border:1px solid rgba(255,255,255,.18);border-radius:18px;background:rgba(255,255,255,.10);backdrop-filter:blur(10px);text-align:center}.documents-brand-hero-stats strong{font-size:22px;line-height:1}.documents-brand-hero-stats b{font-size:12px}.documents-brand-hero-stats small{color:rgba(255,255,255,.76);font-size:9px}.documents-brand-hero-stats i{font-size:20px;color:#a8f0db}
.documents-page .license-account-banner,.documents-page .document-toolbar,.documents-page .document-card.rich,.documents-page .empty-state{border-color:color-mix(in srgb,#2657a4 14%,var(--border));box-shadow:0 14px 34px rgba(23,59,105,.07)}
.documents-page .document-toolbar{position:relative;overflow:hidden}.documents-page .document-toolbar::before{content:"";position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,var(--sidebar),#2657a4,#236f69)}
.documents-page .document-card.rich{transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}.documents-page .document-card.rich:hover{transform:translateY(-4px);border-color:rgba(38,87,164,.34);box-shadow:0 20px 44px rgba(23,59,105,.14)}
.documents-page .type-chip{color:#1f5d82;background:linear-gradient(135deg,rgba(38,87,164,.10),rgba(35,111,105,.10))}
.documents-page .documents-pagination{padding:12px;border:1px solid rgba(38,87,164,.12);border-radius:16px;background:rgba(255,255,255,.82);box-shadow:0 10px 26px rgba(23,59,105,.06);backdrop-filter:blur(12px)}
@media(max-width:980px){.documents-brand-hero{grid-template-columns:1fr}.documents-brand-hero-stats{max-width:420px}}
@media(max-width:620px){.documents-brand-hero{min-height:0;padding:22px 18px;border-radius:20px}.documents-brand-hero h2{font-size:22px}.documents-brand-hero-stats{grid-template-columns:repeat(3,1fr);width:100%}.documents-brand-hero-stats>span,.documents-brand-hero-stats>a{min-width:0;min-height:78px;padding:8px}.documents-brand-hero-stats strong{font-size:18px}}

/* DocMaker 8.9.14 — developer access remains a quiet sidebar link. */
.sidebar-developer-link {
  width: max-content;
  max-width: calc(100% - 26px);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 8px 13px 14px;
  padding: 5px 8px;
  border-radius: 7px;
  color: rgba(255,255,255,.58);
  background: rgba(255,255,255,.045);
  font-size: .64rem;
  font-weight: 750;
  text-decoration: none;
}
.sidebar-developer-link:hover { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-developer-link i { font-size: .68rem; }


/* DocMaker 8.9.14 — icon spacing, stacked mobile page controls and animated smart pagination. */
.type-chip,.role-chip,.account-type-chip,.status-badge{gap:6px}
.type-chip>i,.role-chip>i,.account-type-chip>i{flex:0 0 auto}
.button>i+span,.tool-button>i+span,.page-toolbar-actions button i+span{margin-inline-start:2px}
.ai-pagination-button[data-paginating="true"]{
  --ai-progress:4%;
  opacity:1!important;
  cursor:progress!important;
  border-color:rgba(110,231,183,.8)!important;
  background:linear-gradient(125deg,#102b4b 0%,#214f92 45%,#16806f 100%)!important;
  box-shadow:0 0 0 4px rgba(52,211,153,.12),0 16px 34px rgba(23,59,105,.32)!important;
  transform:none!important;
}
.ai-pagination-button[data-paginating="true"]::after{
  content:""!important;position:absolute!important;inset:auto 0 0 0!important;width:var(--ai-progress)!important;height:5px!important;border-radius:0 999px 999px 0!important;
  background:linear-gradient(90deg,#67e8f9,#818cf8,#34d399,#fbbf24)!important;background-size:220% 100%!important;
  box-shadow:0 -2px 12px rgba(103,232,249,.55)!important;animation:aiProgressShimmer .9s linear infinite!important;
}
.ai-pagination-button[data-paginating="true"] .ai-gemini-mark{animation:aiGeminiPulse 1.15s ease-in-out infinite}
.ai-pagination-button[data-paginating="true"] .ai-gemini-mark i{animation:spin .72s linear infinite!important}
.ai-pagination-button[data-paginating="true"] .ai-pagination-arrow{animation:spin .8s linear infinite;font-size:16px}
.ai-pagination-button[data-paginating="true"]::before{animation:aiButtonGlow 1.25s linear infinite!important}
@keyframes aiProgressShimmer{to{background-position:-220% 0}}
@keyframes aiGeminiPulse{0%,100%{transform:scale(.94);filter:saturate(1)}50%{transform:scale(1.08);filter:saturate(1.45) brightness(1.08)}}
.translation-is-busy .fa-spinner,.fa-spinner.fa-spin{display:inline-block;transform-origin:center;animation:spin .8s linear infinite!important}
@media(max-width:760px){
  .editor-page .control-section-head{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important}
  .editor-page .control-section-head>h3{width:100%;margin:0!important}
  .editor-page .page-toolbar-actions{width:100%!important;display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  .editor-page .page-toolbar-actions>.button,.editor-page .page-toolbar-actions>.ai-pagination-button{width:100%!important;min-width:0!important}
  .editor-page .page-toolbar-actions>.button{min-height:48px!important}
  .editor-page .ai-pagination-button{min-height:62px!important}
}

/* DocMaker 8.9.14 final icon spacing and progress accessibility. */
.type-chip,.role-chip,.account-type-chip,.status-badge{
  display:inline-flex;align-items:center;justify-content:center;gap:8px!important;
}
.type-chip>i,.role-chip>i,.account-type-chip>i,.status-badge>i{margin:0!important;flex:0 0 auto}
.translation-is-busy{position:relative}
.translation-is-busy .fa-spinner{display:inline-block!important;animation:spin .72s linear infinite!important}
.ai-pagination-button[data-paginating="true"]{overflow:hidden;isolation:isolate}
.ai-pagination-button[data-paginating="true"] .ai-pagination-copy strong,
.ai-pagination-button[data-paginating="true"] .ai-pagination-copy small{color:#fff!important}
.ai-pagination-button[data-paginating="true"] .ai-pagination-copy small{opacity:.84}
.ai-pagination-button[data-paginating="true"]:disabled{filter:none!important}
@media(max-width:760px){
  .editor-page .control-section-head>.page-toolbar-actions{margin-inline-start:0!important}
  .editor-page .page-toolbar-actions .ai-pagination-copy{text-align:start}
}

/* DocMaker 8.9.15 — lightweight global theme, mobile command grid and license status. */
.theme-changing *, .theme-changing *::before, .theme-changing *::after {
  transition: none !important;
  animation-duration: 0s !important;
  animation-delay: 0s !important;
}
.theme-toggle-button {
  width: auto;
  min-width: 42px;
  gap: 7px;
  padding-inline: 11px;
  cursor: pointer;
}
.theme-toggle-button .theme-toggle-label { font-size: 11px; font-weight: 850; }
[data-theme="dark"] .theme-toggle-button {
  color: #fde68a;
  border-color: rgba(251,191,36,.36);
  background: rgba(251,191,36,.10);
  box-shadow: inset 0 0 0 1px rgba(251,191,36,.06);
}
[data-theme="dark"] .theme-toggle-button i { color: #fbbf24; filter: drop-shadow(0 0 6px rgba(251,191,36,.35)); }
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] :is(.topbar,.topbar-commandbar,.topbar-secondary,.panel-card,.modal-dialog,.dropdown-menu,.document-toolbar,.document-card,.profile-card,.admin-topbar,.admin-content .panel-card) {
  border-color: var(--border);
  color: var(--text);
  background-color: var(--surface);
}
[data-theme="dark"] :is(.topbar,.admin-topbar) { backdrop-filter: none; background: #111827; }
[data-theme="dark"] :is(input,textarea,select,.field input,.field textarea,.field select) { color: var(--text); border-color: var(--border); background: var(--surface-soft); }
[data-theme="dark"] :is(.dropdown-menu a:hover,.dropdown-menu button:hover,.table-row:hover) { background: var(--surface-strong); }
[data-theme="dark"] .button-secondary { color: var(--text); border-color: var(--border-strong); background: var(--surface-soft); }
[data-theme="dark"] .topbar-commandbar { background: #111827; }
[data-theme="dark"] .topbar-secondary { background: #0f172a; }
[data-theme="dark"] .documents-brand-hero { box-shadow: none; }

.sidebar-license-card {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: linear-gradient(145deg,rgba(255,255,255,.12),rgba(255,255,255,.055));
  box-shadow: 0 14px 28px rgba(9,25,45,.16);
}
.sidebar-license-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #173b69;
  background: linear-gradient(145deg,#fef3c7,#fbbf24);
  font-size: 18px;
}
.sidebar-license-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.sidebar-license-copy small { color: #c8dbe5; font-size: 9px; }
.sidebar-license-copy strong { color: #fff; font-size: 13px; }
.sidebar-license-copy span { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; color: #dceef0; font-size: 10px; }
.sidebar-license-card > a {
  grid-column: 1/-1;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  color: #fff;
  background: rgba(255,255,255,.12);
  font-size: 10px;
  font-weight: 850;
}
.sidebar-license-card > a:hover { background: rgba(255,255,255,.2); }
.sidebar-license-card.is-locked .sidebar-license-icon { color: #7f1d1d; background: linear-gradient(145deg,#fee2e2,#fca5a5); }

/* All editor commands remain visible; mobile never hides them behind horizontal scrolling. */
@media (max-width: 900px) {
  .editor-page .topbar-commandbar {
    height: auto !important;
    min-height: 0 !important;
    padding: 8px 10px !important;
    overflow: visible !important;
  }
  .editor-page .topbar-commandbar .topbar-primary-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  .editor-page .topbar-commandbar .topbar-primary-actions .button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 7px 8px !important;
    white-space: normal !important;
    line-height: 1.35 !important;
  }
  .editor-page .topbar-commandbar .topbar-primary-actions .button span {
    display: inline !important;
    font-size: 11px !important;
  }
}
@media (max-width: 560px) {
  .editor-page .topbar-commandbar .topbar-primary-actions { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .editor-page .topbar-commandbar .topbar-primary-actions > :last-child:nth-child(odd) { grid-column: 1/-1; }
  .theme-toggle-button { width: 40px; min-width: 40px; padding: 0; }
  .theme-toggle-button .theme-toggle-label { display: none; }
}


/* DocMaker 8.9.15.3 — perfectly centered theme control content. */
.theme-toggle-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}
.theme-toggle-button > i,
.theme-toggle-button .theme-toggle-label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  line-height: 1 !important;
}
.theme-toggle-button > i { width: 1em; height: 1em; }


/* 8.9.15.9 — live identity uploads and consistent white image surfaces */
.avatar,.workspace-logo,.profile-avatar-xl,.company-logo-xl,.activity-avatar,.message-avatar,.creator-logo,.company-logo-small{
  background:#fff!important;
}
.avatar img,.workspace-logo img,.profile-avatar-xl img,.company-logo-xl img,.activity-avatar img,.message-avatar img,.creator-logo img,.company-logo-small img{
  background:#fff!important;
}
.workspace-logo img,.company-logo-xl img,.company-logo-small img{object-fit:contain!important;padding:4px}
.avatar img,.profile-avatar-xl img,.activity-avatar img,.message-avatar img{object-fit:cover!important}
.identity-upload-progress{position:absolute;inset:auto 8px 8px 8px;z-index:5;display:grid;grid-template-columns:1fr auto;align-items:center;gap:7px;padding:7px 9px;border-radius:11px;background:rgba(15,23,42,.88);box-shadow:0 8px 22px rgba(15,23,42,.25);color:#fff;backdrop-filter:blur(8px)}
.identity-upload-progress[hidden]{display:none!important}.identity-upload-progress>i{height:6px;display:block;overflow:hidden;border-radius:99px;background:rgba(255,255,255,.22)}.identity-upload-progress>i>b{width:0;height:100%;display:block;border-radius:inherit;background:#22c55e;transition:width .12s linear}.identity-upload-progress small{min-width:34px;color:#fff;font-size:10px;text-align:end}.identity-image-surface.is-uploading .profile-avatar-edit{opacity:.45;pointer-events:none}.identity-image-surface.is-uploading img{filter:saturate(.8)}

/* v8.8: title stack stays directly below the cover logo at every breakpoint. */
@media(max-width:1180px){.cover-ug-preview-main{margin-top:8px!important}}
@media(max-width:520px){.cover-ug-preview-main{margin-top:6px!important}}


/* DocMaker v8.9.16 — full-height cover art and explicit personal/company profile contexts. */
.cover-ug-preview-product{left:3%!important;right:3%!important;top:16%!important;bottom:4%!important}
.profile-context-switcher{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px}
.profile-context-link{min-width:0;display:grid;grid-template-columns:48px minmax(0,1fr) 28px;align-items:center;gap:11px;padding:12px 14px;border:1px solid var(--border);border-radius:15px;color:var(--text);background:var(--surface);text-decoration:none;box-shadow:0 8px 24px rgba(15,23,42,.05);transition:.18s ease}
.profile-context-link:hover{transform:translateY(-1px);border-color:var(--primary);box-shadow:0 12px 30px rgba(38,87,164,.12)}
.profile-context-link.active{border-color:color-mix(in srgb,var(--primary) 64%,var(--border));background:linear-gradient(135deg,var(--primary-soft),var(--surface))}
.profile-context-icon{width:48px;height:48px;display:grid;place-items:center;overflow:hidden;border-radius:13px;color:var(--primary);background:#fff;border:1px solid var(--border);font-size:18px}
.profile-context-icon img{width:100%;height:100%;object-fit:contain;padding:4px;background:#fff}
.profile-context-copy{min-width:0;display:flex;flex-direction:column;gap:3px}.profile-context-copy small{color:var(--muted);font-size:10px;font-weight:750}.profile-context-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.profile-context-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:10px}.profile-context-link>i:last-child{color:var(--muted);font-size:11px}
@media(max-width:700px){.profile-context-switcher{grid-template-columns:1fr}.profile-context-link{grid-template-columns:44px minmax(0,1fr) 24px}.profile-context-icon{width:44px;height:44px}}

/* DocMaker 8.9.17 — physical page list and pagination integrity feedback */
.page-count-summary{display:flex;align-items:center;justify-content:flex-start;gap:6px;flex-wrap:wrap;margin:0 0 9px;padding:8px 10px;border:1px solid var(--border);border-radius:10px;color:var(--muted);background:var(--surface-soft);font-size:9px}
.page-count-summary strong{color:var(--text);font-size:11px}.page-count-summary i{width:4px;height:4px;border-radius:50%;background:var(--border-strong)}
.page-item-state{width:34px;height:34px;display:grid;place-items:center;flex:0 0 34px;border-radius:9px;color:var(--muted);background:var(--surface-soft)}
.page-item-cover,.page-item-toc{border-style:dashed;background:color-mix(in srgb,var(--surface-soft) 82%,var(--surface))}
.page-item-generated{border-style:dashed;border-color:color-mix(in srgb,#f59e0b 45%,var(--border));background:color-mix(in srgb,#fff7ed 58%,var(--surface))}
.page-item-generated .page-number{color:#b45309;background:#ffedd5}.page-item-generated .page-item-state{color:#b45309;background:#ffedd5}
.page-item-cover .page-item-state,.page-item-toc .page-item-state{color:var(--primary);background:var(--primary-soft)}

/* DocMaker 8.9.18 — live backfill after media resizing */
.editor-shell.is-adaptive-reflowing [data-page-count-summary]{border-color:color-mix(in srgb,var(--primary) 50%,var(--border));box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 10%,transparent)}
.page-list.adaptive-reflow-highlight{animation:adaptiveReflowPulse .7s ease}
@keyframes adaptiveReflowPulse{0%{transform:translateY(0)}35%{transform:translateY(-2px)}100%{transform:translateY(0)}}


/* v8.10.0: direct editing inside the live preview */
.preview-edit-toggle.active{border-color:#2563eb!important;background:#eff6ff!important;color:#1d4ed8!important;box-shadow:0 0 0 2px rgba(37,99,235,.08)}
.preview-edit-toggle:not(.active){opacity:.78}
.preview-document.preview-inline-editing [data-preview-editable-block]{position:relative;cursor:text;transition:outline-color .14s ease,box-shadow .14s ease}
.preview-document.preview-inline-editing [data-preview-editable-block]:hover{outline:2px dashed rgba(37,99,235,.38);outline-offset:3px}
.preview-document.preview-inline-editing [data-preview-editable-block].preview-block-selected{outline:2px solid #2563eb;outline-offset:3px;box-shadow:0 0 0 5px rgba(37,99,235,.10)}
.preview-document.preview-inline-editing [contenteditable="true"],
.preview-document.preview-inline-editing [contenteditable="plaintext-only"]{cursor:text;min-width:1ch;border-radius:4px;transition:background .12s ease,box-shadow .12s ease,outline-color .12s ease}
.preview-document.preview-inline-editing [contenteditable="true"]:hover,
.preview-document.preview-inline-editing [contenteditable="plaintext-only"]:hover{background:rgba(219,234,254,.42)}
.preview-document.preview-inline-editing [contenteditable="true"]:focus,
.preview-document.preview-inline-editing [contenteditable="plaintext-only"]:focus{outline:2px solid #3b82f6!important;outline-offset:2px;background:#fff!important;box-shadow:0 0 0 5px rgba(59,130,246,.13)}
.preview-document.preview-inline-editing .doc-table-wrap{overflow:visible}
.callout-tone-guide{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:8px}
.callout-tone-guide span{display:flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid var(--border);border-radius:9px;font-size:11px;font-weight:800;background:#fff}
.callout-tone-guide .tone-info{color:#1d4ed8;background:#eff6ff;border-color:#bfdbfe}
.callout-tone-guide .tone-success{color:#166534;background:#f0fdf4;border-color:#bbf7d0}
.callout-tone-guide .tone-warning{color:#92400e;background:#fffbeb;border-color:#fde68a}
.callout-tone-guide .tone-danger{color:#b91c1c;background:#fef2f2;border-color:#fecaca}
@media(max-width:760px){.preview-toolbar{align-items:stretch;flex-wrap:wrap}.preview-toolbar-group{flex-wrap:wrap}.preview-edit-toggle{flex:1 1 100%}.callout-tone-guide{grid-template-columns:1fr}}
