/* Same compact action order as the supplied reference, independent of page direction. */
.app-topbar .topbar-actions { direction: ltr; gap: 8px; }
.app-topbar .topbar-actions > :is(button, a),
.app-topbar .topbar-actions > .dropdown > button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--primary);
    font-size: 17px;
    box-shadow: none;
}
.app-topbar .topbar-actions > :is(button, a):hover,
.app-topbar .topbar-actions > .dropdown > button:hover { background: var(--selection); }
.app-topbar .shell-language img { width: 20px; height: 14px; border-radius: 1px; }
.app-topbar .topbar-actions .dropdown-menu { direction: rtl; text-align: start; }
html[dir="ltr"] .app-topbar .topbar-actions .dropdown-menu { direction: ltr; }
.notifications-menu { width: min(340px, calc(100vw - 24px)); max-height: 400px; overflow: auto; padding: 14px; }
.notifications-menu p { padding-block: 10px; margin: 0; border-bottom: 1px solid var(--line); white-space: pre-wrap; }
.user-guide {
    width: min(1400px, calc(100vw - 32px));
    height: min(850px, calc(100dvh - 32px));
    margin: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    overflow: hidden;
}
.user-guide[open] { display: flex; flex-direction: column; }
.user-guide::backdrop { background: rgb(0 0 0 / 35%); }
.user-guide > header { display: flex; align-items: center; gap: 16px; flex-shrink: 0; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.user-guide > header h2 { margin: 0; font-size: 19px; margin-inline-end: auto; }
.user-guide > header a { color: var(--primary); font-size: 12px; }
.user-guide .icon-button { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; color: var(--text); }
.guide-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); flex: 1; min-height: 0; }
#erpx-user-guide-page { height: calc(100dvh - var(--shell-header-height, 64px) - 48px); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.guide-sidebar { padding: 20px 16px; border-inline-end: 1px solid var(--line); background: var(--surface-soft); overflow-y: auto; }
.guide-search { display: flex; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.guide-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 12%, transparent); }
.guide-search input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 0; outline: none; font: inherit; font-size: 12px; }
.guide-search-status { color: var(--muted); font-size: 12px; margin: 8px 0; }
.guide-sidebar details { margin-block-end: 8px; }
.guide-sidebar summary { padding: 10px 6px; cursor: pointer; font-weight: 600; font-size: 13px; }
.guide-topic { display: block; width: 100%; padding: 8px 12px; margin: 2px 0; color: var(--text); border: 0; border-inline-start: 3px solid transparent; background: transparent; border-radius: 5px; font: inherit; font-size: 12px; text-align: start; cursor: pointer; }
.guide-topic:hover { background: var(--surface); }
.guide-topic.active { color: var(--primary); background: var(--selection); border-inline-start-color: var(--primary); font-weight: 600; }
.guide-sidebar [hidden] { display: none !important; }
.guide-main { overflow-y: auto; padding: 28px clamp(20px, 4vw, 65px) 40px; }
.guide-document { max-width: 1150px; margin: auto; line-height: 2; font-size: 14px; }
.guide-heading { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 22px; }
.guide-heading p { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.guide-heading h2 { font-size: 27px; color: var(--primary); margin: 0 0 18px; line-height: 1.5; }
.guide-document h3 { margin: 30px 0 12px; font-size: 18px; color: var(--primary); }
.guide-document section { margin-bottom: 28px; }
.guide-document li { padding: 6px 8px; }
.guide-document ol li::marker { color: var(--primary); font-weight: 700; }
.user-guide-purpose { padding: 16px 20px; border-inline-start: 3px solid var(--primary); background: var(--surface-soft); }
.user-guide-fields { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.user-guide-fields > div { display: grid; grid-template-columns: minmax(130px, 1fr) 3fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.user-guide-fields > div:last-child { border-bottom: 0; }
.user-guide-fields > div:nth-child(even) { background: var(--surface-soft); }
.user-guide-fields dt, .user-guide-fields dd { margin: 0; }
.user-guide-links { display: flex; flex-wrap: wrap; gap: 8px; }
.user-guide-relation { flex: 1 1 250px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.user-guide-relation p { margin: 8px 0 0; font-size: 12px; }
.user-guide-link { padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; color: var(--primary); background: var(--surface); font: inherit; cursor: pointer; }
.user-guide-link:hover, .user-guide-link:focus-visible { border-color: var(--primary); }
@media (max-width: 760px) {
    .guide-layout { grid-template-columns: 1fr; grid-template-rows: minmax(100px, 28%) minmax(0, 1fr); }
    .guide-sidebar { padding: 10px 12px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
    .guide-main { padding: 16px; }
    .user-guide > header { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
    .user-guide > header h2 { font-size: 16px; }
    .user-guide-fields > div { grid-template-columns: 1fr; gap: 6px; }
    .guide-heading h2 { font-size: 22px; }
}
@media print { .user-guide, .notifications-menu { display: none !important; } }
