/* Shared title card, matching the existing invoice-list panel. No table/form/modal selectors. */
body .app-main .fa-user-page-heading,body main[role="main"] .fa-user-page-heading{
    display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:18px!important;
    width:100%;min-width:0;box-sizing:border-box;padding:19px 20px!important;margin:0 0 22px!important;
    border:1px solid #dfe6f5!important;border-radius:18px!important;
    background:linear-gradient(110deg,#fff 0%,#fff 68%,#f5f6ff 100%)!important;
    box-shadow:0 5px 18px #26375a05!important;color:#172b4d!important;position:relative;isolation:isolate;
}
body .app-main .fa-user-page-heading::before,body .app-main .fa-user-page-heading::after{content:none!important}
body .app-main .fa-user-heading-copy{min-width:0;flex:1 1 280px;text-align:right}
body .app-main .fa-user-heading-copy h1,body .app-main .fa-user-heading-copy h2{
    font-family:inherit!important;font-size:25px!important;font-weight:800!important;line-height:1.55!important;color:#172b4d!important;
    -webkit-text-fill-color:#172b4d!important;background:none!important;margin:2px 0 5px!important;padding:0!important;max-width:100%;overflow-wrap:anywhere;text-align:right!important;
}
body .app-main .fa-user-heading-copy p{font-family:inherit;font-size:14px!important;line-height:1.9!important;color:#71809b!important;margin:0!important;max-width:850px;overflow-wrap:anywhere}
body .app-main .fa-user-heading-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:wrap!important;gap:9px!important;min-width:0;margin:0!important;padding:0!important;flex:0 1 auto}
body .app-main .fa-user-heading-actions .fa-user-heading-button{
    display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;
    box-sizing:border-box;min-height:44px!important;min-width:98px;max-width:100%;width:auto!important;padding:10px 16px!important;
    border:1px solid #d9e3f7!important;border-radius:12px!important;background:#fff!important;color:#304c85!important;
    font-family:inherit!important;font-size:14px!important;font-weight:700!important;line-height:1.6!important;
    text-decoration:none!important;white-space:normal;text-align:center;box-shadow:0 3px 10px #4563a408!important;transform:none!important;cursor:pointer;
    transition:background .18s,border-color .18s,box-shadow .18s;
}
body .app-main .fa-user-heading-button:hover{background:#f1f5ff!important;border-color:#b9c9ee!important;box-shadow:0 4px 12px #4563a412!important}
body .app-main .fa-user-heading-button:focus-visible{outline:3px solid #a7bdeb;outline-offset:3px}
body .app-main .fa-user-heading-button svg{display:block!important;flex:none;width:18px!important;height:18px!important;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;margin:0!important}
body .app-main .fa-user-heading-button[data-user-heading-tone="primary"]{background:linear-gradient(120deg,#3977e8,#7459c8)!important;border-color:transparent!important;color:#fff!important}
body .app-main .fa-user-heading-button:disabled{opacity:.55;cursor:default;box-shadow:none!important}
/* Preserve role-based hiding even when a heading button is moved or decorated. */
body .app-main .fa-user-heading-actions [hidden],body .app-main .fa-user-heading-actions [data-workspace-denied="true"]{display:none!important}
/* SVG close avoids the baseline offset of a text multiplication sign. */
#workspace-picker .workspace-picker-x{
    display:grid!important;place-items:center!important;flex:none;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;
    box-sizing:border-box;padding:0!important;margin:0!important;border:1px solid #ffd1d9!important;border-radius:10px!important;
    background:#fff0f3!important;color:#d94b67!important;line-height:1!important;box-shadow:none!important;transform:none!important;cursor:pointer;
}
#workspace-picker .workspace-picker-x svg{display:block!important;width:18px!important;height:18px!important;margin:0!important;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
#workspace-picker .workspace-picker-x:hover{background:#ffe2e8!important;border-color:#f4aab9!important;color:#c12f4c!important}
#workspace-picker .workspace-picker-x:focus-visible{outline:3px solid #f5b4c2;outline-offset:3px}
@media(prefers-reduced-motion:reduce){body .app-main .fa-user-heading-button{transition:none}}
@media print{.fa-user-page-heading,.workspace-picker{display:none!important}}

/* Match the compact sales invoice heading; do not impose a fixed height on long titles. */
body .app-main .fa-user-page-heading,body main[role="main"] .fa-user-page-heading{
    padding:16px 18px!important;gap:12px 18px!important;min-height:0!important;height:auto!important;
    margin-bottom:14px!important;border-radius:18px!important;
}
body .app-main .fa-user-heading-copy{flex:1 1 240px;min-width:0;margin:0!important;padding:0!important}
body .app-main .fa-user-heading-titleline{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:5px 10px!important;min-width:0;margin:0!important;padding:0!important}
body .app-main .fa-user-heading-copy :is(h1,h2){font-size:25px!important;line-height:1.5!important;margin:0!important;order:0;flex:0 1 auto}
body .app-main .fa-user-heading-titleline>:is(span,small){display:inline-flex;align-items:center;max-width:100%;min-height:24px;order:1;margin:0!important;padding:2px 9px!important;border:1px solid #e1e5ff;border-radius:999px;background:#f1f2ff;color:#625ed0;font-size:12px!important;font-weight:500!important;line-height:1.65!important;overflow-wrap:anywhere}
body .app-main .fa-user-heading-titleline>[hidden]{display:none!important}
body .app-main .fa-user-heading-copy p{font-size:13px!important;line-height:1.65!important;margin:3px 0 0!important;max-width:none}
body .app-main .fa-user-heading-actions{flex:0 1 auto;gap:8px!important;width:auto!important;margin-inline-start:auto!important;align-self:center}
body .app-main .fa-user-heading-actions .fa-user-heading-button{min-height:44px!important;min-width:110px;padding:9px 16px!important;line-height:1.6!important;font-size:13px!important;border-radius:12px!important;white-space:normal}
body .app-main .fa-user-heading-actions .fa-user-heading-back{min-width:128px;flex-direction:row!important}
/* The reference has a plain small arrow inside the button, without a second framed button. */
body[data-fa-ui-arrows] .app-main .fa-user-heading-back .fa-ui-arrow-icon{width:18px!important;height:18px!important;min-width:18px!important;border:0!important;padding:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:inherit!important;transform:none!important}
body[data-fa-ui-arrows] .app-main .fa-user-heading-back .fa-ui-arrow-icon>svg{width:18px!important;height:18px!important}
@media(max-width:700px){
 body .app-main .fa-user-page-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center!important;gap:8px 10px!important;padding:13px 14px!important;margin-bottom:12px!important;border-radius:15px!important}
 body .app-main .fa-user-heading-copy{display:contents}
 body .app-main .fa-user-heading-titleline{grid-column:1;grid-row:1;gap:4px 7px!important}
 body .app-main .fa-user-heading-copy :is(h1,h2){font-size:21px!important;line-height:1.55!important}
 body .app-main .fa-user-heading-titleline>:is(span,small){font-size:11px!important;min-height:21px;padding:1px 7px!important}
 body .app-main .fa-user-heading-copy>p{grid-column:1/-1;grid-row:2;font-size:12px!important;line-height:1.8!important;margin:0!important}
 body .app-main .fa-user-heading-actions{grid-column:2;grid-row:1;min-width:0;max-width:100%;align-self:center;justify-content:flex-end!important;gap:7px!important}
 body .app-main .fa-user-heading-actions .fa-user-heading-button{min-width:0;min-height:40px!important;padding:7px 12px!important;font-size:12px!important;gap:6px!important}
 body .app-main .fa-user-heading-actions .fa-user-heading-back{min-width:94px}
 body .app-main .fa-user-page-heading[data-user-heading-actions="multiple"] .fa-user-heading-titleline{grid-column:1/-1}
 body .app-main .fa-user-page-heading[data-user-heading-actions="multiple"] .fa-user-heading-copy>p{grid-row:2}
 body .app-main .fa-user-page-heading[data-user-heading-actions="multiple"] .fa-user-heading-actions{grid-column:1/-1;grid-row:3;justify-content:flex-start!important}
}

/* Shared guide viewport: compact rows; content expands only when requested. */
@font-face{font-family:FaGuideVazir;src:url('/fonts/vazirmatn/Vazirmatn-UI-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:FaGuideVazir;src:url('/fonts/vazirmatn/Vazirmatn-UI-Bold.woff2') format('woff2');font-weight:700;font-display:swap}
body .app-main .fa-help-replaced{display:none!important}
body .app-main .fa-user-heading-help{display:inline-flex;align-items:center;justify-content:center;gap:8px}
body .app-main .fa-help-icon{display:block;width:21px;height:21px;min-width:21px;flex:none;fill:none;stroke:currentColor}
body .app-main .fa-user-help-dialog{position:fixed!important;inset:0!important;transform:none!important;box-sizing:border-box!important;width:min(880px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px)!important;min-width:0!important;height:fit-content!important;max-height:calc(100vh - 32px)!important;max-height:calc(100dvh - 32px)!important;padding:0!important;margin:auto!important;border:1px solid #dfe5f2!important;border-radius:20px!important;background:#fff!important;color:#2c3d5c!important;box-shadow:0 24px 80px #17284730!important;overflow:hidden!important;font-family:FaGuideVazir,Vazirmatn,Tahoma,sans-serif!important;direction:rtl;text-align:right}
body .app-main .fa-user-help-dialog:not([open]){display:none!important}
body .app-main .fa-user-help-dialog[open]{display:flex!important;flex-direction:column}
body .app-main .fa-user-help-dialog::backdrop{background:#17284770;backdrop-filter:none}
body .app-main .fa-user-help-dialog *{box-sizing:border-box;font-family:inherit!important;letter-spacing:normal}
body .app-main .fa-user-help-dialog .fa-help-shell{display:flex!important;flex-direction:column;min-height:0;min-width:0;max-height:calc(100vh - 34px);max-height:calc(100dvh - 34px);overflow:hidden}
body .app-main .fa-user-help-dialog .fa-help-header{position:static!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px;flex:0 0 auto;width:100%;min-width:0;padding:16px 20px!important;margin:0!important;background:linear-gradient(110deg,#f8faff,#f4f3ff)!important;border:0!important;border-bottom:1px solid #e3e8f3!important}
body .app-main .fa-help-header>div{min-width:0;flex:1}
body .app-main .fa-help-header :is(h2,h3){display:flex!important;align-items:center;gap:10px;min-width:0;margin:0!important;font-size:20px!important;font-weight:700;line-height:1.7!important;color:#293c60!important;overflow-wrap:anywhere;background:none!important}
body .app-main .fa-help-header :is(p,span){font-size:13px;line-height:1.8;color:#72809a}
body .app-main .fa-help-header p{margin:4px 0 0}
body .app-main .fa-help-header h2>.fa-help-icon{box-sizing:content-box;padding:7px;border:1px solid #e0e6fa;border-radius:11px;background:#fff;color:#596acb}
body .app-main .fa-user-help-dialog .fa-help-close{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 40px;width:40px!important;min-width:40px!important;max-width:40px;height:40px!important;min-height:40px!important;padding:0!important;margin:0!important;border:1px solid #f1cbd5!important;border-radius:11px!important;background:#fff0f3!important;color:#c4415b!important;line-height:1!important;box-shadow:none!important;transform:none!important;cursor:pointer}
body .app-main .fa-user-help-dialog .fa-help-close:hover{background:#ffe4eb!important;border-color:#edabbc!important}
body .app-main .fa-user-help-dialog .fa-help-close svg{display:block!important;width:19px!important;height:19px!important;min-width:19px;fill:none;stroke:currentColor;stroke-width:2}
body .app-main .fa-user-help-dialog .fa-help-content{display:flex!important;flex-direction:column;gap:9px!important;flex:0 1 auto;min-width:0;min-height:0;width:100%;padding:16px 20px!important;margin:0!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-width:thin;background:#fbfcff;line-height:1.95;font-size:15px}
body .app-main .fa-help-content>*{flex:none;min-width:0;max-width:100%;overflow-wrap:anywhere}
body .app-main .fa-help-content :is(.fa-guide-group,.header-legend,.tw-guide-grid,.tm-guide-grid,.ih-guide-grid){display:flex!important;flex-direction:column;gap:9px;width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;padding:0!important;margin:0!important;border:0!important;background:none!important;box-shadow:none!important}
body .app-main .fa-help-content .fa-guide-item{display:block!important;flex:none;min-width:0;width:100%;max-width:100%;margin:0!important;padding:0!important;border:1px solid #e0e6f3!important;border-radius:13px!important;background:#fff!important;overflow:hidden;color:#344764}
body .app-main .fa-help-content .fa-guide-item>summary{display:flex!important;align-items:center;gap:12px;min-height:62px;margin:0!important;padding:12px 14px!important;list-style:none;cursor:pointer;background:#fff;color:#3b527b;user-select:none}
body .app-main .fa-help-content .fa-guide-item>summary::-webkit-details-marker{display:none}
body .app-main .fa-help-content .fa-guide-item>summary::before{content:none!important}
body .app-main .fa-help-content .fa-guide-item>summary::after{content:'';display:block;flex:none;width:8px;height:8px;margin-inline-start:auto;border-inline-end:2px solid #7c8dad;border-bottom:2px solid #7c8dad;transform:rotate(45deg);transition:transform .15s}
body .app-main .fa-help-content .fa-guide-item[open]>summary{background:#f3f6ff;border-bottom:1px solid #e4eaf7}
body .app-main .fa-help-content .fa-guide-item[open]>summary::after{transform:rotate(225deg)}
body .app-main .fa-help-content .fa-guide-item>summary:hover{background:#f6f8ff}
body .app-main .fa-help-content .fa-help-section-title{display:flex!important;align-items:center;gap:11px;min-width:0;flex:1;width:auto!important;margin:0!important;padding:0!important;font-size:16px!important;line-height:1.8!important;font-weight:700!important;color:#344c77!important;background:none!important;white-space:normal!important;overflow-wrap:anywhere}
body .app-main .fa-help-content .fa-guide-copy{padding:12px 16px 14px!important;min-width:0;font-size:15px;line-height:1.95;color:#3c4d6b;overflow-wrap:anywhere}
body .app-main .fa-help-content .fa-guide-item:not([open])>.fa-guide-copy{display:none!important}
body .app-main .fa-help-content .fa-guide-copy :is(p,li){margin:5px 0!important;font-size:15px!important;line-height:1.95!important;color:#3c4d6b!important;white-space:normal!important}
body .app-main .fa-help-content :is(ul,ol){padding-inline-start:22px}
body .app-main .fa-help-content .mt-table-wrap{max-width:100%;min-width:0;overflow:auto}
body .app-main .fa-help-content table{width:100%!important;min-width:0!important;table-layout:fixed;border-collapse:collapse;font-size:14px}
body .app-main .fa-help-content :is(th,td){white-space:normal!important;overflow-wrap:anywhere;padding:10px!important;text-align:right;line-height:1.9;vertical-align:top}
body .app-main .fa-help-content .fa-guide-icon-badge{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 34px;box-sizing:border-box;width:34px!important;min-width:34px!important;height:34px!important;padding:6px!important;border:1px solid #dce5fa;border-radius:10px;background:#eef3ff;color:#5b6ec4!important}
body .app-main .fa-help-content .fa-guide-icon-badge>.fa-help-icon{display:block!important;width:21px!important;height:21px!important;min-width:21px!important;fill:none;stroke:currentColor}
body .app-main .fa-help-content .fa-guide-icon-badge[data-icon-kind="receive"],body .app-main .fa-help-content .fa-guide-icon-badge[data-icon-kind="check"],body .app-main .fa-help-content .fa-guide-icon-badge[data-icon-kind="profit"]{background:#eaf7f4;color:#34847a!important;border-color:#d2ece6}
body .app-main .fa-help-content .fa-guide-icon-badge[data-icon-kind="warning"],body .app-main .fa-help-content .fa-guide-icon-badge[data-icon-kind="revoke"]{background:#fff4eb;color:#ab764b!important;border-color:#f3e1cd}
body .app-main .fa-user-help-dialog .fa-help-footer{position:static!important;display:flex!important;align-items:center;justify-content:flex-end!important;gap:10px;flex:0 0 auto;min-width:0;width:100%!important;padding:11px 20px!important;margin:0!important;border:0!important;border-top:1px solid #e3e8f3!important;background:#fff!important;box-shadow:none!important}
body .app-main .fa-user-help-dialog .fa-help-footer button{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 auto;width:auto!important;min-width:105px;min-height:42px!important;padding:8px 17px!important;margin:0!important;border:1px solid #d8e1f8!important;border-radius:11px!important;background:#edf2ff!important;color:#4b62b4!important;font-size:14px!important;font-weight:700;line-height:1.8!important;cursor:pointer;transform:none!important;box-shadow:none!important}
body .app-main .fa-user-help-dialog :is(button,summary,a):focus-visible{outline:2px solid #9cb4e5!important;outline-offset:-3px}
body .app-main .fa-user-help-dialog .fa-help-footer button:hover{background:#e3ebff!important}
body .app-main .fa-user-heading-help{margin:0!important;align-self:center}
body .app-main .invoice-search-hero-top>.fa-user-heading-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-inline-start:auto}
body .app-main .invoice-search-hero-top .fa-user-heading-help{width:auto;min-height:44px;padding:9px 16px;border:1px solid #d9e3f7;border-radius:12px;background:#fff;color:#304c85;font:700 13px/1.6 inherit;cursor:pointer}
html.fa-user-help-open{overflow:hidden}
@media(max-width:700px){
 body .app-main .fa-user-page-heading.fa-has-page-help .fa-user-heading-actions{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:7px!important;justify-content:flex-start!important}
 body .app-main .fa-user-page-heading.fa-has-page-help .fa-user-heading-button{flex:0 1 auto;min-width:0!important;min-height:42px!important;padding:8px 12px!important}
 body .app-main .fa-user-help-dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100vh - 16px)!important;max-height:calc(100dvh - 16px)!important;border-radius:16px!important}
 body .app-main .fa-user-help-dialog .fa-help-shell{max-height:calc(100vh - 18px);max-height:calc(100dvh - 18px)}
 body .app-main .fa-user-help-dialog .fa-help-header{padding:12px!important;gap:10px}
 body .app-main .fa-help-header :is(h2,h3){font-size:17px!important;line-height:1.8!important}
 body .app-main .fa-user-help-dialog .fa-help-content{padding:12px!important;gap:8px!important}
 body .app-main .fa-help-content .fa-guide-item>summary{padding:10px!important;min-height:58px;gap:8px}
 body .app-main .fa-help-content .fa-help-section-title{font-size:15px!important;gap:8px}
 body .app-main .fa-help-content .fa-guide-copy{padding:10px 12px!important}
 body .app-main .fa-help-content .fa-guide-copy :is(p,li){font-size:15px!important}
 body .app-main .fa-user-help-dialog .fa-help-footer{padding:10px 12px!important}
 body .app-main .invoice-search-hero-top>.fa-user-heading-actions{width:100%;justify-content:flex-start}
}
@media(prefers-reduced-motion:reduce){body .app-main .fa-help-content .fa-guide-item>summary::after{transition:none}}

body .app-main .fa-user-help-dialog [hidden]{display:none!important}
body .app-main .fa-help-content .fa-guide-item>summary:has(>.fa-ui-arrow-icon)::after{content:none!important}
