/* ALMAS ERP v3.20.49 — Enterprise UI/UX consolidation + refinement layer
   Visual-only. No accounting / posting / permission logic. */
:root{
  --erp-space-1:4px;--erp-space-2:8px;--erp-space-3:12px;--erp-space-4:16px;--erp-space-5:20px;
  --erp-row:34px;--erp-control:34px;--erp-top:52px;--erp-side:244px;
  --r:8px;--r-sm:6px;--sh:0 1px 2px rgba(16,24,40,.035);
  --bg:#f5f6f8;--card:#fff;--card-2:#fafbfc;--th:#f4f6f8;--hover:#f7f9fc;
  --line:#e2e6eb;--line-2:#edf0f3;--txt:#1d2733;--mut:#667281;--mut-2:#8b96a3;
  --top-bg:#fff;--side:var(--erp-side);--top:var(--erp-top);--fs:14px;
}
html,body{font-family:Arial,Helvetica,sans-serif}
body{font-size:14px;line-height:1.42;background:var(--bg)}
h1{font-size:17px}h2{font-size:15px}h3{font-size:13.5px}
.small{font-size:11.5px}.mut{color:var(--mut)}

/* --- shell / page hierarchy --- */
.login{background:var(--bg)!important}
.side{width:var(--side);box-shadow:none;background:var(--side-bg)}
.brand{height:58px;padding:0 12px}.brand .logo{width:36px;height:36px;border-radius:7px;flex-basis:36px}.brand .logo img{width:31px;height:26px}
.brand b{font-size:14px}.brand small{font-size:10.5px}
.nav-q{margin:9px 10px 3px}.nav-q input{height:32px;border-radius:6px;font-size:12px}
.nav{padding:5px 8px 10px}
.nav .sec{margin-top:4px}.nav .grp{padding:8px 8px 3px;font-size:10.5px;letter-spacing:0}
.nav a,.nav .sec .items a{height:34px;border-radius:6px;padding:0 9px;font-size:12.5px;gap:9px;margin:0}
.nav a.on{font-weight:600;background:rgba(255,255,255,.105)}
.nav a.on::before{inset-inline-start:-8px;top:7px;bottom:7px;width:3px}
.nav a svg{width:17px;height:17px;flex-basis:17px}
.nav .grp .chev{transition:transform .15s ease}
.side-foot{padding:8px 10px}.side-foot .av{width:30px;height:30px;flex-basis:30px;font-size:13px}.side-foot .who b{font-size:12px}.side-foot .who small{font-size:10.5px}.sf-btn{width:29px;height:29px;flex-basis:29px}

.main{margin-inline-start:var(--side)}
.top{height:var(--top);padding:0 14px;background:#fff;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none;border-bottom:1px solid var(--line)}
.top-title{display:flex;flex-direction:column;justify-content:center;gap:0;flex:1;min-width:0;line-height:1.18}
.top-title h1{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-crumb{height:13px;font-size:10.5px;color:var(--mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-crumb:empty{display:none}.top-crumb:not(:empty)+h1{font-size:14.5px}
.top .btns{gap:6px}.icon-btn{width:32px;height:32px;border-radius:6px}.icon-btn svg{width:16px;height:16px}
.page{padding:14px 16px 24px;max-width:1460px}.page.wide{max-width:1560px}.page.narrow{max-width:920px}
#view{min-height:calc(100vh - var(--top))}
.page.pending{contain:layout style paint}

/* no duplicated mobile bottom navigation — drawer is the single mobile navigation */
.bnav{display:none!important}

/* --- enterprise primitives --- */
.erp-inline-note{display:flex;align-items:flex-start;gap:7px;padding:7px 10px;margin-bottom:10px;border:1px solid var(--line);border-inline-start:3px solid var(--info);border-radius:6px;background:#fbfcfe;color:var(--mut);font-size:11.5px}
.erp-inline-note.warn{border-inline-start-color:var(--warn)}.erp-inline-note.ok{border-inline-start-color:var(--ok)}
.summary-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));border:1px solid var(--line);border-radius:8px;background:var(--card);overflow:hidden;margin-bottom:10px}
.summary-strip>div{min-width:0;padding:9px 11px;border-inline-start:1px solid var(--line-2)}.summary-strip>div:first-child{border-inline-start:0}
.summary-strip .k{display:block;color:var(--mut);font-size:10.5px;line-height:1.25}.summary-strip .v{display:block;margin-top:3px;font-weight:700;font-size:14px;line-height:1.3;overflow-wrap:anywhere}.summary-strip .v.big{font-size:16px}.summary-strip .sub{display:block;margin-top:2px;color:var(--mut);font-size:10px}
.erp-section{background:var(--card);border:1px solid var(--line);border-radius:8px;margin-bottom:10px;overflow:hidden;box-shadow:none}
.erp-section-h{min-height:40px;padding:8px 11px;border-bottom:1px solid var(--line-2);display:flex;align-items:center;gap:8px;flex-wrap:wrap}.erp-section-h h2,.erp-section-h h3{flex:1;min-width:0}.erp-section-b{padding:11px}.erp-section-b.tight{padding:0}
.erp-toolbar{display:flex;align-items:flex-end;gap:7px;flex-wrap:wrap;margin-bottom:10px}.erp-toolbar .grow{flex:1 1 auto}.erp-toolbar .fg{min-width:140px}
.erp-empty{padding:18px 12px;text-align:center;color:var(--mut);font-size:12px}
.erp-empty .btn{margin-top:8px}

/* --- cards: reduce visual weight --- */
.card{border-radius:8px;box-shadow:none}.card-h{min-height:40px;padding:8px 11px}.card-b{padding:11px}.card-b.tight{padding:0}
.kpis{gap:8px;grid-template-columns:repeat(auto-fit,minmax(155px,1fr))}
.kpi{padding:9px 11px;border-radius:8px;box-shadow:none!important;border-top:1px solid var(--line)!important}.kpi::before{width:3px}.kpi .l{font-size:10.5px;font-weight:600}.kpi .v{font-size:16px;margin-top:3px}.kpi .s{font-size:10px}
a.kpi,a.module-card{transition:border-color .12s ease,background-color .12s ease!important;transform:none!important}a.kpi:hover,a.module-card:hover{transform:none!important;box-shadow:none!important;background:var(--hover);border-color:#cfd6df}
.notice,.alert{padding:8px 10px;border-radius:6px;font-size:12px}.notice b,.alert b{font-size:12px}.notice .mt,.alert .mt{margin-top:4px}

/* --- buttons / fields --- */
.btn{height:34px;padding:0 11px;border-radius:6px;font-size:12px;font-weight:600;box-shadow:none!important;transition:background-color .12s,border-color .12s,color .12s}.btn.sm{height:32px}.btn.xs{height:28px;padding:0 8px;font-size:11px;border-radius:5px}.btn.pri{box-shadow:none}.btn.bad{background:#fff;color:var(--bad);border-color:#efc9c7}.btn.bad:hover{background:var(--bad-soft)}
.inp,select.inp{height:34px;border-radius:6px;padding:0 9px;font-size:12.5px}.fg>label,.lbl,.filters .fg>label,.filters .lbl{font-size:10.5px;margin-bottom:3px}.hint{font-size:10.5px}
textarea.inp{padding:7px 9px;line-height:1.4}
.filters{gap:7px;align-items:flex-end}.filters .btn{height:34px}

/* --- table standard --- */
.tbl-wrap{border-radius:0;scrollbar-gutter:stable both-edges}
table.t{font-size:12px;line-height:1.3}
.t th{height:32px;padding:6px 8px;font-size:10.5px;font-weight:700;letter-spacing:0;background:var(--th);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:3}
.t td{height:34px;padding:6px 8px;border-bottom:1px solid var(--line-2);vertical-align:middle}
.t tbody tr:nth-child(even) td{background:#fbfcfd}.t tbody tr:hover td{background:var(--hover)}
.t th+th,.t td+td{border-inline-start:0}.t th.n,.t td.n,.t td .num{text-align:end;font-variant-numeric:tabular-nums}
.t .act{width:1%;white-space:nowrap}.pager{padding:7px 10px;font-size:12px}
.chip{min-height:20px;padding:1px 7px;border-radius:10px;font-size:10.5px;font-weight:600}

/* --- tabs --- */
.tabs{gap:0;border-bottom:1px solid var(--line);margin-bottom:10px;overflow-x:auto;flex-wrap:nowrap}.tabs a,.tabs button{height:34px;padding:0 11px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;font-size:11.5px;white-space:nowrap}.tabs a.on,.tabs button.on{border-bottom-color:var(--pri);background:transparent;color:var(--pri);font-weight:700}.tabs a:hover,.tabs button:hover{background:var(--hover)}

/* --- modal / drawer feel --- */
.modal-bg{animation:erpFade .12s ease;background:rgba(15,23,42,.38)}.modal{border-radius:8px;animation:erpModal .14s ease}.modal-h,.modal-f{padding:10px 12px}.modal-b{padding:12px}.modal-f{gap:7px}
@keyframes erpFade{from{opacity:0}}
@keyframes erpModal{from{transform:translateY(4px);opacity:.5}}

/* --- loading: reserve space, no full page spinner flash --- */
.erp-load{padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--card);min-height:92px;display:grid;gap:9px;align-content:center}.erp-load i{display:block;height:10px;border-radius:4px;background:linear-gradient(90deg,#edf0f3 25%,#f8f9fa 50%,#edf0f3 75%);background-size:200% 100%;animation:erpSk 1s linear infinite}.erp-load i:nth-child(2){width:78%}.erp-load i:nth-child(3){width:58%}@keyframes erpSk{to{background-position:-200% 0}}

/* --- report center --- */
.report-center-search{max-width:440px;margin-bottom:10px}.report-groups{display:grid;gap:10px}.report-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 10px}.report-row{display:flex;align-items:center;gap:9px;min-height:46px;padding:7px 8px;border-bottom:1px solid var(--line-2);color:inherit;text-decoration:none!important}.report-row:hover{background:var(--hover)}.report-row .ri{width:30px;height:30px;border:1px solid var(--line);border-radius:6px;display:flex;align-items:center;justify-content:center;color:var(--pri);flex:0 0 30px}.report-row .ri svg{width:15px;height:15px}.report-row .rt{flex:1;min-width:0}.report-row .rt b{display:block;font-size:12px}.report-row .rt small{display:block;color:var(--mut);font-size:10.5px;margin-top:1px}.report-row .go{color:var(--mut);font-size:16px}.report-group.hidden{display:none!important}.report-row.hidden{display:none!important}

/* --- data health --- */
.dh-pass{color:var(--ok)}.dh-count.bad{color:var(--bad)}.dh-count.warn{color:var(--warn)}
.dh-detail summary{cursor:pointer;color:var(--pri);font-size:11px;white-space:nowrap}.dh-detail[open] summary{margin-bottom:5px}.dh-samples{display:grid;gap:4px;padding:6px;border:1px solid var(--line-2);border-radius:6px;background:var(--card-2);min-width:260px}.dh-samples a,.dh-samples .small{font-size:10.5px}

/* --- fiscal / closing --- */
.fy-status.closed{color:var(--ok)}.fy-status.open{color:var(--info)}.fy-status.future{color:var(--mut)}
.close-checks .t td{height:32px}.close-ok{color:var(--ok);font-weight:700}.close-bad{color:var(--bad);font-weight:700}.close-warn{color:var(--warn);font-weight:700}
details.erp-details{border:1px solid var(--line);border-radius:7px;background:var(--card);margin-bottom:9px}details.erp-details>summary{cursor:pointer;list-style:none;padding:9px 11px;font-weight:600;font-size:12px}details.erp-details>summary::-webkit-details-marker{display:none}details.erp-details[open]>summary{border-bottom:1px solid var(--line-2)}details.erp-details>.erp-details-b{padding:10px 11px}

/* --- performance / anti-flicker --- */
.topbar-progress i{height:2px;transition:width .16s linear}.sticky-actions{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:var(--bg);padding:7px 0;margin-top:10px}

@media(min-width:901px){.main{transition:margin .15s ease}.side{transition:width .15s ease}}
@media(max-width:900px){
  :root{--side:276px}
  .side{width:276px;transition:transform .15s ease;box-shadow:-10px 0 28px rgba(15,23,42,.18)}
  .main{margin-inline-start:0}.page{padding:12px 10px 20px}.top{padding:0 10px}.top .back{display:inline-flex}
  .summary-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-strip>div:nth-child(odd){border-inline-start:0}
  .report-list{grid-template-columns:1fr}
}
@media(max-width:640px){
  :root{--top:50px}.top{height:50px}.page{padding:10px 8px 18px}.top-title h1{font-size:13.5px}.top-crumb{font-size:9.5px}
  .summary-strip{grid-template-columns:1fr 1fr}.summary-strip>div{padding:8px 9px}.summary-strip .v{font-size:12.5px}.summary-strip .v.big{font-size:14px}
  .card-h,.erp-section-h{padding:8px 9px}.card-b,.erp-section-b{padding:9px}
  .erp-toolbar{display:grid;grid-template-columns:1fr 1fr}.erp-toolbar>.fg,.erp-toolbar>.btn,.erp-toolbar>select{min-width:0!important;max-width:none!important;width:100%}.erp-toolbar>.grow{display:none}
  .modal-bg{padding:8px}.modal{max-height:calc(100vh - 16px)}
}
@media(max-width:420px){.summary-strip{grid-template-columns:1fr}.summary-strip>div{border-inline-start:0;border-top:1px solid var(--line-2)}.summary-strip>div:first-child{border-top:0}.erp-toolbar{grid-template-columns:1fr}}

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


/* ============================================================
   v3.20.49 — Deep visual / PDF / statement refinement
   Presentation-only design layer.
   ============================================================ */
:root{
  --erp-space-5:24px;--erp-space-6:32px;
  --erp-row:36px;--erp-control:40px;--erp-compact:36px;--erp-top:54px;--erp-side:252px;
  --r:6px;--r-sm:5px;
}
@media(min-width:901px){
  body{font-size:13px}
  .side{width:var(--erp-side)}
  .main{margin-inline-start:var(--erp-side)}
  .top{height:var(--erp-top)}
  .page{max-width:1600px;margin-inline:auto;padding:16px 20px 28px}
  .page.wide{max-width:1780px}
  .settings-page{max-width:1580px!important}
  .account-statement-page{max-width:1780px!important}
}
h1{font-size:19px;font-weight:600}h2{font-size:15px;font-weight:600}
.btn{height:var(--erp-compact);font-size:12.5px;padding:0 12px}
.btn.sm{height:34px}.btn.ghost{background:#fff;color:var(--txt);border-color:var(--line)}
.inp,select.inp{height:var(--erp-control);font-size:13px;padding:0 10px}
textarea.inp{height:auto;min-height:40px}
.fg>label,.lbl,.filters .fg>label,.filters .lbl{font-size:11px}
.t th{height:39px;font-size:12px;padding:7px 9px}.t td{height:var(--erp-row);font-size:12.5px;padding:7px 9px}
.t td.n,.t th.n,.num,.money,.kpi .v,.summary-strip .v,.stmt-summary b{font-variant-numeric:tabular-nums}
.card-h,.erp-section-h{min-height:42px}

/* Context widths: forms constrained; data tables adaptive. */
.settings-page .card:not(.tight),.settings-page .erp-section{max-width:1580px}
.settings-page .fgrid{grid-template-columns:repeat(12,minmax(0,1fr));gap:12px}
.settings-page .fgrid>.fg{grid-column:span 4}
.settings-page .fgrid>.fg.span2{grid-column:span 6}
.settings-page .tabs{position:sticky;top:var(--erp-top);z-index:8;background:var(--bg);padding-top:2px}
.settings-page .tbl-wrap{max-width:100%}
@media(max-width:1200px){
  .settings-page .fgrid>.fg{grid-column:span 6}
  .settings-page .fgrid>.fg.span2{grid-column:span 12}
}
@media(max-width:700px){
  .settings-page .fgrid>.fg,.settings-page .fgrid>.fg.span2{grid-column:1/-1}
}

/* Sidebar / favorites */
.fav-head{appearance:none;width:100%;height:32px;border:0;background:transparent;color:inherit;padding:0 8px;display:flex;align-items:center;gap:8px;border-radius:6px;font:inherit;cursor:pointer;text-align:start}
.fav-head:hover{background:rgba(255,255,255,.07)}
.fav-head svg{width:15px;height:15px}.fav-head span{flex:1;font-size:11px;font-weight:600;color:rgba(255,255,255,.72)}
.fav-head .chev{transition:transform .15s ease}.fav-sec.closed .fav-head .chev{transform:rotate(90deg)}
.fav-sec>.items{display:block;max-height:560px;opacity:1;overflow:hidden;transition:max-height .15s ease,opacity .12s ease}
.fav-sec.closed>.items{max-height:0;opacity:0}

/* Account statement */
.stmt-search-card{max-width:1780px}
.stmt-primary-grid{display:grid;grid-template-columns:minmax(260px,1.7fr) minmax(240px,1.5fr) 150px 150px 155px auto;gap:8px;align-items:end}
.stmt-run{min-width:82px}
.stmt-advanced>summary{min-height:36px;display:flex;align-items:center;gap:6px;cursor:pointer;font-weight:600;color:var(--txt)}
.stmt-advanced-count:empty{display:none}
.stmt-options{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:9px;border-top:1px solid var(--line-2);margin-top:9px}
.stmt-options .grow{flex:1}.stmt-per-page{display:flex;align-items:center;gap:5px;color:var(--mut);font-size:11px}.stmt-per-page .inp{width:72px;height:34px}
.stmt-columns{position:relative}.stmt-columns>summary{list-style:none;cursor:pointer;height:34px;padding:0 9px;border:1px solid var(--line);border-radius:6px;display:flex;align-items:center;gap:6px;background:#fff;font-weight:600;font-size:11.5px}.stmt-columns>summary::-webkit-details-marker{display:none}
.stmt-columns-menu{position:absolute;z-index:20;top:calc(100% + 4px);inset-inline-start:0;min-width:190px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:0 8px 24px rgba(15,23,42,.10);display:grid;gap:6px}
.stmt-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));border:1px solid var(--line);border-radius:6px;background:#fff;overflow:hidden}
.stmt-summary>div{padding:9px 11px;border-inline-start:1px solid var(--line-2)}.stmt-summary>div:first-child{border-inline-start:0}
.stmt-summary span{display:block;color:var(--mut);font-size:10.5px}.stmt-summary b{display:block;margin-top:2px;font-size:14px}.stmt-summary .main b{font-size:15px}.stmt-summary .ok b{color:var(--ok)}
.stmt-result-card .card-h{align-items:center}
.stmt-result-card .stmt-desc{max-width:420px}.stmt-result-card .stmt-desc b,.stmt-result-card .stmt-desc .small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.35}
.stmt-contra{max-width:250px}.stmt-contra-more{border:0;background:transparent;color:var(--pri);font-weight:600;cursor:pointer;padding:0;text-decoration:underline;text-underline-offset:2px}
.stmt-pager{display:flex;justify-content:center;align-items:center;gap:10px;padding:8px 10px;border-top:1px solid var(--line);background:#fafbfc;font-size:11.5px;color:var(--mut)}
.account-statement-page #rstmtres{min-height:120px}.account-statement-page #rstmtres.is-loading{opacity:.68;pointer-events:none;transition:opacity .12s ease}
.table-skeleton{display:grid;gap:1px;border:1px solid var(--line);background:var(--line);border-radius:6px;overflow:hidden}.table-skeleton i{display:block;height:38px;background:linear-gradient(90deg,#fff 15%,#f7f8fa 50%,#fff 85%);background-size:220% 100%;animation:erpSk 1.05s linear infinite}
@media(max-width:1100px){.stmt-primary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stmt-account,.stmt-text{grid-column:span 2}.stmt-run{width:100%}}
@media(max-width:640px){.stmt-primary-grid{grid-template-columns:1fr}.stmt-account,.stmt-text{grid-column:auto}.stmt-options{align-items:stretch}.stmt-options>.chk{width:100%}.stmt-options .grow{display:none}.stmt-per-page{margin-inline-start:auto}.stmt-summary{grid-template-columns:1fr 1fr}.stmt-pager{justify-content:space-between}.stmt-pager span{font-size:10.5px}.stmt-result-card .tbl-wrap{overflow-x:auto}}

/* Invoice view: one clear primary action, low-noise secondary actions. */
.invoice-view-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:10px;padding:10px 12px;border:1px solid var(--line);border-radius:6px;background:#fff}
.invoice-view-title{min-width:0}.invoice-view-title .eyebrow{font-size:10.5px;color:var(--mut);margin-bottom:2px}.invoice-title-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.invoice-title-line h2{font-size:18px;margin:0}
.invoice-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.action-more{position:relative}.action-more>summary{list-style:none}.action-more>summary::-webkit-details-marker{display:none}
.action-more-menu{position:absolute;z-index:30;top:calc(100% + 5px);inset-inline-end:0;min-width:235px;background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:0 10px 28px rgba(15,23,42,.12);padding:6px;display:grid;gap:2px}
.action-more-menu .menu-action{display:flex;align-items:center;gap:8px;width:100%;min-height:34px;padding:6px 8px;border:0;border-radius:5px;background:transparent;color:var(--txt);font:inherit;font-size:12px;text-decoration:none;cursor:pointer;text-align:start}
.action-more-menu .menu-action:hover{background:var(--hover)}.action-more-menu .menu-action.danger{color:var(--bad)}.action-more-menu .menu-block{padding:6px 8px;border-bottom:1px solid var(--line-2);margin-bottom:3px}.action-more-menu .menu-block>span{display:block;color:var(--mut);font-size:10.5px;margin-bottom:5px}
.seg.compact{width:100%}.seg.compact span{min-height:30px}
.invoice-preview-stage{min-height:760px}
@media(max-width:760px){.invoice-view-head{align-items:stretch;flex-direction:column}.invoice-actions{justify-content:flex-start}.invoice-actions>.btn:not(.ok):not([data-print]){display:none}.action-more{margin-inline-start:auto}.invoice-preview-stage{min-height:0}}

/* PDF preview: never expose native black initialization canvas. */
.pdf-preview-wrap{display:grid;gap:7px;justify-items:center}
.pdf-local-toolbar{display:flex;justify-content:center;gap:5px}
.pdf-a4-preview{position:relative!important;background:#eef1f4!important;border:1px solid #d6dce4!important;box-shadow:0 3px 14px rgba(15,23,42,.07)!important}
.pdf-preview-holder{position:absolute;inset:0;background:#eef1f4;display:grid;place-items:center;overflow:hidden}
.pdf-a4-skeleton{position:absolute;inset:10px;background:#fff;border-radius:2px;padding:7%;box-shadow:0 1px 5px rgba(15,23,42,.08);display:grid;align-content:start;gap:4%;z-index:2}
.pdf-sk-head{height:9%;width:45%;background:#edf0f3;border-radius:3px}.pdf-sk-line{height:2.2%;background:#f0f2f5;border-radius:2px}.pdf-sk-line.w80{width:80%}.pdf-sk-line.w70{width:70%}.pdf-sk-line.w55{width:55%}.pdf-sk-table{height:35%;border:1px solid #e5e8ec;background:repeating-linear-gradient(to bottom,#fff 0,#fff 10%,#f5f7f9 10%,#f5f7f9 11%)}
.pdf-native-frame{position:absolute;inset:0;width:100%!important;height:100%!important;border:0!important;background:#fff!important;opacity:0;visibility:hidden;z-index:3;transition:opacity .13s ease}
.pdf-a4-preview.pdf-ready .pdf-native-frame{opacity:1;visibility:visible}.pdf-a4-preview.pdf-ready .pdf-a4-skeleton{opacity:0;visibility:hidden;transition:opacity .12s ease,visibility 0s linear .12s}
.pdf-preview-error{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:20px;background:#fff;color:var(--bad)}
.pdf-a4-preview[data-pdf-view="page"]{width:min(100%,610px)!important}.pdf-a4-preview[data-pdf-view="width"]{width:min(100%,760px)!important}
@media(max-width:760px){.pdf-a4-preview[data-pdf-view]{width:100%!important}.pdf-local-toolbar{position:sticky;top:0;z-index:6;background:var(--bg);padding:4px}}

/* Browser invoice/A4 presentation */
.doc[data-doc-kind="invoice"] .hd .co b{font-size:18px}.doc[data-doc-kind="invoice"] .hd .co span{font-size:12px;line-height:1.35}
.doc[data-doc-kind="invoice"] .hd img.logo{height:78px;max-width:158px}
.doc[data-doc-kind="invoice"] .ttl{font-size:28px;letter-spacing:1px;margin:14px 0 12px}
.doc[data-doc-kind="invoice"] .info{margin-bottom:14px;gap:12px}.doc[data-doc-kind="invoice"] .info .box{padding:8px 10px;min-height:0}
.doc[data-doc-kind="invoice"] .items th,.doc[data-doc-kind="invoice"] .items td{font-size:12px;padding:6px 7px}
.doc[data-doc-kind="invoice"] .tot{margin-top:0}.doc[data-doc-kind="invoice"] .bank{margin-top:14px;font-size:11px;line-height:1.4;padding:9px 11px}
.doc[data-doc-kind="invoice"] .invoice-notes{font-size:11.5px;color:#555;margin-top:12px;white-space:pre-line;line-height:1.4}
.doc[data-doc-kind="invoice"] .invoice-signature-safe{min-height:118px;margin-top:14px;border-top:1px solid transparent}
.doc[data-doc-kind="invoice"] .invoice-signature-safe .s{height:105px}
.doc[data-doc-kind="invoice"] .thanks{letter-spacing:0;font-size:12px;color:#344054;margin-top:10px}

/* Formatted dates should remain ISO in textual cells; native pickers keep ISO values. */
input[type="date"].inp{font-variant-numeric:tabular-nums}

/* Ultra-wide structured lists: keep actions visually connected to data. */
@media(min-width:1800px){
  .settings-page .t th:last-child,.settings-page .t td:last-child{width:110px}
  .settings-page .tbl-wrap{border:1px solid var(--line);border-radius:6px}
}

/* Mobile keeps data density without recreating every row as a huge card. */
@media(max-width:640px){
  body{font-size:14px}
  .btn{height:38px}
  .inp,select.inp{height:40px;font-size:14px}
  .t th{height:38px}.t td{height:38px}
}

/* Chart of accounts — explicit columns instead of ultra-wide whitespace. */
@media(min-width:901px){
  #tree>.acct,#tree .kids>.acct{display:grid;grid-template-columns:24px 86px minmax(240px,1fr) 190px 230px;column-gap:8px;align-items:center}
  .acct .cd{min-width:0}.acct .nm{min-width:0}.acct .bl{text-align:end;font-variant-numeric:tabular-nums}.acct .ac{justify-content:flex-end;min-width:0}
}
.home-cash-total{display:flex;align-items:baseline;gap:5px;flex-wrap:wrap}.home-cash-total small{display:block;width:100%;font-size:9.5px;color:var(--mut);font-weight:400;margin-top:-2px}
.pdf-page-count{min-width:72px;display:inline-flex;align-items:center;justify-content:center;color:var(--mut);font-size:10.5px}

/* v3.20.49 final QA fixes */
.mobile-only{display:none!important}
@media(max-width:760px){.action-more-menu .mobile-only{display:flex!important}}
/* Chart of accounts: keep identity, classification, currency, nature and actions connected on ultra-wide screens. */
@media(min-width:901px){
  #tree>.acct,#tree .kids>.acct{grid-template-columns:24px 86px minmax(240px,1fr) 110px 82px 82px 180px 230px}
  .acct .tp,.acct .cu,.acct .na{white-space:nowrap;color:var(--mut);font-size:11px}
}
@media(max-width:900px){.acct .tp,.acct .cu,.acct .na{display:none}}


/* v3.20.49 — ISO dates + complete PDF preview toolbar */
input[type=date].iso-date{direction:ltr;text-align:left;font-variant-numeric:tabular-nums;font-feature-settings:'tnum' 1}
.pdf-local-toolbar{align-items:center;flex-wrap:wrap;min-height:36px}
.pdf-toolbar-sep{width:1px;height:20px;background:var(--line);margin:0 2px;flex:0 0 1px}
.pdf-zoom-value{min-width:44px;text-align:center;font-size:10.5px;color:var(--mut);font-variant-numeric:tabular-nums}
@media(max-width:520px){.pdf-local-toolbar{justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;width:100%;padding-inline:2px}.pdf-local-toolbar .btn{flex:0 0 auto}.pdf-page-count{flex:0 0 auto}}

.acct-head{padding-inline-start:12px!important;min-height:36px!important;background:#f4f6f8!important;color:var(--mut);font-size:10.5px;font-weight:700;position:sticky;top:0;z-index:3}
.acct-head:hover{background:#f4f6f8!important}
@media(max-width:900px){.acct-head{display:none!important}}
@media(max-width:640px){.stmt-result-card .tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}.stmt-result-card .t{min-width:760px}}

/* =====================================================================
   v3.20.50 — Visual Invoice Designer
   ===================================================================== */
.invoice-designer-page{max-width:none!important;padding-bottom:0!important;overflow:hidden}.id-topbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:-2px 0 8px;padding:7px 8px;border:1px solid var(--line);background:#fff;border-radius:6px;position:sticky;top:0;z-index:45}.id-top-main{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.id-template-select{width:250px}.id-zoom{width:90px}.id-statusbar{display:flex;align-items:center;gap:8px;min-height:34px;padding:4px 8px;border:1px solid var(--line);border-radius:6px;background:var(--bg2,#f8fafc);font-size:12px;margin-bottom:8px}.id-statusbar .spacer{flex:1}.id-statusbar [data-save-state].warn{color:#a65a00;font-weight:600}.id-layout{display:grid;grid-template-columns:230px minmax(620px,1fr) 270px;gap:8px;height:calc(100vh - 178px);min-height:620px;direction:rtl}.id-panel{background:#fff;border:1px solid var(--line);border-radius:6px;min-height:0;display:flex;flex-direction:column;overflow:hidden}.id-panel-head{min-height:42px;padding:8px 10px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:8px}.id-panel-head span{font-size:11px;color:var(--mut)}.id-panel-scroll{overflow:auto;padding:8px;min-height:0}.id-elements section{margin-bottom:12px}.id-elements h3,.id-props h3{font-size:12px;margin:4px 0 6px;color:#475467}.id-elements button{width:100%;height:30px;display:flex;align-items:center;text-align:right;border:0;border-bottom:1px solid #edf0f4;background:#fff;font:600 12px Arial;cursor:pointer;padding:0 6px;color:var(--text)}.id-elements button:hover{background:var(--pri-soft)}.id-workspace{position:relative;min-width:0;background:#e7ebf0;border:1px solid var(--line);border-radius:6px;overflow:hidden;direction:ltr}.id-canvas-scroll{position:absolute;inset:22px 0 0 22px;overflow:auto;padding:24px 40px 70px;display:flex;justify-content:center;align-items:flex-start}.id-page-wrap{width:630px;height:891px;flex:0 0 auto;transform-origin:top center;transition:transform .12s ease}.id-page{position:relative;width:630px;height:891px;background:#fff;box-shadow:0 3px 18px rgba(17,24,39,.15);outline:none;overflow:hidden;font-family:Arial,sans-serif;color:#1c2533}.id-page:before{content:"A4 · 210 × 297 mm";position:absolute;top:3px;left:6px;font-size:8px;color:#98a2b3;z-index:200;pointer-events:none}.id-ruler-x{position:absolute;top:0;left:22px;right:0;height:22px;background:repeating-linear-gradient(90deg,#cfd5dd 0 1px,transparent 1px 15px);border-bottom:1px solid #c6ccd5}.id-ruler-y{position:absolute;top:22px;left:0;bottom:0;width:22px;background:repeating-linear-gradient(0deg,#cfd5dd 0 1px,transparent 1px 15px);border-right:1px solid #c6ccd5}.id-safe{position:absolute;border:1px dashed rgba(27,58,138,.35);pointer-events:none;z-index:1}.id-element{position:absolute;border:1px dashed transparent;box-sizing:border-box;cursor:move;user-select:none;overflow:visible;transition:border-color .08s,box-shadow .08s}.id-element:hover{border-color:rgba(27,58,138,.28)}.id-element.selected{border:1.5px solid #1b66c9;box-shadow:0 0 0 2px rgba(27,102,201,.08)}.id-element.locked{cursor:not-allowed}.id-element.anchored>.id-el-label small{color:#8a5b00}.id-el-label{display:none;position:absolute;top:-18px;right:0;background:#1b66c9;color:white;font-size:8px;line-height:14px;padding:1px 4px;border-radius:3px;white-space:nowrap;z-index:300}.id-element.selected>.id-el-label{display:flex;gap:5px}.id-content{width:100%;height:100%;box-sizing:border-box;overflow:hidden;white-space:pre-line}.id-image .id-content{display:flex;align-items:center;justify-content:center}.id-image img{width:100%;height:100%;object-fit:contain;pointer-events:none}.id-placeholder,.id-stamp-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;border:1px dashed #aab4c2;color:#98a2b3;font-size:10px}.id-stamp-placeholder{border-radius:50%;border-color:#cf6f6f;color:#b64b4b}.id-section .id-content,.id-bank .id-content{border:1px solid #c9d1dc;padding:8px;display:flex;flex-direction:column;gap:4px}.id-section small{font-size:9px;color:#667085}.id-meta .id-content>div{display:grid;grid-template-columns:1fr 1.4fr;gap:4px;padding:2px 0}.id-meta span{font-size:9px;color:#667085}.id-meta b{font-size:10px}.id-items .id-content{overflow:hidden}.id-items table{width:100%;border-collapse:collapse;table-layout:fixed}.id-items th,.id-items td{border:1px solid #b7c0cc;padding:4px;line-height:1.2;overflow:hidden;text-overflow:ellipsis}.id-items th{background:#e4e9f0}.id-items tbody tr:nth-child(even){background:#f5f7fa}.id-overflow-note{font-size:8px;color:#8a5b00;background:#fff7e8;padding:2px 4px}.id-totals .id-content{display:flex;flex-direction:column;border:1px solid #b7c0cc}.id-totals .id-content>div{display:flex;justify-content:space-between;padding:5px;border-bottom:1px solid #d8dee7}.id-totals .due{background:#eef2f7;font-weight:700}.id-bank .id-content span{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.id-resize{position:absolute;width:10px;height:10px;left:-6px;bottom:-6px;background:#fff;border:2px solid #1b66c9;border-radius:2px;cursor:nwse-resize;z-index:400}.id-guide{position:absolute;background:#e24a4a;z-index:500;pointer-events:none}.id-guide-v{width:1px;top:0;bottom:0}.id-guide-h{height:1px;left:0;right:0}.id-prop{display:flex;flex-direction:column;gap:4px;margin-bottom:8px;font-size:11px}.id-prop>span{color:#667085;font-weight:600}.id-prop-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.id-prop-row{display:flex;gap:10px;flex-wrap:wrap;margin:7px 0}.id-layer-actions{display:flex;gap:5px;flex-wrap:wrap;margin:6px 0 10px}.id-props hr{border:0;border-top:1px solid var(--line);margin:10px 0}.id-mobile-note{margin-bottom:8px;padding:8px 10px;border:1px solid #e7c36b;background:#fff8e5;border-radius:6px;font-size:12px}.invoice-designer-page.view-only .id-elements,.invoice-designer-page.view-only .id-props{display:none}.invoice-designer-page.view-only .id-layout{grid-template-columns:1fr}.invoice-designer-page.view-only [data-save],.invoice-designer-page.view-only [data-publish],.invoice-designer-page.view-only [data-duplicate],.invoice-designer-page.view-only [data-import]{display:none!important}
@media(max-width:1250px){.id-layout{grid-template-columns:205px minmax(560px,1fr) 240px}.id-template-select{width:200px}}
@media(max-width:900px){.invoice-designer-page{overflow:visible}.id-topbar{position:static}.id-layout{height:calc(100vh - 230px);min-height:500px}.id-canvas-scroll{padding:18px 20px 60px}.id-statusbar{overflow-x:auto;white-space:nowrap}.id-top-main{flex-wrap:nowrap;overflow-x:auto;max-width:100%}}
/* v3.20.50 — Invoice Designer custom primitives / search */
.id-real-invoice{width:260px;min-width:220px}.id-text .id-content{padding:2px;display:flex;align-items:flex-start}.id-line,.id-separator{overflow:visible!important}.id-line .id-content,.id-separator .id-content{height:50%;border-bottom:1px solid currentColor}.id-box .id-content{border:1px solid #c9d1dc;background:rgba(255,255,255,.25)}.id-key-meta .id-content>div{display:grid;grid-template-columns:1fr 1.4fr;gap:4px;padding:2px 0}.id-key-meta .id-content span{font-size:9px;color:#667085}.id-key-meta .id-content b{font-size:10px}.id-key-signature_label .id-content{border-top:1px solid #344054;text-align:center;padding-top:3px}.id-elements button[draggable=true]{cursor:grab}.id-elements button[draggable=true]:active{cursor:grabbing}.id-page.id-drop-target{outline:2px solid rgba(27,102,201,.45);outline-offset:-2px}
/* v3.20.50 — Invoice Designer publish/preview + mobile view-only hardening */
.id-html-preview{background:#e7ebf0;padding:18px;max-height:78vh;overflow:auto}.id-html-preview>.doc{margin:0 auto;background:#fff;box-shadow:0 3px 16px rgba(17,24,39,.16)}
.id-publish-previews{display:flex;gap:6px;flex-wrap:wrap}.id-publish-previews .btn{min-width:120px}
.invoice-designer-page.view-only [data-reset],.invoice-designer-page.view-only [data-default-ar],.invoice-designer-page.view-only [data-default-en],.invoice-designer-page.view-only [data-template-language],.invoice-designer-page.view-only [data-linked-layout],.invoice-designer-page.view-only [data-undo],.invoice-designer-page.view-only [data-redo]{display:none!important}
@media(max-width:900px){.id-html-preview{padding:8px}.id-publish-previews{display:grid;grid-template-columns:1fr 1fr}.id-publish-previews .btn{min-width:0;width:100%}}

/* =====================================================================
   v3.20.52 — System-wide form integrity / RTL-LTR / mobile primitives
   ===================================================================== */
.bidi-ltr,.bidi-value,.iso-value{direction:ltr!important;unicode-bidi:isolate;text-align:left;font-variant-numeric:tabular-nums;font-feature-settings:'tnum' 1}
input[dir="auto"],textarea[dir="auto"]{unicode-bidi:plaintext;text-align:start}
select.inp{unicode-bidi:plaintext;min-width:0;text-overflow:ellipsis}

/* Date-only ERP field: visible ISO text is decoupled from the native iOS date segments.
   The real input[type=date] keeps the submitted value and native picker. */
.erp-date-field{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:stretch;width:100%;min-width:0;direction:ltr;unicode-bidi:isolate}
.erp-date-display{grid-column:1/-1;padding-inline-end:48px!important;text-align:left!important;direction:ltr!important;unicode-bidi:isolate!important;font-variant-numeric:tabular-nums;font-feature-settings:'tnum' 1;letter-spacing:.01em}
.erp-date-pick{position:absolute;inset-inline-end:0;top:0;width:42px;height:100%;min-height:34px;border:0;border-inline-start:1px solid var(--inp-line);background:transparent;color:var(--mut);display:grid;place-items:center;cursor:pointer;border-radius:0 6px 6px 0;z-index:2}
[dir="rtl"] .erp-date-pick{border-radius:6px 0 0 6px}
.erp-date-pick:hover{background:var(--hover);color:var(--pri)}
.erp-date-pick:focus-visible{outline:2px solid var(--pri-2);outline-offset:-2px}
.erp-date-pick .ic{width:18px;height:18px}
.erp-date-native{position:absolute!important;inset-inline-end:0!important;top:0!important;width:42px!important;height:100%!important;min-height:0!important;opacity:0!important;pointer-events:auto!important;z-index:3!important;margin:0!important;padding:0!important;border:0!important;cursor:pointer!important}
.erp-date-native::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.erp-date-display.bad{border-color:var(--bad)!important;box-shadow:0 0 0 2px rgba(190,45,45,.08)!important}

body.modal-open{position:fixed!important;inset-inline:0;width:100%;overflow:hidden!important;overscroll-behavior:none}
.modal-bg{padding-top:max(8px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom));overscroll-behavior:contain}
.modal{max-height:calc(100vh - 16px);max-height:calc(100dvh - max(16px,env(safe-area-inset-top)) - max(16px,env(safe-area-inset-bottom)))}
.modal-b{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;min-height:0}
.modal-h,.modal-f{flex:0 0 auto}
.modal-close{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
.modal-f{padding-bottom:max(10px,env(safe-area-inset-bottom))}
.modal-f .btn.is-busy{opacity:.75;cursor:progress}
.quick-entry-currency b{display:inline-block;direction:ltr;unicode-bidi:isolate}

@media(max-width:640px){
  .modal-bg{align-items:flex-end;padding-inline:6px;padding-top:max(6px,env(safe-area-inset-top));padding-bottom:max(6px,env(safe-area-inset-bottom))}
  .modal{width:100%;max-height:94vh;max-height:94dvh;border-radius:10px 10px 6px 6px}
  .modal-h{padding:8px 10px}.modal-b{padding:10px}.modal-f{position:sticky;bottom:0;background:var(--card);z-index:4;padding:9px 10px max(9px,env(safe-area-inset-bottom))}
  .erp-date-field{grid-template-columns:minmax(0,1fr) 44px}.erp-date-pick,.erp-date-native{width:44px!important;min-height:40px}
}
.modal-f .btn.is-busy::after{content:'…';display:inline-block;margin-inline-start:6px;animation:erpBusyPulse .8s infinite alternate}
@keyframes erpBusyPulse{from{opacity:.35}to{opacity:1}}
.sg-o{unicode-bidi:plaintext;text-align:start}

/* Unified form density after system-wide integrity audit. */
:root{--erp-form-h:40px}
.inp,input.inp,select.inp{height:var(--erp-form-h);min-height:var(--erp-form-h)}
textarea.inp{height:auto;min-height:56px}
.fg,.fgrid>*{min-width:0}
@media(max-width:640px){
  :root{--erp-form-h:44px}
  .btn:not(.xs),.icon-btn{min-height:44px}
  .chk{min-height:44px;align-items:center}
  .sg-o{min-height:44px;display:flex;align-items:center}
}
@media(max-width:380px){
  .quick-entry-grid{grid-template-columns:1fr!important}
  .quick-entry-grid>.fg,.quick-entry-grid>.span2{grid-column:1!important}
}


/* =====================================================================
   v3.20.54 — Arabic Invoice Designer ribbon + stable pointer canvas
   ===================================================================== */
.id-formatbar{display:flex;align-items:stretch;gap:0;margin:0 0 8px;border:1px solid var(--line);background:#fff;border-radius:6px;min-height:58px;overflow-x:auto;overflow-y:hidden;direction:rtl;position:sticky;top:54px;z-index:44;box-shadow:0 1px 2px rgba(16,24,40,.03)}
.id-format-empty{display:flex;align-items:center;padding:0 14px;color:var(--mut);font-size:12px;white-space:nowrap}
.id-fmt-group{display:flex;align-items:center;gap:4px;padding:17px 8px 5px;position:relative;border-inline-start:1px solid #e5e9ef;min-width:max-content}
.id-fmt-group:first-child{border-inline-start:0}.id-fmt-title{position:absolute;top:3px;inset-inline-start:8px;font-size:10px;color:#667085;font-weight:700;white-space:nowrap}
.id-fmt-select{height:32px;min-width:132px;border:1px solid var(--line);border-radius:4px;background:#fff;padding:0 8px;font:12px Arial;color:var(--text)}
.id-fmt-size{height:32px;width:62px;border:1px solid var(--line);border-radius:4px;background:#fff;padding:0 6px;font:12px Arial;color:var(--text)}
.id-fmt-btn{height:32px;min-width:32px;border:1px solid transparent;border-radius:4px;background:#fff;color:#344054;display:inline-grid;place-items:center;padding:0 7px;font:600 12px Arial;cursor:pointer;white-space:nowrap}
.id-fmt-btn:hover:not(:disabled){background:#f2f4f7;border-color:#d0d5dd}.id-fmt-btn.on{background:#eaecf0;border-color:#98a2b3;color:#101828}.id-fmt-btn:disabled{opacity:.4;cursor:not-allowed}.id-fmt-btn.danger:hover:not(:disabled){background:#fff1f0;color:#b42318;border-color:#fda29b}.id-fmt-btn span{font-size:9px;margin-inline-start:1px}
.id-color-tool{height:32px;min-width:34px;border:1px solid transparent;border-radius:4px;background:#fff;display:grid;place-items:center;position:relative;cursor:pointer;font-weight:700}.id-color-tool:hover{background:#f2f4f7;border-color:#d0d5dd}.id-color-tool input[type=color]{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.id-color-tool:after{content:"";position:absolute;bottom:2px;left:6px;right:6px;height:3px;background:var(--id-color-preview,#344054);border-radius:2px}
.id-page{touch-action:none}.invoice-designer-page.view-only .id-page{touch-action:auto}
.id-props .inp,.id-props input{font-family:Arial,sans-serif}.id-props [data-label^="en."],.id-props [data-custom-text="en"]{direction:ltr;unicode-bidi:isolate;text-align:left}
@media(max-width:1100px){.id-formatbar{top:0;position:relative}.id-fmt-group{padding-inline:6px}.id-fmt-select{min-width:110px}}
@media(max-width:900px){.id-formatbar{display:none}}
/* v3.20.54 — Bilingual contracts + hybrid visual contract designer */
.contract-bilingual-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;min-width:0}.contract-bilingual-grid>.fg{min-width:0}.contract-lang-seg{margin-inline-start:4px}.contract-clauses-view p[dir="ltr"]{text-align:left}.contract-clauses-view p[dir="rtl"]{text-align:right}
.contract-designer-page{max-width:none!important;padding-bottom:0!important;overflow:hidden}.cd-topbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:0 0 8px;padding:7px 8px;border:1px solid var(--line);background:#fff;border-radius:6px;position:sticky;top:0;z-index:45}.cd-template{width:280px;max-width:46vw}.cd-status{display:flex;align-items:center;gap:8px;min-height:32px;padding:4px 8px;border:1px solid var(--line);border-radius:6px;background:var(--bg2,#f8fafc);font-size:12px;margin-bottom:8px}.cd-status .warn{color:#a65a00;font-weight:600}.cd-layout{display:grid;grid-template-columns:230px minmax(620px,1fr) 285px;gap:8px;height:calc(100vh - 196px);min-height:620px;direction:rtl}.cd-panel{background:#fff;border:1px solid var(--line);border-radius:6px;min-height:0;display:flex;flex-direction:column;overflow:hidden}.cd-panel-head{min-height:42px;padding:8px 10px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:8px}.cd-panel-head span{font-size:11px;color:var(--mut)}.cd-scroll{overflow:auto;padding:8px;min-height:0}.cd-elements details{border-bottom:1px solid #eef1f5;padding-bottom:8px;margin-bottom:8px}.cd-elements summary{cursor:pointer;padding:5px 2px;font-size:12px;color:#475467}.cd-el-btn{width:100%;height:34px;display:flex;align-items:center;justify-content:space-between;gap:8px;border:0;border-bottom:1px solid #edf0f4;background:#fff;font:600 12px Arial;cursor:pointer;padding:0 7px;color:var(--text);text-align:right}.cd-el-btn small,.cd-flow-main small{font-size:10px;color:var(--mut);font-weight:400}.cd-el-btn:hover,.cd-el-btn.active,.cd-flow-row.active{background:var(--pri-soft)}.cd-flow-row{display:grid;grid-template-columns:minmax(0,1fr) 30px 30px;align-items:center;border-bottom:1px solid #edf0f4}.cd-flow-main{height:38px;border:0;background:transparent;text-align:right;font:600 12px Arial;display:flex;flex-direction:column;justify-content:center;padding:0 7px;min-width:0}.cd-flow-row>button:not(.cd-flow-main){width:28px;height:28px;border:0;background:transparent;cursor:pointer}.cd-flow-row>button:disabled{opacity:.25;cursor:default}.cd-workspace{position:relative;min-width:0;background:#e7ebf0;border:1px solid var(--line);border-radius:6px;overflow:hidden;direction:ltr}.cd-canvas-scroll{position:absolute;inset:0;overflow:auto;padding:28px 40px 70px;display:flex;justify-content:center;align-items:flex-start}.cd-page{position:relative;width:630px;height:891px;flex:0 0 auto;background:#fff;box-shadow:0 3px 18px rgba(17,24,39,.15);overflow:hidden;font-family:Arial,sans-serif;color:#1c2533;touch-action:none}.cd-page:before{content:"A4 · 210 × 297 mm";position:absolute;top:3px;left:6px;font-size:8px;color:#98a2b3;z-index:200;pointer-events:none}.cd-safe{position:absolute;inset:42px;border:1px dashed rgba(27,58,138,.22);pointer-events:none}.cd-fixed{position:absolute;border:1px dashed transparent;box-sizing:border-box;cursor:move;user-select:none;z-index:30;overflow:visible}.cd-fixed:hover{border-color:rgba(27,58,138,.3)}.cd-fixed.selected{border:1.5px solid #1b66c9;box-shadow:0 0 0 2px rgba(27,102,201,.08)}.cd-fixed-content{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;white-space:pre-line;font-size:11px;padding:3px;box-sizing:border-box}.cd-el-tag{display:none;position:absolute;top:-17px;right:0;background:#1b66c9;color:#fff;font-size:8px;line-height:14px;padding:1px 4px;border-radius:3px;white-space:nowrap}.cd-fixed.selected .cd-el-tag{display:block}.cd-resize{position:absolute;width:10px;height:10px;left:-6px;bottom:-6px;background:#fff;border:2px solid #1b66c9;border-radius:2px;cursor:nwse-resize}.cd-logo-demo{font-weight:700;font-size:18px;color:#17365D}.cd-flow{position:absolute;left:42px;right:42px;bottom:34px;overflow:hidden;display:flex;flex-direction:column;gap:7px;z-index:10}.cd-flow-block{border:1px solid #aeb7c4;page-break-inside:avoid}.cd-flow-block.selected{box-shadow:0 0 0 2px rgba(27,102,201,.14);border-color:#1b66c9}.cd-flow-block header{background:#17365D;color:#fff;font-weight:700;font-size:10px;padding:4px 6px}.cd-flow-block>div{font-size:9px;line-height:1.35;white-space:pre-line;padding:6px;min-height:20px}.cd-sign-demo{margin-top:auto;border:1px solid #aeb7c4;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:8px;font-size:9px}.cd-sign-demo b{grid-column:1/-1}.cd-props h3{font-size:12px;margin:7px 0;color:#475467}.cd-props .contract-style-groups{display:block}.cd-props .contract-style-group{margin-bottom:8px;border-top:1px solid var(--line);padding-top:6px}
@media(max-width:1100px){.cd-layout{grid-template-columns:190px minmax(540px,1fr) 240px}.cd-template{width:220px}}
@media(max-width:900px){.contract-bilingual-grid{grid-template-columns:1fr}.contract-designer-page{overflow:visible}.cd-topbar{position:static}.cd-layout{grid-template-columns:1fr;height:auto;min-height:0}.cd-elements,.cd-props{display:none}.cd-workspace{height:calc(100dvh - 245px);min-height:520px}.cd-canvas-scroll{padding:18px 20px 60px}.cd-template{max-width:100%;width:100%}}
/* v3.20.54 — Invoice Designer hierarchy refinement from video QA */
.id-manage-menu{position:relative}.id-manage-menu>summary{list-style:none;cursor:pointer}.id-manage-menu>summary::-webkit-details-marker{display:none}.id-manage-pop{position:absolute;top:calc(100% + 5px);inset-inline-start:0;z-index:120;width:210px;padding:6px;background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:0 10px 28px rgba(17,24,39,.13);display:flex;flex-direction:column;gap:3px}.id-manage-pop .btn{justify-content:flex-start;width:100%}.id-lib-group{margin:0 0 5px;border-bottom:1px solid #edf0f4;padding-bottom:4px}.id-lib-group>summary{cursor:pointer;padding:6px 5px;font-size:12px;font-weight:700;color:#475467}.id-lib-group>summary:hover{background:var(--pri-soft)}
.contract-line-bilingual label:not(:first-child){margin-top:5px}.contract-line-bilingual textarea{min-height:52px}

/* v3.20.55 — document designer polish */
.id-panel-head .icon-btn{min-width:30px;height:30px}.id-element.selected{border-color:#0f62b7;box-shadow:0 0 0 3px rgba(15,98,183,.14),0 2px 10px rgba(15,98,183,.12)}
.invoice-designer-page.id-collapse-elements .id-elements{display:none}.invoice-designer-page.id-collapse-elements .id-layout{grid-template-columns:minmax(620px,1fr) 270px}
.invoice-designer-page.id-collapse-props .id-props{display:none}.invoice-designer-page.id-collapse-props .id-layout{grid-template-columns:230px minmax(620px,1fr)}
.invoice-designer-page.id-collapse-elements.id-collapse-props .id-layout{grid-template-columns:minmax(620px,1fr)}
.id-preview-data{position:relative}.id-preview-data>summary{list-style:none;cursor:pointer}.id-preview-data>summary::-webkit-details-marker{display:none}.id-preview-data-pop{position:absolute;z-index:40;top:calc(100% + 6px);left:0;width:min(350px,80vw);padding:10px;background:#fff;border:1px solid var(--line);border-radius:7px;box-shadow:0 10px 30px rgba(17,24,39,.16)}
.id-element.protected-zone{box-shadow:inset 0 0 0 1px rgba(198,128,0,.55);background-image:linear-gradient(rgba(255,191,71,.07),rgba(255,191,71,.07))}.id-element.collision-zone{border-color:#c72f2f!important;box-shadow:0 0 0 3px rgba(199,47,47,.16)!important;background-image:linear-gradient(rgba(199,47,47,.06),rgba(199,47,47,.06))}.id-signature-hint{position:absolute;left:8px;bottom:8px;z-index:520;padding:4px 7px;border-radius:5px;background:#fff7e1;border:1px solid #e6c168;color:#7b5500;font-size:10px;font-weight:700;pointer-events:none}.id-signature-hint.bad{background:#fff0f0;border-color:#e5a2a2;color:#a22525}

.ct-token-field{display:grid;gap:6px}.ct-token-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:11px;color:var(--mut)}.ct-token-editor{min-height:92px;height:auto!important;white-space:pre-wrap;overflow:auto;line-height:1.55;padding:9px 10px}.ct-token-editor:focus{outline:2px solid rgba(15,98,183,.18);border-color:#4b8ac9}.ct-token-chip{display:inline-flex;align-items:center;vertical-align:baseline;margin:0 2px;padding:1px 6px;border-radius:999px;background:#e8f2ff;border:1px solid #a9c9ec;color:#174d83;font:600 11px Arial;direction:rtl;unicode-bidi:isolate;user-select:none}.ct-edit-lang{display:flex;align-items:center;gap:8px;margin-bottom:10px;padding:7px 9px;border:1px solid #dbe3ec;border-radius:6px;background:#f8fafc;font-size:12px}

.contract-doc .ct-sec.legal{font-weight:700;letter-spacing:0}.contract-style-group select[data-style-path="layout.section_style"]{font-weight:600}

.pdf-preview-holder,.pdf-a4-preview{background:#eef1f4!important;color-scheme:light}.pdf-native-frame{background:#f2f4f7!important;color-scheme:light}.pdf-preview-wrap{background:#eef1f4;border-radius:7px}.pdf-local-toolbar{background:#fff}

@media(max-width:1250px){.invoice-designer-page.id-collapse-elements .id-layout{grid-template-columns:minmax(560px,1fr) 240px}.invoice-designer-page.id-collapse-props .id-layout{grid-template-columns:205px minmax(560px,1fr)}}
@media(max-width:900px){.invoice-designer-page .id-elements,.invoice-designer-page .id-props,.contract-designer-page .cd-elements,.contract-designer-page .cd-props{display:none!important}.invoice-designer-page .id-layout,.contract-designer-page .cd-layout{grid-template-columns:1fr!important}.contract-designer-page:before,.invoice-designer-page:before{content:'المعاينة متاحة على الهاتف. التعديل المتقدم أفضل على الكمبيوتر أو الجهاز اللوحي الأفقي.';display:block;margin-bottom:8px;padding:8px 10px;border:1px solid #e5c879;background:#fff8e5;border-radius:6px;font-size:12px;color:#684d00}}
.contract-designer-page.view-only [data-save],.contract-designer-page.view-only [data-legal]{display:none!important}.contract-designer-page.view-only .cd-page{touch-action:auto}.contract-designer-page.view-only .cd-fixed{cursor:default}

/* v3.20.57 — Contracts deep repair + Shared Document Designer */
.document-designer-page{--dd-panel:258px;--dd-props:304px;--dd-gap:8px}.contract-designer-page{max-width:none!important;padding-bottom:0!important;overflow:hidden}.contract-designer-page .contract-tabs{margin-bottom:6px}.cd-commandbar,.cd-formatbar{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;border:1px solid var(--line);background:#fff}.cd-commandbar{min-height:44px;padding:5px 7px;border-radius:6px 6px 0 0;position:sticky;top:0;z-index:72}.cd-formatbar{min-height:38px;padding:3px 7px;border-top:0;border-radius:0 0 6px 6px;margin-bottom:7px;overflow-x:auto;position:sticky;top:44px;z-index:71}.cd-command-main,.cd-fmt-group{display:flex;align-items:center;gap:5px;min-width:0}.cd-command-main:first-child{flex:1}.cd-template{width:min(300px,32vw)}.cd-save-state{font-size:11px;color:#667085;white-space:nowrap}.cd-save-state.warn{color:#9a5a00;font-weight:700}.cd-zoom{width:76px}.cd-fmt-group{padding-inline:5px;border-inline-end:1px solid #e7eaf0}.cd-fmt-group:last-child{border:0}.cd-fmt-group .inp{height:30px;min-height:30px;font-size:12px;width:118px}.cd-fmt-group .cd-fmt-size{width:62px}.cd-formatbar .id-fmt-btn{height:30px;min-width:30px}.cd-formatbar .id-fmt-btn.on{background:#eaf2ff;border-color:#9fc0ed;color:#0f62b7}.cd-formatbar .muted-tools{opacity:.52}.cd-menu-check,.cd-menu-grid{min-height:34px;display:flex;align-items:center;gap:7px;padding:4px 7px;font-size:12px}.cd-menu-grid .inp{height:30px;min-height:30px;margin-inline-start:auto;width:88px}.cd-mobile-note{margin-bottom:6px;padding:7px 9px;border:1px solid #e5c879;background:#fff8e5;border-radius:6px;font-size:12px;color:#684d00}
.cd-layout{display:grid;grid-template-columns:var(--dd-panel) minmax(620px,1fr) var(--dd-props);gap:var(--dd-gap);height:calc(100vh - 178px);min-height:590px;direction:rtl}.cd-panel{background:#fff;border:1px solid var(--line);border-radius:6px;min-height:0;display:flex;flex-direction:column;overflow:hidden}.cd-panel-head{min-height:38px;padding:5px 7px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:6px}.cd-panel-head span{font-size:10px;color:var(--mut);max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cd-panel-tabs{display:flex;align-items:center;gap:2px}.cd-panel-tabs button{height:29px;padding:0 8px;border:0;border-radius:4px;background:transparent;font:600 11px Arial;cursor:pointer;color:#667085}.cd-panel-tabs button.on{background:#eef4fb;color:#17365D}.cd-panel-search{padding:5px 7px;border-bottom:1px solid #eef1f5}.cd-element-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;align-items:center}.cd-panel-search .inp{height:32px;min-height:32px;font-size:12px}.cd-element-search-row .btn{height:32px;min-height:32px;white-space:nowrap}.cd-scroll{overflow:auto;padding:6px;min-height:0}.cd-elements details{border-bottom:1px solid #eef1f5;padding-bottom:5px;margin-bottom:5px}.cd-elements summary{cursor:pointer;padding:5px 2px;font-size:11px;color:#475467;font-weight:700}.cd-el-btn{width:100%;min-height:32px;display:flex;align-items:center;justify-content:space-between;gap:6px;border:0;border-bottom:1px solid #f0f2f5;background:#fff;font:600 11px Arial;cursor:pointer;padding:0 6px;color:var(--text);text-align:right}.cd-el-btn small,.cd-flow-main small{font-size:9px;color:var(--mut);font-weight:400}.cd-el-btn:hover,.cd-el-btn.active,.cd-flow-row.active,.cd-layer-row.active{background:var(--pri-soft)}.cd-flow-row{display:grid;grid-template-columns:minmax(0,1fr) 27px 27px;align-items:center;border-bottom:1px solid #f0f2f5}.cd-flow-main{min-height:36px;border:0;background:transparent;text-align:right;font:600 11px Arial;display:flex;flex-direction:column;justify-content:center;padding:0 6px;min-width:0}.cd-flow-row>button:not(.cd-flow-main){width:26px;height:26px;border:0;background:transparent;cursor:pointer}.cd-flow-row>button:disabled{opacity:.25;cursor:default}.cd-layer-row{display:grid;grid-template-columns:minmax(0,1fr) 31px;align-items:center;border-bottom:1px solid #edf0f4;min-height:35px}.cd-layer-main{border:0;background:transparent;display:flex;align-items:center;gap:7px;min-width:0;min-height:34px;text-align:right;cursor:pointer;font:11px Arial}.cd-layer-icon{width:20px;text-align:center;color:#667085}.cd-layer-main b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cd-layer-row>.icon-btn{width:28px;height:28px;min-width:28px}
.cd-workspace{position:relative;min-width:0;background:#e4e8ed;border:1px solid var(--line);border-radius:6px;overflow:hidden;direction:ltr}.cd-canvas-scroll{position:absolute;inset:20px 0 0 20px;overflow:auto;padding:22px 44px 70px;display:block;text-align:center}.cd-page-shell{position:relative;display:inline-block;vertical-align:top;transition:width .12s,height .12s}.cd-page{position:absolute;inset:0 auto auto 0;width:630px;height:891px;background-color:#fff;box-shadow:0 3px 18px rgba(17,24,39,.16);overflow:hidden;font-family:Arial,sans-serif;color:#1c2533;touch-action:none;text-align:initial}.cd-page:before{content:"A4 · 210 × 297 mm";position:absolute;top:3px;left:6px;font-size:8px;color:#98a2b3;z-index:900;pointer-events:none}.cd-ruler{position:absolute;background:#f8fafc;color:#98a2b3;z-index:32;font:8px Arial;pointer-events:none;overflow:hidden}.cd-ruler-h{left:20px;right:0;top:0;height:20px;border-bottom:1px solid #cfd5dd}.cd-ruler-v{left:0;top:20px;bottom:0;width:20px;border-right:1px solid #cfd5dd}.cd-ruler-h span{position:absolute;top:2px;border-left:1px solid #b9c1ca;height:18px;padding-left:2px}.cd-ruler-v span{position:absolute;left:2px;border-top:1px solid #b9c1ca;width:18px;padding-top:1px;writing-mode:vertical-rl}.cd-safe{position:absolute;inset:42px;border:1px dashed rgba(27,58,138,.18);pointer-events:none;z-index:2}.cd-fixed{position:absolute;border:1px dashed transparent;box-sizing:border-box;cursor:move;user-select:none;overflow:visible}.cd-fixed:hover{border-color:rgba(27,58,138,.3)}.cd-fixed.selected{border:1.5px solid #1b66c9;box-shadow:0 0 0 2px rgba(27,102,201,.08)}.cd-fixed-content{width:100%;height:100%;display:grid;align-items:center;overflow:hidden;white-space:pre-line;padding:3px;box-sizing:border-box;font:inherit;color:inherit;text-align:inherit;direction:inherit;line-height:1.2}.cd-el-tag{display:none;position:absolute;top:-17px;right:0;background:#1b66c9;color:#fff;font-size:8px;line-height:14px;padding:1px 4px;border-radius:3px;white-space:nowrap}.cd-fixed.selected .cd-el-tag{display:block}.cd-resize{position:absolute;width:10px;height:10px;left:-6px;bottom:-6px;background:#fff;border:2px solid #1b66c9;border-radius:2px;cursor:nwse-resize}.cd-logo-demo{font-weight:700;font-size:18px;color:#17365D}.cd-flow{position:absolute;left:42px;right:42px;overflow:hidden;display:flex;flex-direction:column;gap:6px;z-index:5}.cd-flow-block{border:1px solid #aeb7c4;break-inside:avoid}.cd-flow-block.selected{box-shadow:0 0 0 2px rgba(27,102,201,.14);border-color:#1b66c9}.cd-flow-block header{font-weight:700;font-size:10px;padding:4px 6px}.cd-flow-block>div{font-size:9px;line-height:1.35;white-space:pre-line;padding:5px 6px;min-height:18px}.cd-sign-demo{margin-top:auto;border:1px solid #aeb7c4;display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:7px;font-size:9px}.cd-sign-demo b{grid-column:1/-1}.cd-footer-preview{position:absolute;left:42px;right:42px;bottom:16px;z-index:40;display:flex;align-items:center;padding:2px 5px;box-sizing:border-box}.cd-footer-preview.selected{outline:2px solid rgba(27,102,201,.35);outline-offset:2px}.cd-footer-cols{width:100%;display:grid;gap:5px;align-items:center}.cd-footer-cols.cols-1{grid-template-columns:1fr}.cd-footer-cols.cols-2{grid-template-columns:repeat(2,1fr)}.cd-footer-cols.cols-3{grid-template-columns:repeat(3,1fr)}.cd-footer-cols>div{overflow:hidden;text-overflow:ellipsis;white-space:pre-line}.cd-guides{position:absolute;inset:0;pointer-events:none;z-index:850}.cd-guide{position:absolute;background:#d42a74;display:block}.cd-guide.v{top:0;bottom:0;width:1px}.cd-guide.h{left:0;right:0;height:1px}
.cd-props h3{font-size:11px;margin:5px 0 6px;color:#475467}.cd-prop-section{padding:2px 1px 8px;margin-bottom:7px;border-bottom:1px solid #edf0f4}.cd-props .id-prop-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.cd-props .id-prop{display:flex;flex-direction:column;gap:3px;margin:0 0 6px;min-width:0}.cd-props .id-prop>span{font-size:10px;color:#667085}.cd-props .id-prop .inp{min-height:34px;height:34px;font-size:12px}.cd-props textarea.inp{height:auto!important;min-height:54px!important;resize:vertical}.cd-check-row{display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px;margin:4px 0 7px}.cd-check-row .chk{font-size:11px;margin:0}.cd-accordion{border-top:1px solid #e7eaf0;padding-top:5px;margin-top:5px}.cd-accordion>summary{cursor:pointer;font-size:11px;font-weight:700;color:#475467;padding:5px 2px}.cd-props .contract-style-groups{display:block}.cd-props .contract-style-group{margin-bottom:7px;border-top:1px solid var(--line);padding-top:5px}.cd-props .contract-style-group .fgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.cd-props .contract-style-group .fg{margin:0}.cd-props .contract-style-group .inp{min-height:34px;height:34px}.cd-custom-actions{display:flex;gap:6px;align-items:center;margin-top:4px}.cd-footer-tokenbar{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:7px}.cd-footer-tokenbar .chip{font-size:9px;cursor:pointer}.cd-html-preview{background:#e4e8ed;padding:18px;max-height:76vh;overflow:auto;text-align:center}.cd-preview-paper{display:inline-block;position:relative;width:630px;height:891px}.cd-preview-paper .cd-page{position:relative;display:block}.cd-collapse-elements .cd-elements{display:none}.cd-collapse-elements .cd-layout{grid-template-columns:minmax(620px,1fr) var(--dd-props)}.cd-collapse-props .cd-props{display:none}.cd-collapse-props .cd-layout{grid-template-columns:var(--dd-panel) minmax(620px,1fr)}.cd-collapse-elements.cd-collapse-props .cd-layout{grid-template-columns:minmax(620px,1fr)}
@media(min-width:1800px){.document-designer-page{--dd-panel:270px;--dd-props:318px}.cd-layout{height:calc(100vh - 174px)}.cd-canvas-scroll{padding-top:26px}}
@media(max-width:1250px){.document-designer-page{--dd-panel:210px;--dd-props:250px}.cd-layout{grid-template-columns:var(--dd-panel) minmax(540px,1fr) var(--dd-props)}.cd-template{width:220px}.cd-commandbar{flex-wrap:wrap}.cd-formatbar{top:52px}.cd-command-main:first-child{flex-basis:100%}.cd-layout{height:calc(100vh - 216px)}.cd-collapse-elements .cd-layout{grid-template-columns:minmax(540px,1fr) var(--dd-props)}.cd-collapse-props .cd-layout{grid-template-columns:var(--dd-panel) minmax(540px,1fr)}}
@media(max-width:900px){.contract-designer-page{overflow:visible}.contract-designer-page .contract-tabs{overflow-x:auto}.cd-commandbar{position:static;display:block}.cd-command-main{flex-wrap:wrap;margin:3px 0}.cd-command-main:first-child{display:grid;grid-template-columns:1fr 1fr}.cd-template{width:100%;max-width:none;grid-column:1/-1}.cd-formatbar{display:none}.cd-layout,.cd-collapse-elements .cd-layout,.cd-collapse-props .cd-layout,.cd-collapse-elements.cd-collapse-props .cd-layout{grid-template-columns:1fr!important;height:auto;min-height:0}.cd-elements,.cd-props{display:none!important}.cd-workspace{height:calc(100dvh - 280px);min-height:500px}.cd-canvas-scroll{padding:16px 20px 60px}.contract-designer-page.view-only [data-save],.contract-designer-page.view-only [data-publish],.contract-designer-page.view-only [data-legal]{display:none!important}.contract-designer-page.view-only .cd-page{touch-action:auto}.contract-designer-page.view-only .cd-fixed{cursor:default}}
\n/* v3.20.57 — Contracts document integrity / Bidi / logo */
.cd-fixed[data-cd-fix="logo"] .cd-fixed-content{padding:0;place-items:center}.cd-logo-img{display:block;width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain;object-position:center center;flex:0 0 auto}.cd-asset-warning{height:100%;display:flex;align-items:center;justify-content:center;border:1px dashed #b42318;color:#b42318;background:#fff3f2;font-size:11px;padding:4px;text-align:center}.contract-ltr-cell{direction:ltr;unicode-bidi:isolate;text-align:left}.contract-rtl-cell{direction:rtl;unicode-bidi:isolate;text-align:right}.contract-bi{unicode-bidi:isolate}.pdf-preview-error .btn{margin-top:8px}.contract-missing-translation{font-size:11px;color:#b54708}.contract-signatory-card .fgrid{align-items:end}\n
/* v3.20.57 — contracts bilingual source/fallback evidence */
.ct-lang-fallback{margin-top:4px;padding:5px 7px;border-inline-start:3px solid currentColor;border-radius:4px;line-height:1.35}

/* v3.20.62 — Contract Designer QA/interaction cleanup */
.contract-designer-page,.contract-designer-page .cd-scroll,.contract-designer-page .cd-canvas-scroll{overscroll-behavior:contain}
.contract-designer-page .cd-scroll,.contract-designer-page .cd-canvas-scroll{scrollbar-gutter:stable}
.contract-designer-page .cd-formatbar .id-fmt-btn:disabled,.contract-designer-page .cd-formatbar .inp:disabled{opacity:.32;cursor:not-allowed;pointer-events:none}
.contract-designer-page .cd-formatbar .id-color-tool.disabled{opacity:.32;cursor:not-allowed}
.contract-designer-page .cd-context-label{min-width:96px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 10px Arial;color:#475467;padding:0 6px;border-inline-end:1px solid #e7eaf0}
.contract-designer-page .cd-layer-row{grid-template-columns:minmax(0,1fr) 31px 31px}
.contract-designer-page .cd-layer-row.dragging{opacity:.45}
.contract-designer-page .cd-layer-row.drag-over{box-shadow:inset 0 2px 0 #1b66c9;background:#eef4fb}
.contract-designer-page .cd-layer-row>.icon-btn.on{background:#fff4d6;border-color:#e5c879}
.contract-designer-page .cd-flow-block>div{font-size:inherit;line-height:inherit;padding:inherit}
.contract-designer-page .cd-props .cd-prop-section:last-child{border-bottom:0}
@media(max-width:1250px){.contract-designer-page .cd-context-label{display:none}}

/* =====================================================================
   v3.20.70 — ALMAS UI typography standard (final layer, presentation only)
   body ~16 · page title 17 · section title 15 · side menu 13.5 · labels 12 · inputs 12.5 · tables 12.5/12
   ===================================================================== */
html body{font-size:16px}
html body .top h1,html body .top .top-crumb:not(:empty)+h1{font-size:17px;line-height:1.3}
html body .card-h h2,html body .card-h h3,html body .sec-t,html body .home-cash-card .card-h h2,html body .home-duo .card-h h2{font-size:15px}
html body .nav a,html body .nav .sec .items a{font-size:13.5px}
html body .nav .grp,html body .nav .sec>button{font-size:12px}
html body .fg>label,html body .lbl,html body .filters .fg>label,html body .filters .lbl,html body .ed-row .fg>label{font-size:12px}
html body .inp,html body input.inp,html body select.inp,html body textarea.inp{font-size:12.5px}
html body table.t,html body .t td{font-size:12.5px}
html body .t th{font-size:12px}
html body .btn.xs{font-size:12px}
/* zebra rows everywhere (white / light grey) */
html body .t tbody tr:nth-child(even)>td{background:var(--card-2,#f6f8fb)}
html body .t tbody tr:hover>td{background:var(--hover,#eef3fb)}
/* short identifiers, dates and money never break inside a cell */
html body .t td .ltr,html body .t td b.ltr,html body .t td.n,html body .t .num{white-space:nowrap}
/* long service names: one line with ellipsis (full text stays in the job card) */
html body .t td .svc{display:inline-block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
/* phones: 16px inputs stop iOS Safari from zooming the page on focus */
@media (max-width:640px){
  html body .inp,html body input.inp,html body select.inp,html body textarea.inp{font-size:16px}
  html body .t td .svc{max-width:none;white-space:normal}
}
html body .t td.clip,html body .t .clip{max-width:170px}
html body .t td,html body .t th{padding-inline:8px}
/* follow-up table: 11 columns must fit a laptop screen without sideways scrolling */
@media (min-width:641px) and (max-width:1700px){
  html body .fu-card .t td,html body .fu-card .t th{padding-inline:5px;font-size:12px}
  html body .fu-card .t td .small{font-size:11px}
  html body .fu-card .t .clip{max-width:105px}
  html body .fu-card .t td.hd{min-width:96px}
}
@media (min-width:641px) and (max-width:1300px){html body .fu-card .t .hide-sm{display:none}}
html body .t td .svc{unicode-bidi:plaintext}

/* =====================================================================
   v3.20.70 — Invoice & contract designers: one workspace layout
   command bar · format bar · [elements | A4 canvas | properties]
   ===================================================================== */
html body .invoice-designer-page,html body .contract-designer-page{--dw-left:clamp(190px,15vw,236px);--dw-right:clamp(240px,19vw,296px);--dw-rail:40px}
html body .invoice-designer-page:before,html body .contract-designer-page:before{content:none!important;display:none!important}
/* command bar */
html body .id-topbar,html body .cd-commandbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:6px 8px;min-height:46px}
html body .id-top-main,html body .cd-command-main{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;min-width:0}
html body .id-top-main:first-child,html body .cd-command-main:first-child{flex:1 1 auto}
html body .id-topbar .btn,html body .cd-commandbar .btn{height:34px;white-space:nowrap}
html body .id-topbar select.id-template-select,html body .cd-commandbar select.cd-template{width:clamp(170px,18vw,270px)!important;flex:0 1 auto;min-width:0}
html body .id-topbar select.id-zoom,html body .cd-commandbar select.cd-zoom{width:84px!important;flex:0 0 84px}
html body .cd-save-state,html body .id-statusbar [data-save-state]{white-space:nowrap}
/* segmented language switch (buttons) */
html body .seg button{height:32px;padding:0 12px;border:0;border-inline-start:1px solid var(--line);background:var(--card,#fff);color:var(--mut);font:700 12.5px Arial,sans-serif;cursor:pointer;white-space:nowrap}
html body .seg button:first-child{border-inline-start:0}
html body .seg button.on{background:var(--pri);color:#fff}
html body .seg{display:inline-flex;border:1px solid var(--line);border-radius:7px;overflow:hidden;flex:0 0 auto}
/* format bar: one line, scrolls sideways when the screen is narrow */
html body .id-formatbar,html body .cd-formatbar{display:flex;flex-wrap:nowrap;align-items:center;gap:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
html body .id-formatbar>*,html body .cd-formatbar>*{flex:0 0 auto}
html body .id-fmt-title{font-size:11px;white-space:nowrap}
/* invoice status line */
html body .id-statusbar{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:5px 8px;min-height:40px}
html body .id-statusbar>*{flex:0 0 auto;white-space:nowrap}
html body .id-statusbar select[data-template-language]{width:auto!important;min-width:150px}
html body .id-statusbar .chk{margin:0;font-size:12px}
/* three-column workspace that always fits */
html body .invoice-designer-page .id-layout,html body .contract-designer-page .cd-layout{grid-template-columns:var(--dw-left) minmax(0,1fr) var(--dw-right)!important}
html body .invoice-designer-page.id-collapse-elements .id-layout,html body .contract-designer-page.cd-collapse-elements .cd-layout{grid-template-columns:var(--dw-rail) minmax(0,1fr) var(--dw-right)!important}
html body .invoice-designer-page.id-collapse-props .id-layout,html body .contract-designer-page.cd-collapse-props .cd-layout{grid-template-columns:var(--dw-left) minmax(0,1fr) var(--dw-rail)!important}
html body .invoice-designer-page.id-collapse-elements.id-collapse-props .id-layout,html body .contract-designer-page.cd-collapse-elements.cd-collapse-props .cd-layout{grid-template-columns:var(--dw-rail) minmax(0,1fr) var(--dw-rail)!important}
html body .id-workspace,html body .cd-workspace{min-width:0}
/* a collapsed panel stays as a thin rail with its open button (it used to disappear with no way back) */
html body .invoice-designer-page.id-collapse-elements .id-elements,html body .invoice-designer-page.id-collapse-props .id-props,
html body .contract-designer-page.cd-collapse-elements .cd-elements,html body .contract-designer-page.cd-collapse-props .cd-props{display:flex!important;overflow:hidden}
html body .invoice-designer-page.id-collapse-elements .id-elements>:not(.id-panel-head),html body .invoice-designer-page.id-collapse-props .id-props>:not(.id-panel-head),
html body .contract-designer-page.cd-collapse-elements .cd-elements>:not(.cd-panel-head),html body .contract-designer-page.cd-collapse-props .cd-props>:not(.cd-panel-head){display:none!important}
html body .id-collapse-elements .id-elements .id-panel-head,html body .id-collapse-props .id-props .id-panel-head,
html body .cd-collapse-elements .cd-elements .cd-panel-head,html body .cd-collapse-props .cd-props .cd-panel-head{flex-direction:column;justify-content:flex-start;padding:6px 2px;border:0;height:100%}
html body .id-collapse-elements .id-elements .id-panel-head>b,html body .id-collapse-elements .id-elements .id-panel-head .row>span,
html body .id-collapse-props .id-props .id-panel-head>b,html body .id-collapse-props .id-props .id-panel-head .row>span,
html body .cd-collapse-elements .cd-elements .cd-panel-tabs,html body .cd-collapse-props .cd-props .cd-panel-head>:not([data-panel-toggle]){display:none!important}
html body .id-collapse-elements .id-elements [data-panel-toggle],html body .cd-collapse-elements .cd-elements [data-panel-toggle]{transform:scaleX(-1)}
html body .id-collapse-props .id-props [data-panel-toggle],html body .cd-collapse-props .cd-props [data-panel-toggle]{transform:scaleX(-1)}
html body .id-panel-head .row{display:flex;align-items:center;gap:6px;white-space:nowrap}
html body .id-panel-head>b,html body .cd-panel-head b{font-size:13px;white-space:nowrap}
/* panel content */
html body .id-elements button,html body .cd-el-btn{font-size:12px}
html body .id-props .id-prop>span,html body .cd-props .id-prop>span{font-size:11.5px}
html body .id-props .inp,html body .cd-props .inp{font-size:12.5px}
html body .id-props h3,html body .cd-props h3{font-size:12.5px;font-weight:700;color:var(--txt,#1c2533);margin:10px 0 6px;padding-top:8px;border-top:1px solid var(--line-2,#edf0f4)}
/* canvas */
html body .id-canvas-scroll,html body .cd-canvas-scroll{scrollbar-gutter:stable}
html body .cd-asset-warning{border:1px dashed #aab4c2!important;color:#667085!important;background:#f8fafc!important;font-size:10px;line-height:1.3;flex-direction:column}
html body .cd-asset-warning small{font-size:8px;color:#98a2b3}
/* reference-layout number/date strip inside the contract canvas (was unstyled and clipped) */
html body .cd-reference-meta{width:100%;height:100%;border-collapse:collapse;table-layout:fixed;font-size:9px;direction:inherit}
html body .cd-reference-meta td{border:1px solid #9aa6b5;padding:1px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
html body .cd-reference-meta td:nth-child(odd){background:#eef2f7;font-weight:700;color:#344054;width:16%}
/* full-size preview dialog: the A4 page is scaled to the dialog */
html body .id-html-preview{overflow:auto;background:#e7ebf0;padding:12px;border-radius:6px;display:flex;justify-content:center}
html body .id-html-preview>*{flex:0 0 auto;box-shadow:0 2px 12px rgba(17,24,39,.15)}
/* contract section tabs never overlap on phones */
html body .contract-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:2px;scrollbar-width:none}
html body .contract-tabs>*{flex:0 0 auto;white-space:nowrap}
/* laptops: tighter panels */
@media (max-width:1366px){html body .invoice-designer-page,html body .contract-designer-page{--dw-left:200px;--dw-right:250px}}
/* phones / small tablets: preview only, one column, page fits the width */
@media (max-width:899px){
  html body .invoice-designer-page .id-layout,html body .contract-designer-page .cd-layout{grid-template-columns:minmax(0,1fr)!important;height:auto;min-height:0}
  html body .invoice-designer-page .id-elements,html body .invoice-designer-page .id-props,html body .contract-designer-page .cd-elements,html body .contract-designer-page .cd-props,
  html body .invoice-designer-page.id-collapse-elements .id-elements,html body .invoice-designer-page.id-collapse-props .id-props,html body .contract-designer-page.cd-collapse-elements .cd-elements,html body .contract-designer-page.cd-collapse-props .cd-props{display:none!important}
  html body .invoice-designer-page[class] .id-layout,html body .contract-designer-page[class] .cd-layout{grid-template-columns:minmax(0,1fr)!important}
  html body .id-topbar select.id-template-select,html body .cd-commandbar select.cd-template{width:100%!important;flex:1 1 100%}
  html body .id-top-main,html body .cd-command-main{flex-wrap:wrap}
  html body .id-workspace,html body .cd-workspace{min-height:70vh}
}
html body .id-statusbar .seg,html body .cd-commandbar .seg,html body .id-statusbar .seg.compact,html body .cd-commandbar .seg.compact{width:auto!important;max-width:max-content;flex:0 0 auto!important;display:inline-flex}
html body .id-statusbar .seg span{height:30px;padding:0 12px;font-size:12.5px}
html body .id-statusbar details.id-preview-data{flex:0 0 auto}
html body .id-elements .id-panel-head .row>span{display:none}html body .id-panel-head,html body .cd-panel-head{flex-wrap:nowrap}
html body .cd-block-list{margin:0 0 6px;padding-inline-start:18px;display:grid;gap:3px}
/* v3.20.71 invoices: bulk print dialog */
html body .inv-bulk .fgrid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:10px}
html body .inv-bulk-apply{border:1px solid var(--line);border-radius:8px;padding:12px;background:var(--card-2,#f8fafc);display:grid;gap:8px}
html body .inv-bulk-apply h3{font-size:14px;margin:0}
html body .inv-bulk-apply .btn{justify-self:start}
html body .action-more-menu select[data-print-tpl]{width:100%;max-width:280px}
@media (max-width:640px){html body .inv-bulk .fgrid{grid-template-columns:1fr}}
html body .id-texts-t td{vertical-align:top;padding:5px 6px}
html body .id-texts-t td:first-child{width:22%;white-space:nowrap}
html body .id-texts-t .inp{width:100%}
html body .id-texts h3{font-size:13px;margin:12px 0 6px}
/* v3.20.73 quotations */
html body .qt-head{grid-template-columns:repeat(3,minmax(0,1fr))}
html body .qt-row{display:grid;grid-template-columns:minmax(0,1fr) 80px 120px 120px 36px;gap:8px;align-items:start;padding:6px 0;border-bottom:1px solid var(--line-2)}
html body .qt-row-h{font-size:12px;color:var(--mut);font-weight:700;border-bottom:1px solid var(--line);padding-top:0}
html body .qt-row textarea.inp{min-height:38px;resize:vertical}
html body .qt-line{padding-top:9px;text-align:left;font-variant-numeric:tabular-nums}
html body .qt-sum{display:grid;gap:6px;max-width:340px;margin-inline-start:auto;margin-top:12px}
html body .qt-sum>div{display:flex;justify-content:space-between;align-items:center;gap:10px}
html body .qt-sum .inp{width:140px}
html body .qt-sum .due{border-top:2px solid var(--pri);padding-top:6px;font-size:15px}
html body .qt-status{width:auto!important;min-width:150px}
@media (max-width:640px){
  html body .qt-head{grid-template-columns:1fr}
  html body .qt-head .fg{grid-column:auto!important}
  html body .qt-row{grid-template-columns:1fr 1fr 36px;grid-template-areas:"d d d" "q p x" "l l l"}
  html body .qt-row>textarea{grid-area:d}html body .qt-row>[data-k=qty]{grid-area:q}html body .qt-row>[data-k=unit_price]{grid-area:p}html body .qt-row>[data-line]{grid-area:l}html body .qt-row>[data-del]{grid-area:x}
  html body .qt-row-h{display:none}
  html body .qt-sum{max-width:none}
}
/* v3.20.74 quote conversion links */
html body .qt-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 10px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--ok-soft,#eef8f1);font-size:12.5px}
html body .qt-links .chip{text-decoration:none}
/* v3.20.74 insights */
html body .kpi .s .trend{display:inline-block;font-weight:700;direction:ltr;unicode-bidi:isolate}
html body .kpi .s .trend.up{color:var(--ok,#1f8a4c)}
html body .kpi .s .trend.down{color:var(--bad,#c0392b)}
html body .bars .bar.neg i{background:var(--bad,#c0392b);opacity:.75}
html body .aging-kpis>.kpi{min-width:0}
html body .aging-kpis .v,html body .aging-kpis .s{overflow-wrap:anywhere}
html body .card-h .grow{flex:1}
html body .card-h [data-picksum]{font-size:12px;margin-inline-end:8px}
html body input.cm-pick{width:16px;height:16px}
/* v3.20.74 self-test */
html body a.st-link{text-decoration:none;color:inherit;display:block}
html body details.st-sec>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px}
html body details.st-sec>summary::-webkit-details-marker{display:none}
html body .st-msg{white-space:pre-line;overflow-wrap:anywhere;font-size:12px}
/* v3.20.76 supplier bills */
html body .bill-row{display:grid;grid-template-columns:28px minmax(0,2fr) minmax(0,1.6fr) 150px 34px;gap:8px;align-items:end;padding:6px 0;border-bottom:1px solid var(--line-2)}
@media (max-width:760px){html body .bill-row{grid-template-columns:24px minmax(0,1fr) 34px}html body .bill-row .fg{grid-column:2/3}}
/* ===== v3.20.78 data-entry layer (forms.js) ===== */
html body .fg>label .req{color:var(--bad);font-weight:800;margin-inline-start:3px}
html body .inp.is-invalid,html body .erp-date-display.is-invalid,html body select.inp.is-invalid,html body textarea.inp.is-invalid{border-color:var(--bad)!important;box-shadow:0 0 0 2px rgba(201,48,44,.12)!important;background:#fffafa}
html body .ferr{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;color:var(--bad);font-size:11.5px;font-weight:600;line-height:1.5;margin-top:2px}
html body .ferr-act{border:0;background:none;color:var(--pri);font:inherit;font-weight:700;text-decoration:underline;cursor:pointer;padding:0}
html body .draft-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
html body .draft-bar .btns{display:flex;gap:6px}
html body .sa-total{display:none}
@media (max-width:640px){
  html body .sticky-actions{flex-wrap:wrap;align-items:center;box-shadow:0 -4px 14px rgba(16,24,40,.08);padding:8px 10px}
  html body .sticky-actions .sa-total{display:flex;flex-direction:column;line-height:1.2;margin-inline-end:auto;min-width:0}
  html body .sticky-actions .sa-total span{font-size:11px;color:var(--mut)}
  html body .sticky-actions .sa-total b{font-size:15px;color:var(--pri);white-space:nowrap}
  html body .sticky-actions .btn{min-height:40px}
  html body .sticky-actions [data-save-new] span,html body .sticky-actions [data-again] span{font-size:12px}
}
/* one colour per status everywhere */
html body .chip.void{background:var(--line-2);color:var(--mut);text-decoration:line-through;text-decoration-thickness:1px}
html body .chip.draft{background:transparent;color:var(--mut);border:1px dashed var(--mut-2)}
html body .chip.acc{background:var(--acc-soft);color:#b35f00}
html body td.ltr-cell,html body dd.ltr-cell,html body b.ltr-cell{direction:ltr;unicode-bidi:isolate;white-space:nowrap}
/* suggestion list: role, phone and balance under the name */
html body .sg-o{display:flex;flex-direction:column;gap:1px;white-space:normal}
html body .sg-o .sg-n{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .sg-meta{font-size:11px;color:var(--mut);font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .sg-meta b{color:var(--txt);font-weight:600}
html body .sg-o.on .sg-meta,html body .sg-o:hover .sg-meta{color:var(--pri)}
html body .sg-add{color:var(--pri);font-weight:700;cursor:pointer;border-radius:7px}
html body .sg-add:hover{background:var(--pri-soft)}
html body .dupe-list{display:grid;gap:6px;margin-top:6px}
html body .dupe-list>div{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
/* document history */
html body .hist{display:grid;gap:10px}
html body .hist-i{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--card)}
html body .hist-h{display:flex;gap:10px;flex-wrap:wrap;align-items:baseline;margin-bottom:6px;font-size:13px}
html body .hist-t{font-size:12px}
html body .hist-t td{padding:4px 8px;vertical-align:top}
html body .hist-from{color:var(--bad);text-decoration:line-through;text-decoration-color:rgba(201,48,44,.35)}
html body .hist-to{color:var(--ok);font-weight:600}
/* «المزيد» menu (phones) */
html body .more-wrap{position:relative}
html body .more-btn .ic{width:14px;height:14px}
html body .more-menu{position:absolute;inset-inline-end:0;top:calc(100% + 6px);z-index:60;background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:var(--sh-lg);padding:6px;display:flex;flex-direction:column;gap:4px;min-width:200px}
html body .more-menu>.btn,html body .more-menu>a{justify-content:flex-start;width:100%}
/* page titles wrap between words on phones instead of being cut */
@media (max-width:640px){html body .top-title h1,html body .top h1{white-space:normal;overflow:visible;text-overflow:clip;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:normal;overflow-wrap:normal;line-height:1.25}}
html body .card-h h2{overflow-wrap:normal;word-break:normal}
/* voucher type tiles */
html body .vt-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:6px}
html body .vt-tile{display:flex;flex-direction:column;align-items:flex-start;gap:2px;border:1px solid var(--line);border-radius:10px;background:var(--card);padding:8px 10px;cursor:pointer;font:inherit;text-align:start;color:var(--txt);min-height:52px}
html body .vt-tile b{font-size:12.5px}
html body .vt-tile small{font-size:10.5px;color:var(--mut);line-height:1.3}
html body .vt-tile:hover{border-color:var(--pri-2)}
html body .vt-tile.on{border-color:var(--pri);background:var(--pri-soft);box-shadow:0 0 0 2px rgba(42,79,176,.15)}
html body .vt-tile.on b{color:var(--pri)}
html body .bal-ba{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:center;border:1px solid var(--line);border-radius:10px;padding:8px 12px;background:var(--bg-2,#f8fafc);font-size:12.5px}
html body .bal-ba .k{font-size:11px;color:var(--mut)}
html body .bal-ba b{display:block}
html body .bal-ba .arr{color:var(--mut)}
/* multi-invoice receipt */
html body .alloc-row{display:grid;grid-template-columns:24px minmax(0,1fr) 120px 150px;gap:8px;align-items:center;padding:6px 0;border-bottom:1px solid var(--line-2)}
html body .alloc-row .inp{height:34px;min-height:34px}
@media (max-width:640px){html body .alloc-row{grid-template-columns:24px minmax(0,1fr) 120px}html body .alloc-row .rem{display:none}}
html body .alloc-sum{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-weight:700;padding-top:8px}
/* journal balance indicator */
html body .jbal{display:flex;align-items:center;gap:10px;border-radius:10px;padding:10px 14px;font-weight:700;border:1px solid}
html body .jbal.ok{background:var(--ok-soft);color:var(--ok);border-color:rgba(15,138,79,.25)}
html body .jbal.bad{background:var(--bad-soft);color:var(--bad);border-color:rgba(201,48,44,.25)}
html body .jbal.idle{background:var(--line-2);color:var(--mut);border-color:var(--line)}
html body .jbal .ic{width:18px;height:18px}
/* credit warning on a customer */
html body .credit-warn{margin-top:4px}
/* invoice job picker filters */
html body .jp-tools{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-end;margin-bottom:8px}
html body .jp-tools .fg{min-width:130px}
/* container paste check */
html body .ct-check{display:flex;flex-wrap:wrap;gap:4px;max-height:120px;overflow:auto;margin-top:6px}
html body .ct-check span{font-size:11px;border-radius:6px;padding:1px 6px;direction:ltr}
html body .ct-check .okc{background:var(--ok-soft);color:var(--ok)}html body .ct-check .badc{background:var(--bad-soft);color:var(--bad)}html body .ct-check .dupc{background:var(--warn-soft);color:var(--warn)}
/* settings: grouped tabs */
html body .set-groups{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
html body .set-groups a{padding:8px 14px;border-radius:10px;border:1px solid var(--line);background:var(--card);font-weight:700;font-size:13px;color:var(--txt);text-decoration:none}
html body .set-groups a.on{background:var(--pri);border-color:var(--pri);color:#fff}
html body .tabs.sub{margin-bottom:12px}
/* quote: services picker */
html body .qt-svc{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
html body .qt-svc select{max-width:320px}
/* parties: duplicates */
html body .dup-g{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin-bottom:10px;background:var(--card)}
html body .dup-g .dup-p{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center;padding:6px 0;border-top:1px solid var(--line-2)}
/* body overflow-x:hidden made <body> a scroll container, so «sticky» bars (form actions) never stuck on phones; clip keeps the same look without that */
@supports (overflow:clip){html body{overflow-x:clip;overflow-y:visible}}
@media (max-width:640px){
  html body .sticky-actions,html body #jobf .sticky-actions{bottom:0;display:flex;flex-wrap:nowrap;gap:6px;padding:8px 10px calc(8px + env(safe-area-inset-bottom));margin-inline:-8px}
  html body .sticky-actions>a.btn:not(.pri){display:none}
  html body .sticky-actions .sa-total{flex:1 1 auto}
  html body .sticky-actions [data-save-new] span,html body .sticky-actions [data-again] span{display:none}
  html body .sticky-actions [data-save-new],html body .sticky-actions [data-again]{flex:0 0 auto;padding-inline:10px}
  html body .sticky-actions button[type=submit]{flex:0 1 auto;white-space:nowrap}
  html body .sticky-actions:not(:has(.sa-total)) button[type=submit]{flex:1 1 auto}
}
@media (max-width:640px){html body #jobf .sticky-actions .btn{width:auto}html body #jobf .sticky-actions .btn.pri{grid-column:auto}}
/* ===== v3.20.79 fixes (QA on the phone screenshots) ===== */
/* job summary: amounts never break inside the number («$300 ,000. 00») */
html body #jobf .job-summary-primary .v,html body #jobf .job-summary-net .v,html body #jobf .job-summary-metric b,html body #jobf .job-summary-metric .v{overflow-wrap:normal;word-break:keep-all;white-space:nowrap;direction:ltr;unicode-bidi:isolate;text-align:start}
html body #jobf .job-summary-primary .eq,html body #jobf .job-summary-net .eq{white-space:nowrap}
@media (max-width:640px){
  html body #jobf .job-summary-card .sumbar{grid-template-columns:minmax(0,1fr)!important}
  html body #jobf .job-summary-hero{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  html body #jobf .job-summary-primary .v,html body #jobf .job-summary-net .v{font-size:clamp(15px,4.6vw,19px)}
}
@media (max-width:360px){html body #jobf .job-summary-hero{grid-template-columns:minmax(0,1fr)}}
/* phone cards: rows grow with their text (a fixed 38px row height made the description run over «مدين») */
@media (max-width:820px){
  html body .tbl-wrap.cards td,html body .tbl-wrap.force-cards-mobile td{height:auto!important;min-height:0;align-items:flex-start}
  html body .tbl-wrap.cards td.stmt-desc,html body .tbl-wrap.force-cards-mobile td.stmt-desc{flex-wrap:wrap}
  html body .tbl-wrap.cards td.stmt-desc>*,html body .tbl-wrap.force-cards-mobile td.stmt-desc>*{flex:1 1 60%;min-width:0;text-align:start;line-height:1.5;overflow-wrap:anywhere}
  html body .tbl-wrap.cards td .doc-a,html body .tbl-wrap.force-cards-mobile td .doc-a{text-decoration:none;border-bottom:0;color:var(--pri);font-weight:700}
}
/* the «not registered» hint is replaced by the inline error, not shown twice */
html body .fg:has(.ferr) [data-new-hint]{display:none!important}
/* phone top bar: one «⋮» button holds the page actions so the title keeps its room */
@media (max-width:640px){
  html body #ptools .more-wrap .more-btn{width:38px;padding:0;justify-content:center}
  html body #ptools .more-wrap .more-btn span{display:none}
  html body #ptools>.btn:not(.more-btn) span,html body #ptools>a.btn span{display:none}
  html body .more-menu .btn span{display:inline!important}
}
html body .more-btn svg{stroke-width:3.4}

/* v3.20.80: share value + pay currency on one row */
.val-cur{display:flex;gap:4px;align-items:stretch;direction:rtl}
.val-cur>input{flex:1 1 auto;min-width:0}
.val-cur>select{flex:0 0 auto;width:auto;min-width:54px;padding-inline:6px 18px}
@media (min-width:1101px){.ed-shares .ed-row{grid-template-columns:28px 88px minmax(140px,1.3fr) 108px minmax(150px,.9fr) 124px minmax(115px,1fr) minmax(95px,.78fr) 34px}}
/* v3.20.80 whitespace: USD job → rate + location + project + report status fill one row (no lone field on its own row) */
@media (min-width:1101px){#jobf .job-info-card .fgrid:has(#rateBox:not(.hidden))>.fg:has([name="report_status"]){grid-column:span 2}}
/* v3.20.85 contract designer WYSIWYG: renderer HTML at the canvas scale (3 px/mm vs CSS 3.7795 px/mm) */
.cd-zoom{zoom:.79375;width:100%;box-sizing:border-box;align-self:stretch;flex:0 0 auto}
.cd-fixed-content.cd-srv{display:block;padding:0;overflow:visible;white-space:normal;line-height:normal;text-align:initial;align-items:initial}
.cd-srv-flow{white-space:normal;line-height:normal;text-align:initial}
.cd-srv-block{display:block;position:relative;cursor:pointer;border:0}
.cd-srv-block.selected{outline:2px solid #1b66c9;outline-offset:1px}
.cd-srv-empty{height:0;outline:1px dashed #c3cad5}
.cd-mark{position:absolute;object-fit:contain;pointer-events:none;z-index:6}
.cd-footer-srv{display:block;padding:0;align-items:initial}
.cd-srv-flow table{border-collapse:collapse}
.cd-footer-srv table{height:auto!important}
/* isolate renderer HTML from the app's table/typography rules: only its own inline styles (as in mPDF) apply */
.cd-page .cd-zoom :is(div,span,b,strong,i,em,u,small,p,br,img,table,thead,tbody,tfoot,tr,td,th,colgroup,col),.id-page .cd-zoom :is(div,span,b,strong,i,em,u,small,p,br,img,table,thead,tbody,tfoot,tr,td,th,colgroup,col){all:revert}
.cd-page .cd-zoom table,.id-page .cd-zoom table{border-collapse:collapse}
.cd-page .cd-zoom td,.cd-page .cd-zoom th,.id-page .cd-zoom td,.id-page .cd-zoom th{padding:.1em}
.cd-page .cd-zoom table,.id-page .cd-zoom table{table-layout:auto!important}
.cd-page .cd-zoom td,.id-page .cd-zoom td{white-space:normal!important}
.id-element .id-content.id-srv{display:block!important;border:0!important;padding:0!important;gap:0!important;overflow:visible!important;background:transparent!important;white-space:normal;line-height:normal;text-align:initial;height:auto}
.id-srv-root{font-family:Arial,sans-serif;font-size:10pt;color:#1c2533;font-weight:400;font-style:normal;text-decoration:none;line-height:normal}
.id-element .id-content.id-srv>.cd-zoom{display:block!important;padding:0!important;margin:0!important;grid-template-columns:none!important;gap:0!important;border:0!important;background:transparent!important}
/* the PDF stylesheet's helper classes and mPDF cell alignment (cells follow the table's text-align, never an outer box) */
:is(.id-page,.cd-page) .cd-zoom table:not([style*="text-align"]) td{text-align:start}
:is(.id-page,.cd-page) .cd-zoom table th{text-align:center}
:is(.id-page,.cd-page) .cd-zoom table td.c,:is(.id-page,.cd-page) .cd-zoom .c{text-align:center}
:is(.id-page,.cd-page) .cd-zoom table td.r,:is(.id-page,.cd-page) .cd-zoom .r{text-align:right}
:is(.id-page,.cd-page) .cd-zoom table td.l,:is(.id-page,.cd-page) .cd-zoom .l{text-align:left}
:is(.id-page,.cd-page) .cd-zoom .b{font-weight:bold}:is(.id-page,.cd-page) .cd-zoom .mut{color:#6b7686}:is(.id-page,.cd-page) .cd-zoom .pri{color:#1b3a8a}:is(.id-page,.cd-page) .cd-zoom table td.num{text-align:left;white-space:nowrap}
/* ===== v3.20.86 مصمم المستندات البسيط — المعاينة هي الـPDF الحقيقي ===== */
.dd-page{font-family:Arial,sans-serif}
.dd-top{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 10px;background:#fff;border:1px solid #e3e8ef;border-radius:10px;margin-bottom:8px;position:sticky;top:0;z-index:5}
.dd-top .dd-sp{flex:1}
.dd-top .inp{width:auto;min-width:0;height:32px;font-size:12.5px}
.dd-top .dd-tpl{max-width:240px}
.dd-state{font-size:12px;color:#667085;white-space:nowrap}.dd-state.warn{color:#b54708}
.dd-seg{display:inline-flex;width:max-content;max-width:100%;border:1px solid #d0d7e2;border-radius:8px;overflow:hidden;background:#fff}
.dd-seg button{border:0;background:transparent;padding:6px 11px;font:inherit;font-size:12.5px;cursor:pointer;color:#344054;min-height:30px}
.dd-seg button+button{border-inline-start:1px solid #e3e8ef}
.dd-seg button.on{background:#1b3a8a;color:#fff}
.dd-seg button:disabled{opacity:.5;cursor:default}
.dd-note{background:#fff8e6;border:1px solid #f5d38a;color:#7a4b00;border-radius:8px;padding:7px 10px;font-size:12.5px;margin-bottom:8px}
.dd-body{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:10px;align-items:start}
.dd-stage{position:relative;background:#e9edf3;border-radius:10px;padding:12px;min-height:420px;overflow:auto}
.dd-pages{display:flex;flex-direction:column;align-items:center;gap:12px}
.dd-sheet{position:relative;background:#fff;box-shadow:0 1px 6px rgba(16,24,40,.18);line-height:0}
.dd-sheet canvas{display:block}
.dd-ov{position:absolute;inset:0;direction:ltr}
.dd-box{position:absolute;box-sizing:border-box;border:1px dashed rgba(27,58,138,.0);cursor:move;touch-action:none;border-radius:2px}
.dd-box:hover{border-color:rgba(27,58,138,.55);background:rgba(27,58,138,.04)}
.dd-box.ro{cursor:pointer}
.dd-box.sel{border:1.5px solid #1b66c9;background:rgba(27,102,201,.06);z-index:5}
.dd-tag{position:absolute;top:-17px;inset-inline-start:-1px;font:11px/16px Arial,sans-serif;background:#1b66c9;color:#fff;padding:0 5px;border-radius:3px 3px 0 0;white-space:nowrap;display:none;direction:rtl}
.dd-box.sel .dd-tag,.dd-box:hover .dd-tag{display:block}
.dd-rz{position:absolute;right:-5px;bottom:-5px;width:10px;height:10px;background:#1b66c9;border:2px solid #fff;border-radius:2px;cursor:nwse-resize;display:none}
.dd-box.sel .dd-rz{display:block}
.dd-busy{position:sticky;top:6px;z-index:4;margin:0 auto 6px;width:max-content;background:#1b3a8a;color:#fff;font-size:12px;padding:3px 10px;border-radius:12px}
.dd-panel{display:flex;flex-direction:column;gap:8px;position:sticky;top:56px;max-height:calc(100vh - 80px);overflow:auto}
.dd-card{background:#fff;border:1px solid #e3e8ef;border-radius:10px;padding:10px}
.dd-card h3{margin:0 0 8px;font-size:13.5px;color:#1c2533}
.dd-sel-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}
.dd-sel-head b{font-size:14px}
.dd-hint{font-size:12px;color:#667085;line-height:1.6}
.dd-f{display:flex;flex-direction:column;gap:3px;font-size:12px;color:#475467;min-width:0}
.dd-f .inp{height:32px;font-size:12.5px}
.dd-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.dd-row4{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}
.dd-step{display:flex;gap:3px}.dd-step .inp{text-align:center;padding:0 2px;min-width:0}.dd-step .btn{min-width:28px;padding:0}
.dd-color{padding:2px;height:32px}
.dd-geo summary{font-size:12px;color:#475467;cursor:pointer}
.dd-switch{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;cursor:pointer}
.dd-list{display:flex;flex-direction:column}
.dd-li{display:flex;align-items:center;gap:6px;padding:3px 4px;border-radius:6px}
.dd-li:nth-child(even){background:#f7f9fc}
.dd-li.on{background:#e8f0fc}
.dd-li-name{border:0;background:none;font:inherit;font-size:12.5px;text-align:start;flex:1;cursor:pointer;padding:3px 0;color:#1c2533}
.dd-mv{display:inline-flex;gap:2px;margin-inline-start:auto}.dd-mv .icon-btn{width:24px;height:24px;font-size:10px}
.dd-li .dd-switch{flex:1}
@media (max-width:980px){.dd-body{grid-template-columns:1fr}.dd-panel{position:static;max-height:none}.dd-top{position:static}.dd-stage{padding:6px}}
/* v3.20.87 cloud backup — easy Google Drive link */
.cloud-easy{border:1px solid #cfe0f5;background:#f6f9fe;border-radius:10px;padding:10px 12px}
.cloud-easy>summary{cursor:pointer;font-size:13.5px}.cloud-easy[open]>summary{margin-bottom:8px}.cloud-easy>*+*:not(summary){margin-top:8px}
.cloud-steps{margin:0;padding-inline-start:20px;display:flex;flex-direction:column;gap:10px;font-size:13px}
.cloud-steps>li{padding-inline-start:2px}.cloud-steps>li::marker{font-weight:bold;color:#1b3a8a}
.cloud-steps .btns{margin-top:5px}.cloud-steps textarea{margin-top:6px;font-size:11px;width:100%}
.cloud-sub{margin:6px 0 0;padding-inline-start:18px;line-height:1.75}
.cloud-link{display:flex;gap:6px;margin-top:5px}.cloud-link .inp{flex:1 1 auto;min-width:0}
@media (max-width:640px){.cloud-link{flex-direction:column}}
/* v3.20.89 cloud: OneDrive sign-in code */
.cloud-pick{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.seg-pick{display:inline-flex;border:1px solid #d0d7e2;border-radius:8px;overflow:hidden;background:#fff}
.seg-pick button{border:0;background:transparent;padding:6px 14px;font:inherit;font-size:12.5px;cursor:pointer;color:#344054}
.seg-pick button+button{border-inline-start:1px solid #e3e8ef}.seg-pick button.on{background:#1b3a8a;color:#fff}
.ms-code{margin-top:6px;display:flex;flex-direction:column;gap:8px;align-items:flex-start;background:#fff;border:1px solid #d9e3f2;border-radius:8px;padding:10px}
.ms-code-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ms-code-val{font:bold 22px/1.2 Arial,sans-serif;letter-spacing:2px;color:#1b3a8a;background:#eef3fb;padding:4px 10px;border-radius:6px}
.ms-code[hidden]{display:none}
/* v3.20.92 QA: the search icon overlapped the first words of the placeholder (a later .page .inp rule reset the padding) */
.page .search input.inp:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
.modal .search input.inp:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]){padding-inline-start:34px}
/* v3.20.92 QA: mobile cards — a second line under the card title (English name, sub-text) sat on top of the title */
.tbl-wrap.cards td.hd{flex-wrap:wrap}
.tbl-wrap.cards td.hd>div,.tbl-wrap.cards td.hd>small{flex:1 0 100%;min-width:0}
/* v3.20.92 QA: touch targets on phones (PDF zoom buttons, designer section arrows) */
@media (max-width:760px){
  .pdf-local-toolbar [data-pdf-zoom]{min-width:34px;min-height:32px}
  .dd-mv .icon-btn{width:32px;height:32px;font-size:12px}
}
/* v3.20.94 contracts QA */
.tabs a.active,.tabs button.active{border-bottom-color:var(--pri);background:transparent;color:var(--pri);font-weight:700}
.dl>div>span:first-child{display:block;font-size:12px;color:var(--mut);margin-bottom:3px;font-weight:400}
.dl>div>span:first-child+b{display:block;font-weight:600;font-size:13.5px;line-height:1.6;word-break:break-word;text-align:start}
.contract-clauses-view p{white-space:pre-line}
@media (max-width:640px){body:not(.view-classic) .tbl-wrap.cards td[dir=auto]{direction:rtl}}
/* v3.20.94: on phones a long document number in the page title was cut from its start (…CT-2026-0001) — let it use two lines */
@media (max-width:640px){#ptitle{white-space:normal;word-break:normal;overflow-wrap:anywhere;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}}
/* v3.20.95 contract stamp/signature placement on the real PDF page */
.ctm-ctl{display:grid;gap:8px}
.ctm-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--bg2,#f8fafc)}
.ctm-row>b{min-width:52px;align-self:center;font-size:13px}
.ctm-row label{display:flex;flex-direction:column;gap:3px;font-size:12px;color:var(--mut);flex:1 1 90px;min-width:84px}
.ctm-row .ctm-size{flex:2 1 160px}
.ctm-row .ctm-size input{width:100%}
.ctm-stage{background:#e9edf2;border-radius:10px;padding:10px;display:flex;justify-content:center;min-height:200px;overflow:auto}
.ctm-loading{align-self:center;color:var(--mut);font-size:13px}
.ctm-page{position:relative;background:#fff;box-shadow:0 1px 6px rgba(0,0,0,.15);flex:none}
.ctm-page canvas{display:block}
.ctm-pagewrap{display:flex;flex-direction:column;align-items:center;gap:4px}
.ctm-pagelabel{font-size:11.5px;color:var(--mut)}
.ctm-note{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;line-height:1.7;color:#1e3a5f;background:#eef4fb;border-radius:8px;padding:8px 10px}
.ctm-note svg{flex:none;margin-top:3px}
@media (max-width:640px){.ctm-row{gap:6px;padding:6px 8px}.ctm-row label{min-width:70px}.ctm-row .ctm-size{flex-basis:100%}}
.ctm-layer{position:absolute;inset:0}
.ctm-mark{position:absolute;outline:1.5px dashed rgba(37,99,235,.75);outline-offset:0;cursor:grab;touch-action:none;user-select:none;border-radius:3px}
.ctm-mark.on{cursor:grabbing;outline-style:solid;background:rgba(37,99,235,.06)}
.ctm-mark img{width:100%;height:100%;object-fit:contain;pointer-events:none;display:block}
/* v3.20.98 — name picker: long names wrap from the start edge instead of being clipped on both sides */
html body .sg-o{align-items:stretch!important;justify-content:center}
html body .sg-o .sg-n{display:block;white-space:normal!important;overflow:hidden;text-overflow:clip;overflow-wrap:anywhere;text-align:start;unicode-bidi:plaintext;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.35}
html body .sg-o .sg-meta{text-align:start}
