/* پایهٔ مستقل از قالب */
@font-face{font-family:"Vazirmatn";src:url("fonts/vazirmatn.woff2") format("woff2");font-weight:100 900;font-display:swap}
.erp,body.agah-invoice-sheet{--c-primary:#12304A;--c-brand:#1F6F5C;--c-secondary:#1F6F5C;--c-accent:#C8963E;--c-bg:#F5F8F7;--c-surface:#FFFFFF;--c-text:#1B2B38;--c-muted:#5B6B77;--c-line:#E1E8E6;--c-tint:color-mix(in srgb,var(--c-brand) 8%,#fff);--radius:14px;--shell:1180px;--font:"Vazirmatn",Tahoma,sans-serif}
body.agah-erp-shell{margin:0;padding:16px;background:#F5F8F7;color:#1B2B38;font-family:"Vazirmatn",Tahoma,sans-serif;line-height:1.9;font-size:16px;-webkit-font-smoothing:antialiased}
.erp,.erp *,.erp *::before,.erp *::after{box-sizing:border-box}
.erp img,.erp svg{max-width:100%}
.erp a{color:var(--c-brand);text-decoration:none}
.erp a:hover{color:var(--c-primary)}
.erp :focus-visible{outline:3px solid var(--c-accent);outline-offset:2px}
.erp h1,.erp h2,.erp h3,.erp h4{color:var(--c-primary);line-height:1.5;margin:0 0 .6em;font-weight:800}
.erp p{margin:0 0 1em}
.erp input[type=text],.erp input[type=search],.erp input[type=email],.erp textarea{width:100%;padding:.6rem .8rem;border:1px solid var(--c-line);border-radius:10px;font-family:inherit;font-size:1rem}
.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.erp .btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;padding:.7rem 1.5rem;border-radius:12px;font-weight:700;border:2px solid transparent;cursor:pointer;font-family:inherit;font-size:1rem;transition:background .2s,color .2s,border-color .2s,box-shadow .2s;line-height:1.5}
.erp .btn-primary{background:var(--c-brand);color:#fff}
.erp .btn-primary:hover{background:var(--c-primary);color:#fff}
.erp .btn-outline{border-color:var(--c-line);color:var(--c-primary);background:#fff}
.erp .btn-outline:hover{border-color:var(--c-brand);color:var(--c-brand)}
.erp .btn-sm{padding:.45rem 1.1rem;font-size:.92rem}
.erp .notice{padding:.8rem 1rem;border-radius:10px;margin-bottom:1rem;font-weight:700}
.erp .notice.ok{background:var(--c-tint);color:var(--c-brand)}
.erp .notice.bad{background:#fdecea;color:#b3261e}
.erp .btn-danger{background:#b3261e;color:#fff;border-color:#b3261e}
.erp .btn-danger:hover{background:#8c1d18;color:#fff}
.erp .erp-danger{border:1px solid #e8b4ae}
.erp [hidden]{display:none!important}
/* فاز ۲ بستهٔ ۶: مسیر صفحه، کاشی دسته، دکمهٔ سه‌صفر لمسی، ماشین‌حساب و چیدمان پاسخ‌گوی فرم‌ها (UX-01..07) */
.erp .erp-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;margin:.25rem 0 .75rem;font-size:.92rem}
.erp .erp-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:.6rem}
.erp .erp-tile{display:block;padding:.9rem;border:1px solid var(--c-line,#d5dde3);border-radius:10px;background:#fff;text-decoration:none;font-weight:700}
.erp .erp-zeros{display:none;margin-inline-start:.3rem;padding:.35rem .6rem;border:1px solid #748b85;border-radius:8px;background:#fff;color:#18313b;font:inherit}
@media (pointer:coarse){.erp .erp-zeros{display:inline-block}}
.erp .erp-calc-open{position:fixed;inset-inline-start:12px;bottom:12px;z-index:50}
.erp .erp-calc{position:fixed;inset-inline-start:12px;bottom:56px;z-index:51;width:min(320px,calc(100vw - 24px));background:#fff;border:1px solid #748b85;border-radius:12px;padding:.75rem;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.erp .erp-calc-head{display:flex;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:.5rem}
.erp .erp-calc-head button{border:0;background:none;font-size:1.3rem;cursor:pointer;color:#18313b}
.erp .erp-calc input[data-calc-expr]{width:100%;box-sizing:border-box;font-size:1.1rem;padding:.4rem}
.erp .erp-calc output{display:block;min-height:1.6em;margin:.35rem 0;font-weight:700;direction:ltr;text-align:left}
.erp .erp-calc-keys{display:grid;grid-template-columns:repeat(4,1fr);gap:.3rem;margin-bottom:.5rem}
.erp .erp-calc-keys button{padding:.55rem 0;border:1px solid #c9d3d8;border-radius:8px;background:#f6f8f9;font:inherit;font-size:1.05rem;cursor:pointer}
.erp form,.erp .erp-actions{max-width:100%}
.erp .erp-actions{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.erp .erp-form button,.erp .erp-inline-form button{max-width:100%;white-space:normal}
.erp .erp-scroll,.erp .erp-card>.erp-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.erp table.erp-table{max-width:100%}
.erp .erp-card{min-width:0;overflow-wrap:anywhere}
.erp .erp-form input,.erp .erp-form select,.erp .erp-form textarea{max-width:100%;box-sizing:border-box}
@media (max-width:480px){.erp .erp-form label{display:block;width:100%}.erp .erp-inline-form{display:inline-flex;flex-wrap:wrap;gap:.3rem}.erp table.erp-table{display:block;overflow-x:auto}}
/* سامانهٔ حسابداری آگاه — ظاهر صفحهٔ /accounting/ (رنگ‌ها از متغیرهای سفارشی‌ساز قالب) */
.erp{max-width:var(--shell,1180px);margin:24px auto;padding:0 16px;font-family:var(--font,Tahoma,sans-serif)}
.erp-top{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:16px}
.erp-top h1{margin:0;font-size:1.4rem;flex:1}
.erp-card{background:#fff;border:1px solid var(--c-line,#e1e8e6);border-radius:var(--radius,14px);padding:20px;margin-bottom:16px}
.erp-card h2,.erp-card h3{margin-top:0}
.erp-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-bottom:16px}
.erp-grid .erp-card{margin:0}
.big{font-size:1.5rem;font-weight:700;margin:.2em 0}
.muted{color:var(--c-muted,#5b6b77);font-size:.9em}
.erp-nav{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.erp-nav a{padding:8px 14px;border-radius:999px;border:1px solid var(--c-line,#e1e8e6);background:#fff;text-decoration:none;color:var(--c-primary,#12304a)}
.erp-nav a.on{background:var(--c-brand,#1f6f5c);color:#fff;border-color:var(--c-brand,#1f6f5c)}
.erp-list{list-style:none;margin:0;padding:0}.erp-list li{padding:10px 0;border-bottom:1px solid var(--c-line,#e1e8e6)}
.erp-scroll{overflow-x:auto}
.erp-table{width:100%;border-collapse:collapse;font-size:.95em}
.erp-table th,.erp-table td{padding:8px 10px;border-bottom:1px solid var(--c-line,#e1e8e6);text-align:right;white-space:nowrap}
.erp-table th{background:var(--c-bg,#f5f8f7)}
.erp-table tr.lv1 td{font-weight:700;background:#fafcfb}.erp-table tr.lv2 td{font-weight:600}
.erp-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;align-items:end}
.erp-form label{display:flex;flex-direction:column;gap:4px;font-size:.9em}
.erp input,.erp select{padding:9px 10px;border:1px solid var(--c-line,#cfd9d6);border-radius:8px;font:inherit;background:#fff}
form.inline{display:inline}
.erp-flash{padding:12px 16px;border-radius:10px;margin-bottom:16px}
.erp-flash.ok,.erp-ok{background:#e8f5ef;color:#14563f}.erp-flash.err,.erp-err{background:#fdecec;color:#8a1f1f}
.erp-err,.erp-ok{padding:8px 12px;border-radius:8px}
.erp-login{max-width:420px;margin-inline:auto}
.erp-login input[type=text],.erp-login input[type=password]{width:100%}
/* فرم‌ها، اسناد و امنیت مراحل ۱ تا ۳؛ فونت از فایل محلی قالب به ارث می‌رسد. */
.erp{--erp-border:#dce5e3;line-height:1.8}.erp .erp-nav{display:flex;flex-wrap:wrap;gap:.5rem}.erp .erp-card{min-width:0}.erp .erp-filter,.erp .erp-inline-form{display:flex;flex-wrap:wrap;gap:.75rem;align-items:end;margin:1rem 0}.erp label{display:flex;flex-direction:column;gap:.3rem}.erp label:has(input[type=checkbox]){flex-direction:row;align-items:center}.erp input,.erp select,.erp textarea{max-width:100%;font:inherit;border:1px solid var(--erp-border);border-radius:8px;padding:.55rem;background:#fff;color:#162f38}.erp input:focus-visible,.erp select:focus-visible,.erp button:focus-visible,.erp a:focus-visible{outline:3px solid #2876a8;outline-offset:3px}.erp input[type=checkbox]{width:1.15rem;height:1.15rem}.erp .erp-scroll{overflow:auto;max-width:100%}.erp .erp-table{min-width:650px}.erp .erp-table thead th{position:sticky;top:0;background:#eaf1ee;z-index:1}.erp .erp-lines input{min-width:8rem}.erp .erp-lines select{min-width:12rem}.erp .erp-lines [data-account-search]{display:block;width:100%;margin-bottom:.4rem}.erp .erp-err{color:#a02525}.erp .erp-ok{color:#176246}.erp .erp-metadata{display:grid;grid-template-columns:auto 1fr;gap:.3rem 1rem}.erp .erp-metadata dd{margin:0;overflow-wrap:anywhere}.erp .erp-pagination{display:flex;gap:1rem;align-items:center;margin:1rem 0}.erp .erp-recovery{border:2px dashed #176246;padding:1rem}.erp .erp-recovery ul{columns:2;list-style:none}.erp .erp-secret{letter-spacing:.08em;min-width:22rem}.erp details pre{max-width:34rem;overflow:auto;font-size:.8rem}.erp button:disabled{opacity:.6;cursor:wait}.erp .erp-summary{display:flex;gap:1rem;flex-wrap:wrap}.erp .erp-calendar{position:relative;z-index:20;background:#fff;box-shadow:0 10px 36px #16332626;border:1px solid var(--erp-border);padding:1rem;border-radius:12px;max-width:350px}.erp .erp-calendar>div:first-child{display:flex;gap:.5rem;align-items:center;justify-content:space-between}.erp .erp-calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;gap:.2rem;margin:.6rem 0}.erp .erp-calendar button{font:inherit;border:1px solid var(--erp-border);border-radius:4px;background:#f5f8f7;cursor:pointer}.erp .erp-calendar button:hover{background:#dcece5}.erp .erp-calendar strong{font-size:.9rem}.erp .erp-date-trigger{align-self:start}.erp .erp-form small{display:block}
@media(max-width:680px){.erp .erp-secret{min-width:0;width:100%}.erp .erp-filter>label,.erp .erp-inline-form>label{flex:1 1 100%}.erp .erp-recovery ul{columns:1}.erp .erp-top{flex-wrap:wrap;gap:.5rem}.erp .erp-card{padding:1rem}.erp .erp-table{font-size:.9rem}.erp .erp-metadata{grid-template-columns:1fr}}
@media print{@page{size:A4 landscape;margin:12mm}header,footer,.site-header,.site-footer,.erp-nav,.erp-top,.erp-no-print,.erp-pagination,.erp-date-trigger,.erp-calendar{display:none!important}.erp,.erp-card,.site-main,.container{width:100%!important;max-width:none!important;margin:0!important;padding:0!important;box-shadow:none!important;border:0!important}.erp .erp-scroll{overflow:visible}.erp .erp-table{min-width:0;width:100%;font-size:9pt}.erp .erp-table thead{display:table-header-group}.erp .erp-table th{position:static!important}.erp tr{break-inside:avoid}.erp a{color:inherit;text-decoration:none}.erp .erp-print-document{display:block}body{background:#fff;color:#000}}

/* فرم‌های خطوط و چاپ فاکتور مراحل ۷–۹. */
.erp .erp-trade-wide{grid-column:1/-1;min-width:0}.erp .erp-trade-form input{max-width:100%}.erp .erp-signatures{margin-top:3rem}.erp .erp-invoice-print .custom-logo{max-height:65px;width:auto}.erp .erp-invoice-print .erp-table td{white-space:normal;overflow-wrap:anywhere}
@media print{.erp-invoice-print .erp-table{font-size:8pt;table-layout:fixed}.erp-invoice-print .erp-table td,.erp-invoice-print .erp-table th{padding:4px}.erp-invoice-print .erp-signatures{margin-top:2rem}.erp-invoice-print h2{font-size:14pt}}

.erp .erp-navigation{margin-bottom:1rem}.erp .erp-navigation summary{cursor:pointer;font-weight:700;padding:.5rem}.erp .erp-navigation .erp-nav{margin-top:.5rem}

/* داشبورد و منوی مراحل۱۰–۱۲؛ منو در موبایل با details بومی قابل باز/بسته‌شدن است. */
.erp .erp-workspace-content{min-width:0}.erp .erp-nav .erp-nav-group{display:flex;flex-direction:column;gap:.4rem;min-width:155px;flex:1 1 160px}.erp .erp-nav-group h3{font-size:.9rem;margin:.4rem 0}.erp .erp-nav-group a{border-radius:8px;font-size:.9rem}.erp .erp-menu-sidebar{display:grid;grid-template-columns:235px minmax(0,1fr);gap:18px}.erp .erp-menu-sidebar>.erp-navigation{position:sticky;top:12px;align-self:start;max-height:90vh;overflow:auto}.erp .erp-menu-sidebar .erp-nav{display:block}.erp .erp-menu-sidebar .erp-nav-group{margin-bottom:1rem}.erp .erp-chart{display:inline-block;width:min(100%,420px);margin:1rem 0}.erp .erp-chart svg{display:block;width:100%;height:auto}.erp .erp-chart figcaption{font-weight:600}.erp .erp-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:14px}
@media(max-width:680px){.erp .erp-menu-sidebar{display:block}.erp .erp-menu-sidebar>.erp-navigation{position:static;max-height:none}.erp .erp-nav .erp-nav-group{min-width:0;flex:1 1 100%}.erp .erp-workspace-layout{min-width:0}}
@media print{.erp .erp-workspace-layout{display:block!important}.erp .erp-chart{break-inside:avoid}}

/* Final presentation: presentation settings are scoped to ERP; financial forms keep their contracts. */
body.agah-accounting-page .content-wrap{padding-block:20px;grid-template-columns:minmax(0,1fr)}
body.agah-accounting-page .entry{min-width:0;max-width:none;width:100%}
body.agah-accounting-page .page-hero{padding-block:18px}
.erp{max-width:var(--erp-width,1440px);padding:0;line-height:1.9;color:#18313b}
.erp .erp-brand{display:flex;align-items:center;gap:12px;padding:12px 0 20px;font-size:1.15em;color:var(--c-primary)}
.erp .erp-brand img{max-width:56px;max-height:56px;width:auto;height:auto;object-fit:contain}
.erp .erp-card{border-radius:var(--radius,14px);box-shadow:0 3px 14px #18313b06}
.erp .erp-card h2{font-size:1.2em;color:var(--c-primary)}
.erp .erp-card h3{font-size:1.08em;color:var(--c-primary)}
.erp .btn-primary,.erp .erp-nav a.on{background:var(--c-brand);color:var(--erp-on-brand,#fff);border-color:var(--c-brand)}
.erp .btn-outline{color:#18313b;background:#fff;border-color:#748b85}
.erp .erp-nav a.on{font-weight:700}
.erp .erp-table th{font-weight:700;color:#14322b}
.erp .erp-table tbody tr:nth-child(even){background:#f7faf9}
.erp .erp-table tbody tr:hover{background:#eff6f3}
.erp .erp-scroll{border:1px solid #d4dfdc;border-radius:10px;scrollbar-gutter:stable}
.erp .erp-scroll:focus-visible{outline:3px solid #176fa2;outline-offset:3px}
.erp .erp-scroll .erp-table{margin:0}
.erp .erp-table td{vertical-align:top;font-variant-numeric:tabular-nums}
.erp .erp-form{gap:16px}
.erp .erp-form fieldset{grid-column:1/-1;border:1px solid #93a8a0;border-radius:10px;padding:16px;min-width:0}
.erp .erp-form legend{padding-inline:8px;font-weight:700}
.erp .erp-form button{min-height:44px}
.erp input,.erp select,.erp textarea{min-height:42px;border-color:#7a9189;border-radius:min(var(--radius,14px),10px)}
.erp input[type=checkbox]{min-height:0}
.erp textarea{width:100%;min-height:100px}
.erp .erp-review-notice{border-inline-start:5px solid #855b11;padding:12px 16px;background:#fff6db;color:#65420c;font-weight:600}
.erp .erp-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:12px;margin-block:18px}
.erp .erp-stats>div{border:1px solid #d4dfdc;border-radius:10px;background:#f6faf8;padding:14px}
.erp .erp-stats dt{font-size:.88em;color:#374f48}
.erp .erp-stats dd{font-weight:700;font-size:1.12em;margin:6px 0 0}
.erp .erp-filter{padding:12px;background:#f4f8f6;border-radius:10px}
.erp .erp-err{color:#7d1e1e}.erp .erp-ok{color:#115336}
@media(min-width:681px) and (max-width:1024px){.erp .erp-menu-sidebar{grid-template-columns:195px minmax(0,1fr);gap:12px}}
@media(max-width:680px){.erp{margin-block:14px}.erp .erp-navigation{background:#f4f8f6;border:1px solid #d4dfdc;border-radius:10px}.erp .erp-top h1{flex-basis:100%}.erp .erp-form{grid-template-columns:1fr}.erp .erp-brand{font-size:1em}.erp .erp-stats{grid-template-columns:1fr 1fr}.erp .btn{white-space:normal}.erp .erp-filter{padding:10px}.erp .erp-nav-group a{min-height:44px;display:flex;align-items:center}}
@media(prefers-reduced-motion:reduce){.erp *{scroll-behavior:auto!important;transition:none!important}}
@media print{body.agah-accounting-page .page-hero,.erp .erp-brand,.erp .erp-review-notice~.erp-filter,.erp .erp-navigation{display:none!important}.erp{font-size:10pt!important;line-height:1.6!important}.erp .erp-review-notice{border:1px solid #555;background:#fff!important;color:#111!important;padding:5mm;margin-block:3mm}.erp .erp-scroll{border:0;border-radius:0;overflow:visible}.erp .erp-table{font-size:9pt;table-layout:auto}.erp .erp-table th,.erp .erp-table td{white-space:normal;padding:5px;overflow-wrap:anywhere}.erp .erp-table th{background:#eee!important}.erp .erp-stats{break-inside:avoid}.erp .erp-stats>div{background:#fff!important}a[href]:after{content:none!important}}
.erp .erp-nav-section{width:100%}.erp .erp-nav-section>summary{border:1px solid #b2c5bd;border-radius:8px;background:#f2f7f4;padding:8px 12px;min-height:44px}.erp .erp-nav-section>summary h3{display:inline;margin:0;font-size:.92em;color:#183c30}.erp .erp-nav-section>div{display:flex;flex-direction:column;gap:5px;padding-block:8px}.erp summary:focus-visible{outline:3px solid #176fa2;outline-offset:3px}.erp .erp-nav .erp-nav-group{align-self:start}
.erp{background:var(--c-bg);border-radius:var(--radius);padding:16px}.erp .erp-brand{background:white;border-radius:var(--radius);padding:14px 18px;margin-bottom:16px}.erp .erp-scroll{max-height:72vh}
@media(max-width:680px){.erp{padding:10px}.erp .erp-brand{padding:10px 12px}}
@media print{.erp .erp-scroll{max-height:none!important}.erp{background:#fff!important;padding:0!important}}
@media(min-width:900px){.erp .erp-menu-top .erp-nav-group:has(.erp-nav-section[open]){flex:1 1 100%}.erp .erp-menu-top .erp-nav-section>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}}

.erp-error-dialog{max-width:min(560px,90vw);border:1px solid #cbd5e1;border-radius:14px;padding:24px;direction:rtl;font-family:inherit}.erp-error-dialog::backdrop{background:#0f172a88}.erp-error-dialog li{margin:12px 0}.erp-select-search{display:block;width:100%;margin:4px 0;font:inherit}.erp-inline-form>label{min-width:0;flex:1 1 180px}.erp-inline-form input,.erp-inline-form select{width:100%;min-width:0;box-sizing:border-box}.erp-invoice-links{display:flex;gap:12px;flex-wrap:wrap;padding:16px 0}.erp-year-switch small{flex-basis:100%}@media print{.erp-select-search,.erp-error-dialog,.erp-year-switch{display:none!important}}

/* alpha10 — only voucher entry and invoice layout; fixed columns stay inside their own scroll region. */
.erp .erp-voucher-form>.erp-scroll,
.erp .erp-voucher-form>.erp-totals{grid-column:1/-1;min-width:0;width:100%;box-sizing:border-box}
.erp .erp-entry-meta{margin:0;grid-column:1/-1}
.erp .erp-entry-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:16px;align-items:start}
.erp .erp-entry-grid>label{min-width:0}
.erp .erp-entry-grid input,.erp .erp-entry-grid select{box-sizing:border-box;width:100%;min-width:0}
.erp .erp-entry-scroll{max-height:65vh;isolation:isolate}
.erp .erp-entry-scroll:focus-visible{outline:3px solid #2876a8;outline-offset:3px}
.erp .erp-entry-scroll .erp-lines{table-layout:fixed;width:100%;min-width:1000px}
.erp .erp-entry-scroll .erp-return-lines{min-width:680px}
.erp .erp-entry-scroll .erp-lines th{white-space:normal;vertical-align:middle;border:1px solid #cad8d2}
.erp .erp-entry-scroll .erp-lines td{white-space:normal;vertical-align:top;border:1px solid #d4dfdc;overflow-wrap:anywhere}
.erp .erp-entry-scroll .erp-lines input,.erp .erp-entry-scroll .erp-lines select{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:42px;margin-inline:0}
.erp .erp-entry-scroll .erp-lines input[inputmode=decimal]{direction:ltr;text-align:right;font-variant-numeric:tabular-nums}
.erp .erp-entry-scroll .erp-lines button{width:100%;min-width:0;padding-inline:6px;white-space:normal;overflow-wrap:normal}
.erp .erp-entry-scroll .erp-lines small{display:block;line-height:1.6;overflow-wrap:anywhere}
.erp .erp-voucher-document .erp-voucher-table{table-layout:fixed;min-width:900px}
.erp .erp-voucher-document .erp-voucher-table th,.erp .erp-voucher-document .erp-voucher-table td{white-space:normal;overflow-wrap:anywhere;border:1px solid #cad8d2}
.erp .erp-voucher-document .erp-voucher-table td:nth-last-child(-n+2){direction:ltr;text-align:right;font-variant-numeric:tabular-nums}
/* Shared screen and authorized print layout: document heading, parties, items, totals, signatures. */
body.agah-invoice-sheet{font-family:Tahoma,Arial,sans-serif;font-size:12px;line-height:1.7;color:#111;margin:20px;direction:rtl}
.agah-invoice-sheet{--invoice-rule:#748079;color:#17251e}
.agah-invoice-sheet .agah-invoice-heading{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,2fr) minmax(220px,1fr);gap:16px;align-items:center;padding-bottom:16px}
.agah-invoice-sheet .agah-invoice-heading h1,.agah-invoice-sheet .agah-invoice-heading h2{margin:0;text-align:center;font-size:1.4rem;line-height:1.8}
.agah-invoice-sheet .agah-invoice-logo img{max-width:150px;max-height:70px;width:auto;object-fit:contain}
.agah-invoice-sheet .agah-invoice-meta{display:grid;grid-template-columns:auto minmax(0,1fr);gap:3px 12px;margin:0;border:1px solid var(--invoice-rule);padding:10px;font-size:.85em}
.agah-invoice-sheet .agah-invoice-meta dd{margin:0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.agah-invoice-sheet .agah-invoice-meta-text{grid-column:1/-1;border:1px solid var(--invoice-rule);padding:8px;margin:0}
.agah-invoice-sheet .agah-invoice-heading:has(.agah-invoice-meta-text){grid-template-columns:1fr}
.agah-invoice-sheet .agah-invoice-identities{display:grid;gap:10px;margin-bottom:12px}
.agah-invoice-sheet .agah-invoice-person{display:grid;grid-template-columns:125px minmax(0,1fr);border:1px solid var(--invoice-rule);break-inside:avoid}
.agah-invoice-sheet .agah-invoice-person h2,.agah-invoice-sheet .agah-invoice-person h3{margin:0;padding:12px 8px;background:#f1f4f2;border-inline-end:1px solid var(--invoice-rule);font-size:.95em;display:flex;align-items:center;justify-content:center;text-align:center}
.agah-invoice-sheet .agah-invoice-person>div{display:grid;grid-template-columns:1fr 1fr;gap:4px 20px;padding:10px 14px;min-width:0}
.agah-invoice-sheet .agah-invoice-person p{margin:0;overflow-wrap:anywhere;min-width:0}
.agah-invoice-sheet .agah-invoice-address{grid-column:1/-1}
.agah-invoice-sheet .agah-invoice-unit{margin:8px 0;font-size:.85em}
.agah-invoice-sheet .erp-scroll{overflow:auto;border:0;border-radius:0;max-width:100%;scrollbar-gutter:auto}
.agah-invoice-sheet .agah-invoice-items{width:100%;min-width:1000px;table-layout:fixed;border-collapse:collapse;font-size:12px;line-height:1.6;margin:0}
.agah-invoice-sheet .agah-invoice-items th,.agah-invoice-sheet .agah-invoice-items td{box-sizing:border-box;border:1px solid var(--invoice-rule);padding:8px 5px;white-space:normal;overflow-wrap:anywhere;text-align:center;vertical-align:middle}
.agah-invoice-sheet .agah-invoice-items th{background:#edf1ee;color:#17251e;font-weight:700}
.agah-invoice-sheet .agah-invoice-items td:nth-child(3){text-align:right}
.agah-invoice-sheet .agah-invoice-items tbody tr:nth-child(even){background:#fafbfa}
.agah-invoice-sheet .agah-invoice-items .money,.agah-invoice-sheet .agah-invoice-items .agah-invoice-number{font-variant-numeric:tabular-nums}
.agah-invoice-sheet .agah-invoice-items small{display:block;font-size:.75em;line-height:1.5}
.agah-invoice-sheet .agah-invoice-items tfoot{font-weight:700}
.agah-invoice-sheet .agah-invoice-bottom{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,340px);gap:16px;margin-top:12px}
.agah-invoice-sheet .agah-invoice-notes{border:1px solid var(--invoice-rule);padding:10px;overflow-wrap:anywhere}
.agah-invoice-sheet .agah-invoice-notes p{margin:4px 0}
.agah-invoice-sheet .agah-invoice-total{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);margin:0;border:1px solid var(--invoice-rule)}
.agah-invoice-sheet .agah-invoice-total dt,.agah-invoice-sheet .agah-invoice-total dd{margin:0;padding:6px 10px;border-bottom:1px solid #d2d9d5;overflow-wrap:anywhere}
.agah-invoice-sheet .agah-invoice-total dd{text-align:left;font-variant-numeric:tabular-nums}
.agah-invoice-sheet .agah-invoice-total .agah-invoice-payable{font-weight:700;background:#edf1ee;border-top:1px solid var(--invoice-rule);border-bottom:0}
.agah-invoice-sheet .agah-invoice-grand-total{text-align:left;border:1px solid var(--invoice-rule);padding:12px;font-size:1.1em}
.agah-invoice-sheet .agah-invoice-signatures{display:grid;grid-template-columns:1fr 1fr;text-align:center;gap:20px;min-height:100px;padding-top:18px;break-inside:avoid}
.agah-invoice-sheet .agah-invoice-signatures>*{margin:0;border:1px solid var(--invoice-rule);padding:10px}
.agah-invoice-sheet .notice{border:1px solid var(--invoice-rule);padding:10px;overflow-wrap:anywhere}
.agah-invoice-sheet .actions{display:flex;gap:12px;flex-wrap:wrap}
@media(max-width:680px){
 .agah-invoice-sheet .agah-invoice-heading{grid-template-columns:1fr}
 .agah-invoice-sheet .agah-invoice-meta{max-width:100%}
 .agah-invoice-sheet .agah-invoice-person{grid-template-columns:1fr}
 .agah-invoice-sheet .agah-invoice-person h2,.agah-invoice-sheet .agah-invoice-person h3{border-inline-end:0;border-bottom:1px solid var(--invoice-rule)}
 .agah-invoice-sheet .agah-invoice-person>div{grid-template-columns:1fr}
 .agah-invoice-sheet .agah-invoice-bottom{grid-template-columns:1fr}
}
@media print{
 .erp .erp-entry-scroll{max-height:none;overflow:visible}
 .erp .erp-entry-scroll .erp-lines,.erp .erp-voucher-document .erp-voucher-table{min-width:0;table-layout:fixed}
 body.agah-invoice-sheet{margin:0;font-size:9pt}
 .agah-invoice-sheet .agah-invoice-heading{grid-template-columns:1fr 2fr 1fr;gap:8px;padding-bottom:8px;break-inside:avoid}
 .agah-invoice-sheet .agah-invoice-heading h1,.agah-invoice-sheet .agah-invoice-heading h2{font-size:15pt}
 .agah-invoice-sheet .agah-invoice-person{grid-template-columns:110px minmax(0,1fr)}
 .agah-invoice-sheet .agah-invoice-person>div{grid-template-columns:1fr 1fr;padding:6px 10px;gap:2px 12px}
 .agah-invoice-sheet .agah-invoice-person h2,.agah-invoice-sheet .agah-invoice-person h3{border-inline-end:1px solid var(--invoice-rule);border-bottom:0}
 .agah-invoice-sheet .erp-scroll{overflow:visible;border:0}
 .agah-invoice-sheet .agah-invoice-items{min-width:0!important;width:100%;table-layout:fixed;font-size:8pt;line-height:1.5}
 .agah-invoice-sheet .agah-invoice-items th,.agah-invoice-sheet .agah-invoice-items td{padding:4px 3px;position:static!important}
 .agah-invoice-sheet .agah-invoice-items thead{display:table-header-group}
 .agah-invoice-sheet .agah-invoice-items tfoot{display:table-row-group}
 .agah-invoice-sheet .agah-invoice-items tr{break-inside:avoid}
 .agah-invoice-sheet .agah-invoice-bottom{grid-template-columns:minmax(0,1fr) 280px;break-inside:avoid}
 .agah-invoice-sheet .agah-invoice-signatures{min-height:75px;padding-top:12px}
 .agah-invoice-sheet .actions{display:none!important}
}
.agah-invoice-sheet .agah-invoice-items th:first-child{white-space:nowrap;font-size:.85em;padding-inline:2px}
@media print{
 /* Remove the surrounding site article only when printing an invoice. */
 body:has(.erp-invoice-print) .content-wrap,body:has(.erp-invoice-print) .entry{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important}
 .erp .erp-invoice-print{font-size:var(--agah-print-font,9pt)!important;line-height:1.4}
 .erp .erp-invoice-print .agah-invoice-heading h2{font-size:var(--agah-print-title,15pt)}
 .erp .erp-invoice-print .agah-invoice-heading{padding-bottom:var(--agah-print-space,8px)}
 .erp .erp-invoice-print .agah-invoice-meta{padding:var(--agah-print-space,8px);gap:2px 8px}
 .erp .erp-invoice-print .agah-invoice-person>div{padding:var(--agah-print-space,6px);gap:2px 10px}
 .erp .erp-invoice-print .agah-invoice-items{font-size:var(--agah-print-cell,8pt)}
 .erp .erp-invoice-print .agah-invoice-total dt,.erp .erp-invoice-print .agah-invoice-total dd{padding:var(--agah-print-space,6px)}
 .erp .erp-invoice-print .agah-invoice-signatures{min-height:var(--agah-print-signature,60px);padding-top:var(--agah-print-space,12px)}
}

/* Production cost labels and amounts occupy separate lines at every viewport size. */
.erp .erp-production-document .erp-stats>div{display:flex;flex-direction:column;gap:6px;min-width:0;overflow-wrap:anywhere}
.erp .erp-production-document .erp-stats strong{font-variant-numeric:tabular-nums}
/* سلول متن بلند (توضیح/خطا) در جدول‌ها: شکست خط به‌جای کشیدن جدول. */
.erp .erp-table td.erp-wrap{white-space:normal;min-width:14em;max-width:32em;overflow-wrap:anywhere}

/* 0.25 — پوستهٔ مدیریتی یکپارچه؛ فقط لایهٔ نمایش و بدون تغییر قرارداد فرم‌ها و سرویس‌ها. */
body.agah-erp-shell{padding:0;background:#f1f3f5;color:#17242c;overflow-x:hidden}
body.agah-erp-shell[data-agah-theme="dark"]{background:#111517;color:#e7ece9}
.erp-skip-link{position:fixed;inset-inline-start:16px;top:-60px;z-index:10000;padding:10px 16px;background:#fff;color:#111;border-radius:8px;transition:top .2s}
.erp-skip-link:focus{top:12px}
.erp{
 --erp-header:#101719;--erp-sidebar:#182022;--erp-sidebar-2:#141a1c;--erp-content:#f1f3f5;--erp-panel:#fff;
 --erp-panel-soft:#f7f9fa;--erp-text:#18252d;--erp-muted:#6d7a82;--erp-border:#dce2e4;--erp-hover:#edf3f1;
 --erp-green:#66aa2d;--erp-green-soft:#eff8e8;--erp-shadow:0 8px 28px rgba(23,38,45,.08);
 width:100%;max-width:none;min-height:100vh;margin:0;padding:0;background:var(--erp-content);color:var(--erp-text);border-radius:0;line-height:1.8
}
.erp[data-theme-active="dark"]{
 --erp-header:#0d1112;--erp-sidebar:#151b1d;--erp-sidebar-2:#111617;--erp-content:#1b1f20;--erp-panel:#202526;
 --erp-panel-soft:#191e1f;--erp-text:#e8ecea;--erp-muted:#a6b0ab;--erp-border:#353c3e;--erp-hover:#29302e;
 --erp-green:#82cf37;--erp-green-soft:#21321b;--erp-shadow:0 10px 32px rgba(0,0,0,.26);
 --c-primary:#e8ecea;--c-text:#e8ecea;--c-muted:#a6b0ab;--c-line:#353c3e;--c-surface:#202526;--c-tint:#263c24
}
.erp,.erp *{scrollbar-color:color-mix(in srgb,var(--erp-green) 60%,var(--erp-border)) var(--erp-panel-soft)}
.erp a{color:var(--c-brand)}
.erp[data-theme-active="dark"] a{color:#a8d584}
.erp h1,.erp h2,.erp h3,.erp h4{color:var(--erp-text)}
.erp p{color:inherit}
.erp .muted{color:var(--erp-muted)}

/* نوار بالایی */
.erp .erp-brand{position:sticky;top:0;z-index:80;display:flex;align-items:center;justify-content:space-between;gap:16px;height:68px;margin:0;padding:0 22px;background:var(--erp-header);color:#fff;border:0;border-radius:0;box-shadow:0 1px 0 rgba(255,255,255,.07)}
.erp .erp-brand-home{display:inline-flex;align-items:center;gap:11px;color:#fff;text-decoration:none;min-width:0}
.erp .erp-brand-home:hover{color:#fff}
.erp[data-theme-active="dark"] .erp-brand-home{color:#fff}
.erp .erp-brand-home strong{font-size:1.08rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.erp .erp-brand-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:linear-gradient(145deg,var(--erp-green),#397c19);color:#fff;font-size:1.2rem;font-weight:900;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.erp .erp-brand-mark img{width:38px;height:38px;max-width:38px;max-height:38px;border-radius:10px;object-fit:contain;background:#fff}
.erp .erp-brand-actions{display:flex;align-items:center;gap:8px;margin-inline-start:auto}
.erp .erp-theme-toggle,.erp .erp-mobile-nav{display:inline-grid;place-items:center;width:40px;height:40px;border:1px solid #ffffff24;border-radius:10px;background:#ffffff0b;color:#fff;font:inherit;cursor:pointer}
.erp .erp-theme-toggle:hover,.erp .erp-mobile-nav:hover{background:#ffffff18}
.erp .erp-theme-toggle span{font-size:1.2rem;line-height:1}
.erp .erp-mobile-nav{display:none;gap:4px;padding:10px}
.erp .erp-mobile-nav span{display:block;width:19px;height:2px;border-radius:2px;background:currentColor}

/* هویت شرکت و فضای کاری */
.erp .erp-top{display:flex;align-items:center;gap:18px;margin:0;padding:18px 26px;background:var(--erp-panel);border-bottom:1px solid var(--erp-border)}
.erp .erp-page-identity{display:grid;grid-template-columns:auto auto;align-items:center;gap:0 12px;min-width:0;flex:1}
.erp .erp-page-identity h1{grid-row:1/3;grid-column:1;margin:0;font-size:1.35rem}
.erp .erp-page-identity .erp-eyebrow,.erp .erp-page-identity .muted{grid-column:2}
.erp .erp-top-actions{display:flex;align-items:center;gap:8px}
.erp .erp-eyebrow{display:block;color:var(--erp-green);font-size:.76rem;font-weight:800;letter-spacing:.02em;margin-bottom:2px}
.erp .erp-workspace-layout.erp-menu-sidebar{display:grid;grid-template-columns:270px minmax(0,1fr);gap:0;align-items:stretch;min-height:calc(100vh - 133px);background:var(--erp-content)}
.erp .erp-workspace-content{padding:24px 28px 56px;min-width:0;max-width:1600px;width:100%;margin:0 auto}

/* منوی کناری */
.erp .erp-menu-sidebar>.erp-navigation{position:sticky;top:68px;align-self:start;height:calc(100vh - 68px);max-height:none;margin:0;padding:14px 10px 24px;background:var(--erp-sidebar);border:0;border-radius:0;overflow:auto;color:#d6dfdb;box-shadow:inset -1px 0 #ffffff0a}
.erp .erp-navigation>summary{display:none}
.erp .erp-navigation .erp-nav{display:block;margin:0;padding:0}
.erp .erp-nav .erp-nav-group{display:block;min-width:0;margin:0 0 6px}
.erp .erp-nav-section{width:100%}
.erp .erp-nav-section>summary{position:relative;display:flex;align-items:center;min-height:44px;padding:0 12px;border:0;border-radius:9px;background:transparent;color:#ccd5d1;list-style:none}
.erp .erp-nav-section>summary::-webkit-details-marker{display:none}
.erp .erp-nav-section>summary::before{content:"◈";display:inline-grid;place-items:center;width:24px;margin-inline-end:8px;color:#8ea19a;font-size:.88rem}
.erp [data-nav-icon="accounting"] .erp-nav-section>summary::before{content:"▥"}.erp [data-nav-icon="treasury"] .erp-nav-section>summary::before{content:"◆"}.erp [data-nav-icon="trade"] .erp-nav-section>summary::before{content:"↹"}.erp [data-nav-icon="stock"] .erp-nav-section>summary::before{content:"▤"}.erp [data-nav-icon="payroll"] .erp-nav-section>summary::before{content:"♙"}.erp [data-nav-icon="assets"] .erp-nav-section>summary::before{content:"▣"}.erp [data-nav-icon="report"] .erp-nav-section>summary::before{content:"◒"}.erp [data-nav-icon="admin"] .erp-nav-section>summary::before{content:"⚙"}.erp [data-nav-icon="home"] .erp-nav-section>summary::before{content:"⌂"}
.erp .erp-nav-section>summary::after{content:"⌄";margin-inline-start:auto;color:#71817b;transition:transform .18s}
.erp .erp-nav-section[open]>summary::after{transform:rotate(180deg)}
.erp .erp-nav-section>summary:hover{background:#ffffff0a}
.erp .erp-nav-group h3{margin:0;font-size:.88rem;font-weight:700;line-height:1.4}
.erp .erp-nav-group h3 a{padding:0;border:0;background:none;color:#ccd5d1}
.erp .erp-nav-section>div{display:flex;flex-direction:column;gap:3px;padding:3px 7px 8px 18px}
.erp .erp-nav-section>div>a{display:flex;align-items:center;gap:8px;min-height:39px;padding:7px 13px;border:0;border-radius:8px;background:transparent;color:#aebbb6;font-size:.84rem;line-height:1.5}
.erp .erp-nav-section>div>a::before{content:"";width:5px;height:5px;border-radius:50%;background:#5e6c67;flex:0 0 auto}
.erp .erp-nav-section>div>a:hover{background:#ffffff0c;color:#fff}
.erp .erp-nav-section>div>a.on{background:linear-gradient(90deg,color-mix(in srgb,var(--erp-green) 27%,transparent),color-mix(in srgb,var(--erp-green) 10%,transparent));border-inline-start:3px solid var(--erp-green);color:#fff;font-weight:800}
.erp .erp-nav-section>div>a.on::before{background:var(--erp-green);box-shadow:0 0 0 3px color-mix(in srgb,var(--erp-green) 20%,transparent)}

/* مسیر، کارت و کنترل‌های عمومی */
.erp .erp-crumbs{min-height:48px;margin:-24px -28px 22px;padding:10px 28px;background:var(--erp-panel-soft);border-bottom:1px solid var(--erp-border);color:var(--erp-muted)}
.erp .erp-crumbs .erp-inline-form{margin-inline-start:auto}
.erp .erp-card{background:var(--erp-panel);border:1px solid var(--erp-border);border-radius:12px;padding:20px;margin-bottom:18px;box-shadow:var(--erp-shadow);color:var(--erp-text)}
.erp .erp-card>h2,.erp .erp-card>h3{padding-bottom:13px;margin-bottom:17px;border-bottom:1px solid var(--erp-border)}
.erp .erp-card-form{border-top:3px solid color-mix(in srgb,var(--c-brand) 70%,var(--erp-green))}
.erp .erp-card-table{overflow:hidden}
.erp .erp-card-table>.erp-scroll{margin-inline:-20px;margin-bottom:-20px;border-width:1px 0 0;border-radius:0}
.erp .erp-tiles{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}
.erp .erp-tile{position:relative;padding:18px 18px 18px 44px;border:1px solid var(--erp-border);border-radius:10px;background:var(--erp-panel-soft);color:var(--erp-text);box-shadow:none;transition:transform .15s,border-color .15s,background .15s}
.erp .erp-tile::after{content:"←";position:absolute;inset-inline-end:18px;color:var(--erp-green)}
.erp .erp-tile:hover{transform:translateY(-2px);border-color:var(--erp-green);background:var(--erp-hover)}
.erp .btn{min-height:40px;padding:.55rem 1rem;border-radius:8px;border-width:1px;font-size:.9rem;box-shadow:none}
.erp .btn-primary{background:var(--c-brand);border-color:var(--c-brand);color:var(--erp-on-brand,#fff)}
.erp .btn-primary:hover{filter:brightness(.92)}
.erp .btn-outline{background:var(--erp-panel);border-color:var(--erp-border);color:var(--erp-text)}
.erp .btn-outline:hover{background:var(--erp-hover);border-color:var(--erp-green);color:var(--erp-text)}
.erp[data-theme-active="dark"] .btn-outline{color:var(--erp-text)}
.erp[data-theme-active="dark"] .btn-primary{color:var(--erp-on-brand,#fff)}
.erp input,.erp select,.erp textarea{min-height:42px;padding:8px 11px;background:var(--erp-panel-soft);border:1px solid var(--erp-border);border-radius:8px;color:var(--erp-text)}
.erp input::placeholder,.erp textarea::placeholder{color:var(--erp-muted)}
.erp input:focus,.erp select:focus,.erp textarea:focus{background:var(--erp-panel);border-color:var(--c-brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--c-brand) 16%,transparent);outline:0}
.erp input[type=checkbox],.erp input[type=radio]{accent-color:var(--c-brand)}
.erp .erp-filter{padding:14px;border:1px solid var(--erp-border);background:var(--erp-panel-soft);border-radius:10px}
.erp .erp-inline-form{gap:9px}
.erp .erp-scroll{max-height:72vh;border:1px solid var(--erp-border);border-radius:9px;background:var(--erp-panel);scrollbar-gutter:stable}
.erp .erp-table{background:var(--erp-panel);color:var(--erp-text)}
.erp .erp-table th{padding:11px 12px;background:var(--erp-panel-soft);color:var(--erp-text);border-color:var(--erp-border);font-size:.84rem}
.erp .erp-table td{padding:11px 12px;border-color:var(--erp-border)}
.erp .erp-table tbody tr:nth-child(even){background:color-mix(in srgb,var(--erp-panel-soft) 55%,transparent)}
.erp .erp-table tbody tr:hover{background:var(--erp-hover)}
.erp .erp-flash,.erp .notice,.erp .erp-err,.erp .erp-ok{border:1px solid transparent;border-radius:9px;box-shadow:none}
.erp .erp-flash.ok,.erp .notice.ok,.erp .erp-ok{background:#eaf7ec;color:#1e6332;border-color:#bfe4c7}
.erp[data-theme-active="dark"] .erp-flash.ok,.erp[data-theme-active="dark"] .notice.ok,.erp[data-theme-active="dark"] .erp-ok{background:#1c3623;color:#a9e3b7;border-color:#315d3c}
.erp .erp-flash.err,.erp .notice.bad,.erp .erp-err{background:#fff0ef;color:#8b2925;border-color:#efc3c0}
.erp[data-theme-active="dark"] .erp-flash.err,.erp[data-theme-active="dark"] .notice.bad,.erp[data-theme-active="dark"] .erp-err{background:#3b2020;color:#f0b1ad;border-color:#663534}
.erp .erp-calendar,.erp .erp-calc{background:var(--erp-panel);border-color:var(--erp-border);color:var(--erp-text)}
.erp .erp-calc-keys button,.erp .erp-calendar button{background:var(--erp-panel-soft);border-color:var(--erp-border);color:var(--erp-text)}

/* داشبورد */
.erp .erp-dashboard-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:16px}
.erp .erp-dashboard-head h2{margin:0;font-size:1.55rem}
.erp .erp-dashboard-head p{margin:3px 0 0;color:var(--erp-muted);font-size:.88rem}
.erp .erp-dashboard-search{display:flex;align-items:center;gap:9px;width:min(420px,100%);padding:10px 14px;border:1px solid var(--erp-border);border-radius:9px;background:var(--erp-panel);color:var(--erp-muted);box-shadow:0 3px 12px rgba(0,0,0,.04)}
.erp .erp-dashboard-search:hover{border-color:var(--erp-green);color:var(--erp-text)}
.erp .erp-dashboard-search>span:first-child{font-size:1.35rem;color:var(--erp-green)}
.erp .erp-quick-actions{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:18px}
.erp .erp-quick-actions a{display:inline-flex;align-items:center;gap:7px;padding:8px 13px;background:var(--erp-panel);border:1px solid var(--erp-border);border-radius:9px;color:var(--erp-text);font-size:.85rem;font-weight:700}
.erp .erp-quick-actions a:hover{border-color:var(--erp-green);background:var(--erp-green-soft)}
.erp .erp-quick-actions a span{display:grid;place-items:center;width:24px;height:24px;border-radius:7px;background:var(--erp-green-soft);color:var(--erp-green);font-size:1rem}
.erp .erp-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:18px}
.erp .erp-metric-card{display:flex;align-items:center;gap:13px;min-width:0;padding:17px;background:var(--erp-panel);border:1px solid var(--erp-border);border-radius:11px;box-shadow:var(--erp-shadow)}
.erp .erp-metric-icon{display:grid;place-items:center;width:45px;height:45px;flex:0 0 45px;border-radius:11px;background:var(--erp-green-soft);color:var(--erp-green);font-size:1.25rem;font-weight:900}
.erp .erp-metric-2 .erp-metric-icon{background:#fff3e3;color:#e19320}.erp .erp-metric-3 .erp-metric-icon{background:#eaf5ff;color:#2785c0}.erp .erp-metric-4 .erp-metric-icon{background:#fff0ef;color:#d04e45}.erp .erp-metric-5 .erp-metric-icon{background:#f2edff;color:#7852bd}.erp .erp-metric-6 .erp-metric-icon{background:#e9f8f5;color:#258a78}
.erp[data-theme-active="dark"] .erp-metric-icon{filter:saturate(.8) brightness(.8)}
.erp .erp-metric-card>div:last-child{min-width:0}
.erp .erp-metric-card h3{margin:0 0 5px;color:var(--erp-muted);font-size:.78rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.erp .erp-metric-card .big{margin:0;color:var(--erp-text);font-size:1.08rem;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.erp .erp-metric-card>div>span{font-size:.7rem;color:var(--erp-muted)}
.erp .erp-dashboard-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,.85fr);gap:18px;align-items:start}
.erp .erp-chart-card{margin:0;min-height:420px}
.erp .erp-chart-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:14px;border-bottom:1px solid var(--erp-border)}
.erp .erp-chart-card h3{margin:0}
.erp .erp-chart-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:.75rem;color:var(--erp-muted)}
.erp .erp-chart-legend span{display:inline-flex;align-items:center;gap:5px}
.erp .erp-chart-legend i{width:8px;height:8px;border-radius:3px;background:var(--legend-color)}
.erp .erp-chart-canvas{width:100%;overflow-x:auto;padding-top:12px}
.erp .erp-chart-canvas svg{display:block;width:100%;min-width:620px;height:300px}
.erp .erp-chart-canvas text{fill:var(--erp-muted);font:14px Vazirmatn,Tahoma,sans-serif}
.erp .erp-chart-gridline{stroke:var(--erp-border);stroke-width:1}.erp .erp-chart-axis{stroke:color-mix(in srgb,var(--erp-muted) 65%,transparent);stroke-width:1.2}
.erp .erp-chart-data{margin-top:5px;font-size:.82rem}.erp .erp-chart-data>summary{cursor:pointer;color:var(--erp-muted)}
.erp .erp-dashboard-side>.erp-card{margin-bottom:18px}
.erp .erp-dashboard-side .erp-table{min-width:0}

/* صفحه انتخاب شرکت */
.erp>.erp-top:first-of-type{border-top:0}
.erp>.erp-card{margin:22px auto;max-width:min(1180px,calc(100% - 40px))}
.erp>.erp-top+.erp-card{margin-top:22px}
.erp .erp-list li{border-color:var(--erp-border)}

@media(max-width:1200px){
 .erp .erp-workspace-layout.erp-menu-sidebar{grid-template-columns:235px minmax(0,1fr)}
 .erp .erp-workspace-content{padding:22px 20px 50px}
 .erp .erp-crumbs{margin:-22px -20px 20px;padding-inline:20px}
 .erp .erp-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
 .erp .erp-dashboard-grid{grid-template-columns:1fr}
 .erp .erp-dashboard-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 .erp .erp-dashboard-side>.erp-card{margin:0}
}
@media(max-width:820px){
 body.agah-erp-shell{background:var(--erp-content,#f1f3f5)}
 .erp .erp-brand{height:60px;padding-inline:12px}
 .erp .erp-brand-mark{width:36px;height:36px}
 .erp .erp-brand-home strong{font-size:.95rem}
 .erp .erp-mobile-nav{display:inline-grid;order:-1}
 .erp .erp-top{padding:13px 14px;align-items:flex-start}
 .erp .erp-page-identity{grid-template-columns:1fr}
 .erp .erp-page-identity h1{grid-row:auto;grid-column:auto;font-size:1.12rem}
 .erp .erp-page-identity .erp-eyebrow,.erp .erp-page-identity .muted{grid-column:auto}
 .erp .erp-top-actions .btn{padding:.4rem .65rem;font-size:.78rem}
 .erp .erp-workspace-layout.erp-menu-sidebar{display:block;min-height:calc(100vh - 120px)}
 .erp .erp-menu-sidebar>.erp-navigation{position:fixed;z-index:90;top:60px;right:0;width:min(300px,86vw);height:calc(100vh - 60px);max-height:none;transform:translateX(105%);transition:transform .22s ease;box-shadow:-18px 0 50px rgba(0,0,0,.28)}
 .erp.erp-nav-open .erp-menu-sidebar>.erp-navigation{transform:translateX(0)}
 .erp.erp-nav-open::after{content:"";position:fixed;z-index:85;inset:60px 0 0;background:#07100ea6}
 .erp .erp-workspace-content{padding:16px 13px 42px}
 .erp .erp-crumbs{margin:-16px -13px 16px;padding:9px 13px}
 .erp .erp-dashboard-head{align-items:stretch;flex-direction:column}
 .erp .erp-dashboard-search{width:100%}
 .erp .erp-card{padding:15px;border-radius:10px}
 .erp .erp-card-table>.erp-scroll{margin-inline:-15px;margin-bottom:-15px}
 .erp .erp-dashboard-side{grid-template-columns:1fr}
 .erp .erp-chart-card{min-height:0}
}
@media(max-width:560px){
 .erp .erp-brand-actions{margin-inline-start:0}
 .erp .erp-top{flex-direction:column}
 .erp .erp-top-actions{width:100%}
 .erp .erp-top-actions .btn{flex:1}
 .erp .erp-metric-grid{grid-template-columns:1fr}
 .erp .erp-metric-card{padding:14px}
 .erp .erp-quick-actions{display:grid;grid-template-columns:1fr 1fr}
 .erp .erp-quick-actions a{justify-content:flex-start}
 .erp .erp-chart-card>header{align-items:flex-start;flex-direction:column}
 .erp>.erp-card{max-width:calc(100% - 24px)}
}
@media(prefers-reduced-motion:reduce){.erp .erp-menu-sidebar>.erp-navigation{transition:none}}
/* Full-width form tables and separated invoice-share actions. */
.erp .erp-form>.erp-scroll{grid-column:1/-1;min-width:0;width:100%}
.erp .erp-ratio-config{grid-template-columns:minmax(0,1fr);align-items:start}
.erp .erp-ratio-config>.erp-scroll{max-height:none}
.erp .erp-ratio-config table{width:100%;min-width:580px;table-layout:fixed}
.erp .erp-ratio-config td,.erp .erp-ratio-config th{width:50%;white-space:normal;overflow-wrap:anywhere;vertical-align:middle}
.erp .erp-ratio-config select{width:100%;min-width:0}
.erp .erp-moadian-items>.erp-scroll{max-height:none}
.erp .erp-moadian-items .erp-table{width:100%;min-width:660px;table-layout:fixed}
.erp .erp-moadian-items .erp-table th:first-child{width:15%}
.erp .erp-moadian-items .erp-table th:nth-child(2){width:30%}
.erp .erp-moadian-items .erp-table th:nth-child(3){width:10%}
.erp .erp-moadian-items td{white-space:normal;overflow-wrap:anywhere;vertical-align:middle}
.erp .erp-moadian-items td .erp-inline-form{display:flex;gap:8px;flex-wrap:wrap;min-width:0;margin:0}
.erp .erp-moadian-items td .erp-inline-form input{flex:1 1 140px;width:0;min-width:100px}
.erp .erp-moadian-items td .erp-inline-form button{flex:0 0 auto}
.erp .erp-share-entry{padding:16px 0;border-bottom:1px solid var(--erp-border);min-width:0}
.erp .erp-share-meta{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0 0 12px;font-size:.9rem;align-items:baseline}
.erp .erp-share-meta dt{font-weight:700}.erp .erp-share-meta dd{margin:0;white-space:nowrap}
.erp .erp-share-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap;min-width:0}
.erp .erp-share-tools input{flex:1 1 300px;min-width:0;width:100%;text-align:left}
.erp .erp-share-tools button{flex:0 1 auto;white-space:normal}
.erp .erp-share-create{grid-template-columns:minmax(0,1fr) minmax(0,1fr);margin-top:18px}
.erp .erp-share-sms{padding:12px;border:1px solid var(--erp-border);border-radius:8px;max-width:100%;min-width:0}
.erp .erp-share-sms summary{cursor:pointer;font-weight:700}
.erp .erp-share-sms-form{grid-template-columns:minmax(0,1fr);margin-top:12px}
.erp .erp-share-sms-form .erp-share-confirm{display:flex;align-items:flex-start;gap:8px}
.erp .erp-share-confirm input{flex:0 0 20px}.erp .erp-share-status{margin:10px 0;font-size:.85rem}
@media(max-width:600px){.erp .erp-share-create{grid-template-columns:minmax(0,1fr)}.erp .erp-share-tools input{flex-basis:100%}.erp .erp-share-meta{display:grid;grid-template-columns:auto minmax(0,1fr)}.erp .erp-share-meta dd{white-space:normal}}
/* Treasury sections occupy complete rows; only the document heading fields share columns. */
.erp .erp-treasury-form{grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));align-items:start}
.erp .erp-treasury-form>*{min-width:0}
.erp .erp-treasury-form>h3,.erp .erp-treasury-form>p,.erp .erp-treasury-form>.erp-err,.erp .erp-treasury-form>.erp-scroll,.erp .erp-treasury-form>[data-business-rows],.erp .erp-treasury-form>button{grid-column:1/-1}
.erp .erp-treasury-form>h3{margin:1rem 0 0}
.erp .erp-treasury-form>button{justify-self:start}
.erp .erp-treasury-form .erp-scroll{width:100%;min-width:0}
.erp .erp-treasury-form .erp-table{width:100%;min-width:850px;table-layout:fixed}
.erp .erp-treasury-form .erp-table th:first-child{width:25%}
.erp .erp-treasury-form .erp-table th:nth-child(2){width:17%}
.erp .erp-treasury-form .erp-table th:nth-child(3){width:18%}
.erp .erp-treasury-form .erp-table th:nth-child(4){width:25%}
.erp .erp-treasury-form .erp-table td{vertical-align:top;white-space:normal}
.erp .erp-treasury-form .erp-table input,.erp .erp-treasury-form .erp-table select{width:100%;min-width:0}
.erp .erp-treasury-form .erp-table label+label{margin-top:.6rem}
.erp .erp-treasury-form [data-business-rows="allocations"]>.erp-inline-form{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto;align-items:end}
.erp .erp-calc{max-height:calc(100dvh - 16px);overflow:auto}
.erp .erp-calc-head{user-select:none}
.erp .erp-voucher-signatures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin-top:2rem;break-inside:avoid}
.erp .erp-voucher-signatures>div{min-height:110px;text-align:center;border-top:1px solid var(--erp-border);padding-top:12px;overflow-wrap:anywhere}
.erp .erp-voucher-signatures span{display:block;font-size:.85em;color:var(--c-muted);margin-top:.5rem}
@media(max-width:600px){.erp .erp-treasury-form [data-business-rows="allocations"]>.erp-inline-form{grid-template-columns:minmax(0,1fr)}.erp .erp-voucher-signatures{gap:.4rem}}
@media print{
 body:has(.erp-voucher-document) .erp .erp-workspace-layout{display:block!important;width:100%!important;min-height:0!important;background:#fff!important}
 body:has(.erp-voucher-document) .erp .erp-workspace-content{margin:0!important;min-height:0!important;background:#fff!important}
 .erp .erp-voucher-document{font-size:10pt;color:#000!important}
 .erp .erp-voucher-document h2{text-align:center;font-size:16pt;margin-bottom:8mm}
 .erp .erp-voucher-document .erp-voucher-table{display:table!important;min-width:0!important;width:100%;table-layout:fixed;border-collapse:collapse}
 .erp .erp-voucher-document .erp-voucher-table th,.erp .erp-voucher-document .erp-voucher-table td{padding:2mm;border:1px solid #333;color:#000!important;background:#fff!important}
 .erp .erp-voucher-document .erp-voucher-table tfoot{display:table-row-group}
 .erp .erp-voucher-document .erp-scroll{margin:0!important;padding:0!important;border:0!important;border-radius:0!important}
 .erp .erp-voucher-document .erp-ok{border:0;background:transparent;color:#000;padding:2mm 0;margin:0}
 .erp .erp-voucher-signatures{margin-top:12mm;break-inside:avoid;page-break-inside:avoid}
 .erp .erp-voucher-signatures>div{min-height:28mm;border-color:#333}
}
@media print{
 body.agah-erp-shell{background:#fff!important}
 .erp{display:block!important;background:#fff!important;color:#000!important;min-height:0}
 .erp .erp-workspace-content{padding:0!important;max-width:none!important}
 .erp .erp-dashboard-grid{display:block}.erp .erp-chart-card{margin-bottom:8mm}
 .erp .erp-metric-grid{grid-template-columns:repeat(2,1fr)}
 .erp .erp-metric-card,.erp .erp-card{box-shadow:none!important;background:#fff!important;color:#000!important}
}
