/*
 * World UI 2026
 * Global presentation layer for the Inventory + Accounts + GST workspace.
 * Business behavior remains in the existing Razor pages and handlers.
 */

body.world-ui {
    --world-canvas: #edf2f6;
    --world-canvas-strong: #e4ebf0;
    --world-surface: #ffffff;
    --world-surface-soft: #f7f9fb;
    --world-surface-strong: #edf2f5;
    --world-glass: rgb(255 255 255 / 58%);
    --world-glass-strong: rgb(255 255 255 / 74%);
    --world-glass-line: rgb(255 255 255 / 88%);
    --world-ink: #17232e;
    --world-text: #33424d;
    --world-muted: #61717d;
    --world-soft: #7a8994;
    --world-line: #d4dde4;
    --world-line-strong: #b8c6d0;
    --world-brand: #087f7a;
    --world-brand-hover: #066a66;
    --world-brand-deep: #075953;
    --world-brand-soft: #e4f5f2;
    --world-cobalt: #3d63c8;
    --world-cobalt-soft: #edf2ff;
    --world-violet: #7757b5;
    --world-violet-soft: #f4f0fc;
    --world-amber: #95600a;
    --world-amber-soft: #fff4dd;
    --world-coral: #b64d43;
    --world-coral-soft: #fff0ee;
    --world-success: #146b47;
    --world-success-soft: #e9f7ef;
    --world-danger: #b42318;
    --world-danger-soft: #fff0ef;
    --world-info: #2458b6;
    --world-info-soft: #eef4ff;
    --world-focus: #087f7a;
    --world-focus-ring: rgb(8 127 122 / 22%);
    --world-shell: #18232d;
    --world-shell-raised: #21313d;
    --world-shell-line: rgb(255 255 255 / 11%);
    --world-shell-text: #edf4f7;
    --world-shell-muted: #9fb0ba;
    --world-shadow-xs: 0 1px 2px rgb(23 35 46 / 6%);
    --world-shadow-sm: 0 10px 28px rgb(23 35 46 / 9%);
    --world-shadow-md: 0 22px 52px rgb(23 35 46 / 14%);
    --world-shadow-glass: 0 26px 70px rgb(20 31 41 / 20%);
    --world-radius-sm: 4px;
    --world-radius: 6px;
    --world-radius-lg: 8px;
    --world-control: 44px;
    --world-nav-width: 252px;
    --world-top-height: 76px;
    --world-content: 1680px;
    --world-gutter: 30px;
    --world-ease: cubic-bezier(.2, .75, .25, 1);
    --world-fast: 140ms;
    --world-normal: 220ms;
    --ui-brand-strong: var(--world-brand-deep);
    --ui-motion-fast: var(--world-fast);
    --ui-motion-ease: var(--world-ease);
    --surface-primary: var(--world-surface);
    --border-subtle: var(--world-line);
    --text-secondary: var(--world-muted);
    --text-tertiary: var(--world-soft);
    --accent-700: var(--world-brand);
    --danger-700: var(--world-danger);
    color: var(--world-text);
    background: #e8eef2;
    font-family: "Segoe UI Variable Text", "Segoe UI Variable", -apple-system,
        BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.world-ui *,
body.world-ui *::before,
body.world-ui *::after {
    box-sizing: border-box;
}

body.world-ui ::selection {
    color: var(--world-ink);
    background: #c8e9df;
}

body.world-ui :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--world-focus) !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--world-focus-ring) !important;
}

body.world-ui :where(button, a, summary, input, select, textarea) {
    transition:
        color var(--world-fast) var(--world-ease),
        background-color var(--world-fast) var(--world-ease),
        border-color var(--world-fast) var(--world-ease),
        box-shadow var(--world-normal) var(--world-ease),
        transform var(--world-fast) var(--world-ease),
        opacity var(--world-fast) var(--world-ease);
}

body.world-ui .skip-link {
    top: 10px;
    left: 10px;
    z-index: 1000;
    border: 1px solid var(--world-brand);
    border-radius: var(--world-radius);
    color: #fff;
    background: var(--world-brand);
    box-shadow: var(--world-shadow-md);
}

body.world-ui .shell-progress {
    z-index: 1000;
    height: 3px;
    background: transparent;
}

body.world-ui .shell-progress > span {
    background: var(--world-brand);
    box-shadow: 0 0 16px rgb(8 127 122 / 42%);
}

/* Application shell */

body.world-ui .desktop-frame {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: var(--world-nav-width) minmax(0, 1fr);
    background: #e8eef2;
}

body.world-ui .side-menu {
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 55;
    width: var(--world-nav-width);
    height: var(--world-top-height);
    display: flex;
    align-items: center;
    border: 0;
    border-right: 1px solid var(--world-shell-line);
    border-bottom: 1px solid var(--world-shell-line);
    background: rgb(24 35 45 / 94%);
    box-shadow: 14px 0 40px rgb(17 28 38 / 11%);
    backdrop-filter: blur(30px) saturate(135%);
    -webkit-backdrop-filter: blur(30px) saturate(135%);
}

body.world-ui .side-logo {
    min-width: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    background: rgb(255 255 255 / 2%);
}

body.world-ui .tdr-brand-mark {
    width: 92px;
    height: 44px;
    flex: 0 0 92px;
    display: block;
    object-fit: cover;
    object-position: center;
    border: 1px solid rgb(255 255 255 / 12%);
    border-radius: 7px;
    background: #030404;
    box-shadow:
        inset 0 1px rgb(255 255 255 / 14%),
        0 10px 24px rgb(0 0 0 / 18%);
}

body.world-ui .side-brand-mark {
    width: 92px;
    height: 44px;
    flex-basis: 92px;
}

body.world-ui .top-company-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(8 127 122 / 18%);
    border-radius: var(--world-radius-lg);
    color: var(--world-brand-deep);
    background: rgb(228 245 242 / 76%);
    box-shadow: inset 0 1px rgb(255 255 255 / 75%);
    font-size: 11px;
    font-weight: 750;
}

body.world-ui .side-brand-copy {
    min-width: 0;
    display: grid;
    line-height: 1.22;
}

body.world-ui .side-brand-copy strong {
    overflow: hidden;
    color: #f8fbfa;
    font-size: 15px;
    font-weight: 730;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.world-ui .side-brand-copy small {
    color: var(--world-shell-muted);
    font-size: 10px;
}

body.world-ui .desktop-main {
    grid-column: 2;
    min-width: 0;
    grid-template-rows: var(--world-top-height) minmax(0, 1fr);
}

body.world-ui .top-bar {
    position: sticky;
    top: 10px;
    z-index: 48;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 10px 16px 0;
    padding: 0 16px;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    background: var(--world-glass);
    box-shadow:
        inset 0 0 0 1px rgb(184 198 208 / 28%),
        inset 0 1px rgb(255 255 255 / 90%),
        0 14px 38px rgb(23 35 46 / 9%);
    backdrop-filter: blur(28px) saturate(155%);
    -webkit-backdrop-filter: blur(28px) saturate(155%);
}

body.world-ui .shell-menu-trigger {
    width: 42px;
    min-width: 42px;
    height: 42px;
    display: none !important;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    color: var(--world-ink);
    background: rgb(255 255 255 / 62%);
    box-shadow:
        inset 0 0 0 1px rgb(184 198 208 / 36%),
        inset 0 1px rgb(255 255 255 / 86%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.world-ui .top-brand-home {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--world-ink);
    text-decoration: none;
}

body.world-ui .top-brand-home .tdr-brand-mark {
    width: 78px;
    height: 36px;
    flex-basis: 78px;
    box-shadow: 0 8px 18px rgb(17 28 38 / 16%);
}

body.world-ui .top-brand-home > span {
    display: grid;
    line-height: 1;
}

body.world-ui .top-brand-home strong {
    font-size: 13px;
    font-weight: 790;
}

body.world-ui .top-brand-home small {
    margin-top: 3px;
    color: var(--world-muted);
    font-size: 9px;
    font-weight: 650;
    text-transform: uppercase;
}

body.world-ui .top-product-context {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 14px;
    border-left: 1px solid rgb(184 198 208 / 62%);
}

body.world-ui .top-module-label {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgb(255 255 255 / 78%);
    border-radius: var(--world-radius-lg);
    color: var(--world-brand-deep);
    background: rgb(228 245 242 / 70%);
    box-shadow: inset 0 0 0 1px rgb(8 127 122 / 10%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 12px;
    font-weight: 700;
}

body.world-ui .top-title {
    overflow: hidden;
    color: var(--world-ink);
    font-size: 14px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.world-ui .top-session {
    min-width: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 7px 5px 5px;
    border: 1px solid rgb(255 255 255 / 72%);
    border-radius: var(--world-radius-lg);
    background: rgb(255 255 255 / 44%);
    box-shadow: inset 0 0 0 1px rgb(184 198 208 / 26%);
}

body.world-ui .top-company-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-color: rgb(8 127 122 / 17%);
    box-shadow: inset 0 1px rgb(255 255 255 / 70%);
}

body.world-ui .top-session-copy {
    min-width: 0;
    display: grid;
    line-height: 1.25;
}

body.world-ui .top-company {
    overflow: hidden;
    max-width: 260px;
    color: var(--world-ink);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.world-ui .top-context {
    color: var(--world-muted);
    font-size: 10px;
}

body.world-ui .shell-navigation {
    position: static;
}

body.world-ui .shell-navigation > .shell-navigation-summary {
    display: none;
}

body.world-ui .shell-navigation-content {
    position: fixed;
    inset: var(--world-top-height) auto 0 0;
    z-index: 50;
    width: var(--world-nav-width);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-right: 1px solid var(--world-shell-line);
    color: var(--world-shell-text);
    background: rgb(24 35 45 / 95%);
    box-shadow: 14px 0 40px rgb(17 28 38 / 12%);
    backdrop-filter: blur(30px) saturate(135%);
    -webkit-backdrop-filter: blur(30px) saturate(135%);
}

body.world-ui .shell-navigation-mobile-head {
    display: none;
}

body.world-ui .shell-nav-filter {
    flex: 0 0 auto;
    margin: 14px 12px 10px;
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: var(--world-radius-lg);
    color: var(--world-shell-text);
    background: rgb(255 255 255 / 6%);
    box-shadow: inset 0 1px rgb(255 255 255 / 5%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.world-ui .shell-nav-filter-summary {
    min-height: 42px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--world-shell-text);
    font-size: 12px;
    font-weight: 650;
}

body.world-ui .shell-nav-filter-summary::after {
    display: none;
}

body.world-ui .shell-nav-filter-summary > span {
    flex: 1 1 auto;
}

body.world-ui .shell-nav-filter-summary > svg {
    width: 17px;
    height: 17px;
    color: #a8bcc6;
}

body.world-ui .shell-nav-filter-summary .shell-nav-filter-chevron {
    width: 15px;
    height: 15px;
    transition: transform var(--world-fast) var(--world-ease);
}

body.world-ui .shell-nav-filter[open] .shell-nav-filter-chevron {
    transform: rotate(180deg);
}

body.world-ui .shell-nav-filter-summary:hover {
    background: rgb(255 255 255 / 8%);
}

body.world-ui .shell-nav-filter-body {
    padding: 0 9px 10px;
    border-top: 1px solid var(--world-shell-line);
}

body.world-ui .shell-nav-filter :is(input, select, button) {
    border-color: rgb(255 255 255 / 17%);
    color: var(--world-shell-text);
    background: rgb(255 255 255 / 9%);
}

body.world-ui .shell-nav-filter :is(input, select)::placeholder {
    color: var(--world-shell-muted);
}

body.world-ui .side-nav-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #46605a transparent;
    padding: 0 10px 12px;
}

body.world-ui .side-nav-group {
    margin: 0;
    padding: 3px 0 9px;
}

body.world-ui .side-nav-group + .side-nav-group {
    margin-top: 7px;
    padding-top: 11px;
    border-top: 1px solid rgb(255 255 255 / 7%);
}

body.world-ui .side-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px 5px;
    color: var(--world-shell-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

body.world-ui .side-section-label::after {
    height: 1px;
    min-width: 14px;
    flex: 1 1 auto;
    content: "";
    background: rgb(255 255 255 / 8%);
}

body.world-ui .side-link {
    position: relative;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: var(--world-radius-lg);
    color: #d2dce2;
    background: transparent;
    font-size: 12.5px;
    font-weight: 590;
    text-decoration: none;
}

body.world-ui .side-link svg {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    padding: 6px;
    border: 1px solid rgb(255 255 255 / 7%);
    border-radius: var(--world-radius);
    color: #a4b4be;
    background: rgb(255 255 255 / 4%);
    stroke-width: 1.8;
}

body.world-ui .side-link:hover {
    border-color: rgb(255 255 255 / 10%);
    color: #fff;
    background: rgb(255 255 255 / 8%);
    box-shadow: inset 0 1px rgb(255 255 255 / 4%);
    transform: translateX(2px);
}

body.world-ui .side-link.active {
    border-color: rgb(115 215 198 / 22%);
    color: #f7fffd;
    background: rgb(255 255 255 / 9%);
    box-shadow:
        inset 3px 0 #73d7c6,
        inset 0 1px rgb(255 255 255 / 8%),
        0 8px 20px rgb(6 15 23 / 14%);
}

body.world-ui .side-link.active::before {
    display: none;
}

body.world-ui .side-link.active svg {
    color: #8ee7d6;
    border-color: rgb(115 215 198 / 24%);
    background: rgb(8 127 122 / 20%);
    box-shadow: inset 0 1px rgb(255 255 255 / 7%);
}

body.world-ui .side-signout {
    flex: 0 0 auto;
    margin: 7px 10px 12px;
    border: 1px solid rgb(255 255 255 / 9%);
    border-radius: var(--world-radius-lg);
    padding: 4px 8px;
    color: #f2d8d5;
    background: rgb(182 77 67 / 8%);
}

body.world-ui .shell-nav-empty {
    color: var(--world-shell-muted);
}

body.world-ui .work-area {
    width: min(100%, var(--world-content));
    min-width: 0;
    margin: 0 auto;
    padding: 24px var(--world-gutter) 48px;
}

body.world-ui .desktop-footer {
    display: none;
}

/* Page hierarchy */

body.world-ui .module-head {
    position: relative;
    z-index: 20;
    min-height: 76px;
    display: flex;
    align-items: flex-start;
    gap: 22px;
    margin: 0 0 18px;
    padding: 17px 18px;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    background: var(--world-glass);
    box-shadow:
        inset 0 0 0 1px rgb(184 198 208 / 26%),
        inset 0 1px rgb(255 255 255 / 88%),
        var(--world-shadow-sm);
    backdrop-filter: blur(20px) saturate(145%);
    -webkit-backdrop-filter: blur(20px) saturate(145%);
}

body.world-ui .module-head > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

body.world-ui .module-head h1 {
    margin: 0;
    color: var(--world-ink);
    font-family: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: 26px;
    font-weight: 740;
    line-height: 1.22;
    letter-spacing: 0;
}

body.world-ui .module-head p {
    max-width: 78ch;
    margin: 5px 0 0;
    color: var(--world-muted);
    font-size: 13px;
    line-height: 1.45;
}

body.world-ui .module-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
}

body.world-ui :is(
    button,
    .btn,
    .btn-line,
    .btn-primary-form,
    .module-actions > a,
    .module-actions > button,
    .toolbar-actions > button,
    .toolbar-actions > a,
    .entry-actions button,
    .search-row button,
    .report-export-toolbar button
) {
    min-height: var(--world-control);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    padding: 0 14px;
    color: var(--world-ink);
    background: rgb(255 255 255 / 76%);
    box-shadow:
        inset 0 0 0 1px rgb(161 178 190 / 34%),
        inset 0 1px rgb(255 255 255 / 96%),
        0 8px 22px rgb(23 35 46 / 9%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
}

body.world-ui :is(
    button,
    .btn,
    .btn-line,
    .module-actions > a,
    .toolbar-actions > button,
    .toolbar-actions > a
):not(:disabled):not([aria-disabled="true"]):hover {
    border-color: rgb(255 255 255 / 96%);
    background: rgb(255 255 255 / 92%);
    box-shadow:
        inset 0 0 0 1px rgb(143 160 172 / 55%),
        inset 0 1px #fff,
        0 10px 24px rgb(23 35 46 / 11%);
    transform: translateY(-1px);
}

body.world-ui :is(
    button,
    .btn,
    .btn-line,
    .module-actions > a,
    .toolbar-actions > a,
    .dashboard-quick-card,
    .dashboard-focus-list > a,
    .home-menu-card
):not(:disabled):not([aria-disabled="true"]):active {
    transform: translateY(0) scale(.985);
}

body.world-ui :is(
    .btn-primary-form,
    button[type="submit"]:not(.btn-line):not(.danger-line):not(.danger-action):not(.btn-danger-form):not(.whatsapp-line)
) {
    border-color: rgb(255 255 255 / 32%);
    color: #fff;
    background: #076d68;
    box-shadow:
        inset 0 1px rgb(255 255 255 / 22%),
        inset 0 0 0 1px rgb(5 89 83 / 36%),
        0 10px 24px rgb(8 127 122 / 20%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.world-ui :is(
    .btn-primary-form,
    button[type="submit"]:not(.btn-line):not(.danger-line):not(.danger-action):not(.btn-danger-form):not(.whatsapp-line)
):not(:disabled):hover {
    border-color: rgb(255 255 255 / 42%);
    color: #fff;
    background: #065b57;
    box-shadow:
        inset 0 1px rgb(255 255 255 / 20%),
        0 13px 28px rgb(8 127 122 / 26%);
}

body.world-ui :is(button, .btn, a)[disabled],
body.world-ui :is(button, .btn, a).disabled,
body.world-ui :is(button, .btn, a)[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .48;
    box-shadow: none;
    transform: none;
}

body.world-ui .danger-line,
body.world-ui .danger-action,
body.world-ui .btn-danger-form,
body.world-ui .delete-row button {
    border-color: rgb(255 255 255 / 72%);
    color: var(--world-danger);
    background: rgb(255 240 239 / 76%);
    box-shadow:
        inset 0 0 0 1px rgb(180 35 24 / 16%),
        inset 0 1px rgb(255 255 255 / 90%);
}

body.world-ui .danger-line:not(:disabled):hover,
body.world-ui .danger-action:not(:disabled):hover,
body.world-ui .btn-danger-form:not(:disabled):hover,
body.world-ui .delete-row button:not(:disabled):hover {
    border-color: var(--world-danger);
    color: #fff;
    background: var(--world-danger);
}

body.world-ui .whatsapp-line {
    border-color: rgb(255 255 255 / 72%);
    color: #126b43;
    background: rgb(236 249 241 / 78%);
    box-shadow:
        inset 0 0 0 1px rgb(18 107 67 / 16%),
        inset 0 1px rgb(255 255 255 / 90%);
}

body.world-ui .ui-action-menu {
    position: relative;
}

body.world-ui .ui-action-menu > summary {
    min-height: var(--world-control);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    padding: 0 13px;
    color: var(--world-ink);
    background: var(--world-glass-strong);
    box-shadow:
        inset 0 0 0 1px rgb(184 198 208 / 42%),
        inset 0 1px rgb(255 255 255 / 92%),
        0 7px 18px rgb(23 35 46 / 7%);
    backdrop-filter: blur(16px) saturate(145%);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    font-size: 12px;
    font-weight: 650;
    list-style: none;
}

body.world-ui .ui-action-menu > summary::-webkit-details-marker {
    display: none;
}

body.world-ui .ui-action-menu[open] > summary {
    border-color: var(--world-brand);
    color: var(--world-brand-deep);
    background: var(--world-brand-soft);
}

body.world-ui .ui-action-menu-content,
body.world-ui .reports-menu-content {
    min-width: 220px;
    overflow: hidden;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    padding: 6px;
    background: rgb(255 255 255 / 84%);
    box-shadow: var(--world-shadow-glass);
    backdrop-filter: blur(24px) saturate(155%);
    -webkit-backdrop-filter: blur(24px) saturate(155%);
    animation: world-popover-in var(--world-normal) var(--world-ease) both;
}

body.world-ui .ui-action-menu-content :is(a, button, span:not(.ui-action-menu-label)) {
    min-height: 38px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border: 0;
    border-radius: var(--world-radius);
    padding: 0 10px;
    color: var(--world-text);
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    text-decoration: none;
}

body.world-ui .ui-action-menu-content :is(a, button):not(:disabled):hover {
    color: var(--world-brand-deep);
    background: var(--world-brand-soft);
    transform: none;
}

body.world-ui .ui-action-menu-label {
    display: block;
    padding: 7px 10px 4px;
    color: var(--world-soft);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Forms and operational surfaces */

body.world-ui :is(.entry-panel, .grid-panel, .work-panel, .report-filter-panel) {
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    background: var(--world-glass);
    box-shadow:
        inset 0 0 0 1px rgb(157 175 187 / 20%),
        inset 0 1px rgb(255 255 255 / 96%),
        0 2px 5px rgb(23 35 46 / 5%),
        0 18px 46px rgb(23 35 46 / 10%);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}

body.world-ui :is(.entry-panel, .work-panel) {
    padding: 18px;
}

body.world-ui .grid-panel {
    padding: 0;
    overflow: hidden;
    background: rgb(255 255 255 / 62%);
}

body.world-ui .master-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

body.world-ui .entry-workflow-section {
    margin: 0;
    padding: 0 0 17px;
    border: 0;
    border-bottom: 1px solid var(--world-line);
    background: transparent;
}

body.world-ui .section-title,
body.world-ui .inline-title {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 0 0 11px;
    border-bottom: 1px solid var(--world-line);
}

body.world-ui .section-title h2,
body.world-ui .inline-title h2 {
    margin: 0;
    color: var(--world-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

body.world-ui .section-title > span,
body.world-ui .inline-title > span {
    margin-left: auto;
    color: var(--world-muted);
    font-size: 11px;
}

body.world-ui .form-grid {
    gap: 12px 16px;
    padding: 16px 0 0;
}

body.world-ui :is(.form-grid, .report-filter-grid, .login-form, .search-row, .sales-item-picker) label {
    color: #52635d;
    font-size: 11px;
    font-weight: 650;
}

body.world-ui :is(
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
    select,
    textarea
) {
    min-height: var(--world-control);
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    padding: 9px 12px;
    color: var(--world-ink);
    background-color: rgb(255 255 255 / 72%);
    box-shadow:
        inset 0 0 0 1px rgb(184 198 208 / 58%),
        inset 0 1px 2px rgb(255 255 255 / 82%),
        0 4px 12px rgb(23 35 46 / 4%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font: inherit;
}

body.world-ui textarea {
    min-height: 84px;
    resize: vertical;
}

body.world-ui :is(input, select, textarea):hover:not(:disabled):not([readonly]) {
    border-color: rgb(255 255 255 / 96%);
    box-shadow:
        inset 0 0 0 1px rgb(124 145 158 / 70%),
        inset 0 1px 2px rgb(255 255 255 / 90%),
        0 5px 14px rgb(23 35 46 / 6%);
}

body.world-ui :is(input, select, textarea):focus {
    border-color: var(--world-focus);
    outline: 0;
    background-color: rgb(255 255 255 / 90%);
    box-shadow:
        0 0 0 4px var(--world-focus-ring),
        inset 0 1px 2px rgb(255 255 255 / 90%);
}

body.world-ui :is(input, select, textarea)[readonly],
body.world-ui :is(input, select, textarea):disabled {
    color: #6f7d78;
    background: rgb(237 242 245 / 78%);
    box-shadow: none;
}

body.world-ui input::placeholder,
body.world-ui textarea::placeholder {
    color: #889690;
    opacity: 1;
}

body.world-ui input[type="checkbox"],
body.world-ui input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--world-brand);
}

body.world-ui .check-row {
    min-height: var(--world-control);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--world-text);
}

body.world-ui .sales-item-picker,
body.world-ui .purchase-import-panel {
    margin: 16px -10px 0;
    padding: 13px 14px;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    background: rgb(255 255 255 / 46%);
    box-shadow: inset 0 0 0 1px rgb(184 198 208 / 24%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.world-ui .sales-item-picker button {
    min-width: 112px;
}

body.world-ui .entry-disclosure {
    margin: 14px 0;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    background: rgb(255 255 255 / 48%);
    box-shadow: inset 0 0 0 1px rgb(184 198 208 / 25%);
}

body.world-ui .entry-disclosure > summary {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    color: var(--world-ink);
    font-size: 12px;
    font-weight: 680;
}

body.world-ui .entry-disclosure[open] > summary {
    border-bottom: 1px solid var(--world-line);
    color: var(--world-brand-deep);
    background: var(--world-brand-soft);
}

body.world-ui .entry-disclosure-content {
    padding: 14px;
}

body.world-ui .entry-actions,
body.world-ui .delete-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--world-line);
}

body.world-ui .search-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--world-line);
    background: rgb(247 249 251 / 80%);
}

body.world-ui .report-filter-panel {
    margin: 0 0 12px;
    padding: 14px;
    background: var(--world-glass);
}

body.world-ui .report-filter-grid {
    gap: 10px 12px;
}

body.world-ui .report-filter-grid button[type="submit"] {
    align-self: end;
}

/* Status and system feedback */

body.world-ui :is(.message-bar, .status-band, .validation-summary:not(:empty)) {
    position: relative;
    margin: 0 0 14px;
    border: 1px solid var(--world-line);
    border-left-width: 3px;
    border-radius: var(--world-radius);
    padding: 11px 14px;
    color: var(--world-text);
    background: var(--world-glass-strong);
    box-shadow:
        inset 0 1px rgb(255 255 255 / 82%),
        var(--world-shadow-xs);
    backdrop-filter: blur(14px) saturate(135%);
    -webkit-backdrop-filter: blur(14px) saturate(135%);
    font-size: 12px;
}

body.world-ui :is(.message-bar.success, .status-band.ok) {
    border-color: #a7d8bf;
    border-left-color: var(--world-success);
    color: #155d40;
    background: var(--world-success-soft);
}

body.world-ui :is(.message-bar.error, .status-band.error, .validation-summary:not(:empty)) {
    border-color: #efb5b0;
    border-left-color: var(--world-danger);
    color: #8f2018;
    background: var(--world-danger-soft);
}

body.world-ui :is(.message-bar.warning, .status-band.warn, .status-band.warning) {
    border-color: #e7ca86;
    border-left-color: var(--world-amber);
    color: #724800;
    background: var(--world-amber-soft);
}

body.world-ui .field-validation-error,
body.world-ui .text-danger {
    color: var(--world-danger);
    font-size: 11px;
    font-weight: 600;
}

body.world-ui [aria-invalid="true"] {
    border-color: var(--world-danger) !important;
    box-shadow: 0 0 0 3px rgb(180 35 24 / 12%) !important;
}

/* Data-dense tables */

body.world-ui .data-grid-wrap,
body.world-ui .table-wrap,
body.world-ui .statement-wrap {
    max-width: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #99aaa4 #edf2f0;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
}

body.world-ui .data-grid-wrap::-webkit-scrollbar,
body.world-ui .table-wrap::-webkit-scrollbar,
body.world-ui .statement-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body.world-ui .data-grid-wrap::-webkit-scrollbar-track,
body.world-ui .table-wrap::-webkit-scrollbar-track,
body.world-ui .statement-wrap::-webkit-scrollbar-track {
    background: #edf2f0;
}

body.world-ui .data-grid-wrap::-webkit-scrollbar-thumb,
body.world-ui .table-wrap::-webkit-scrollbar-thumb,
body.world-ui .statement-wrap::-webkit-scrollbar-thumb {
    border: 2px solid #edf2f0;
    border-radius: var(--world-radius);
    background: #91a39d;
}

body.world-ui .data-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--world-text);
    background: var(--world-surface);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

body.world-ui .data-grid thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: 42px;
    padding: 10px 11px;
    border: 0;
    border-right: 1px solid #e5ebe9;
    border-bottom: 1px solid var(--world-line-strong);
    color: #4e605a;
    background: #f4f7f6;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .025em;
    text-transform: none;
    white-space: nowrap;
}

body.world-ui .data-grid tbody td {
    min-height: 42px;
    padding: 9px 11px;
    border: 0;
    border-right: 1px solid #edf1f0;
    border-bottom: 1px solid #e3e9e7;
    color: var(--world-text);
    background: var(--world-surface);
    vertical-align: middle;
}

body.world-ui .data-grid tbody tr:nth-child(even) td {
    background: #fbfcfc;
}

body.world-ui .data-grid tbody tr:hover td {
    background: #f0f7f4;
}

body.world-ui .data-grid tbody tr.selected td,
body.world-ui .data-grid tbody tr[aria-selected="true"] td {
    background: #e5f3ef;
    box-shadow: inset 0 1px #c8e4dc, inset 0 -1px #c8e4dc;
}

body.world-ui .data-grid tfoot :is(th, td) {
    padding: 10px 11px;
    border-top: 1px solid var(--world-line-strong);
    color: var(--world-ink);
    background: #edf3f1;
    font-weight: 750;
}

body.world-ui .data-grid a {
    color: #1f55aa;
    font-weight: 650;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

body.world-ui .data-grid a:hover {
    color: #163f82;
}

body.world-ui .data-grid :is(input, select, textarea) {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 12px;
}

body.world-ui :is(.num, td.num, th.num) {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

body.world-ui .table-status,
body.world-ui .badge {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--world-line);
    border-radius: var(--world-radius);
    padding: 0 8px;
    color: var(--world-text);
    background: var(--world-surface-soft);
    font-size: 10px;
    font-weight: 700;
}

/* Saved Sales invoices: dense on desktop, touch-native on narrow screens. */

body.world-ui .sales-history-panel {
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr);
}

body.world-ui .sales-history-heading {
    min-height: 62px;
    display: flex;
    align-items: center;
    padding: 11px 14px;
    border-bottom: 1px solid rgb(184 198 208 / 48%);
    background: rgb(244 249 248 / 70%);
}

body.world-ui .sales-history-heading h2 {
    margin: 0;
    color: var(--world-ink);
    font-size: 14px;
    font-weight: 720;
    letter-spacing: 0;
}

body.world-ui .sales-history-heading p {
    margin: 2px 0 0;
    color: var(--world-muted);
    font-size: 11px;
}

body.world-ui .sales-history-search {
    min-height: 60px;
    padding: 8px 14px;
    background: rgb(247 250 250 / 56%);
}

body.world-ui .sales-history-search input {
    min-width: 0;
}

body.world-ui .sales-history-table-wrap {
    max-height: min(48dvh, 590px);
    background: rgb(255 255 255 / 54%);
}

body.world-ui .data-grid.sales-entry-list-grid {
    min-width: 1020px !important;
    table-layout: fixed;
}

body.world-ui .sales-entry-list-grid :is(th, td):nth-child(1) {
    width: 64px;
}

body.world-ui .sales-entry-list-grid :is(th, td):nth-child(2) {
    width: 122px;
}

body.world-ui .sales-entry-list-grid :is(th, td):nth-child(3) {
    width: 112px;
}

body.world-ui .sales-entry-list-grid :is(th, td):nth-child(5) {
    width: 105px;
}

body.world-ui .sales-entry-list-grid :is(th, td):nth-child(6) {
    width: 70px;
}

body.world-ui .sales-entry-list-grid :is(th, td):nth-child(7) {
    width: 78px;
}

body.world-ui .sales-entry-list-grid :is(th, td):nth-child(8),
body.world-ui .sales-entry-list-grid :is(th, td):nth-child(9) {
    width: 108px;
}

body.world-ui .sales-entry-list-grid :is(th, td):nth-child(10) {
    width: 92px;
}

body.world-ui .sales-entry-list-grid .sales-history-customer {
    overflow-wrap: anywhere;
}

body.world-ui .sales-entry-list-grid .table-status {
    border-color: rgb(8 127 122 / 20%);
    color: var(--world-brand-deep);
    background: rgb(228 245 242 / 76%);
}

/* Metrics and reports */

body.world-ui .metric-grid {
    gap: 10px;
    margin: 0 0 14px;
}

body.world-ui .metric-card {
    min-height: 116px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    padding: 14px;
    background: rgb(255 255 255 / 66%);
    box-shadow:
        inset 0 0 0 1px rgb(184 198 208 / 28%),
        inset 0 1px rgb(255 255 255 / 90%),
        0 9px 24px rgb(23 35 46 / 6%);
    backdrop-filter: blur(16px) saturate(135%);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
}

body.world-ui .metric-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    content: "";
    background: var(--world-brand);
    opacity: .68;
}

body.world-ui .metric-card:nth-child(3n + 2)::before {
    background: var(--world-cobalt);
}

body.world-ui .metric-card:nth-child(3n)::before {
    background: var(--world-violet);
}

body.world-ui .metric-card > span {
    color: var(--world-muted);
    font-size: 11px;
    font-weight: 650;
}

body.world-ui .metric-card strong {
    display: block;
    margin-top: 13px;
    color: var(--world-ink);
    font-size: 23px;
    font-weight: 730;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

body.world-ui .metric-card small {
    display: block;
    margin-top: 8px;
    color: var(--world-muted);
    font-size: 10px;
}

@keyframes world-metric-value-updated {
    0% {
        color: var(--world-ink);
        transform: translateY(0);
    }

    38% {
        color: var(--world-brand-deep);
        transform: translateY(-2px);
    }

    100% {
        color: var(--world-ink);
        transform: translateY(0);
    }
}

body.world-ui .sales-entry-totals .metric-card.value-updated {
    border-color: rgb(8 127 122 / 34%);
    background: rgb(241 251 249 / 82%);
}

body.world-ui .sales-entry-totals .metric-card.value-updated strong {
    animation: world-metric-value-updated 400ms cubic-bezier(.2, .72, .2, 1);
}

body.world-ui .sales-entry-item-grid tbody tr.sales-line-selected > td {
    background: rgb(228 245 242 / 66%);
}

body.world-ui .sales-entry-item-grid tbody tr.sales-line-selected > td:first-child {
    box-shadow: inset 3px 0 0 var(--world-brand);
}

body.world-ui .sales-custom-paper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--world-line);
    border-radius: var(--world-radius);
    background: rgb(255 255 255 / 58%);
}

body.world-ui .sales-custom-paper[hidden] {
    display: none;
}

body.world-ui .sales-custom-paper > div {
    display: grid;
    gap: 7px;
}

body.world-ui dialog.sales-serial-dialog {
    width: min(620px, calc(100vw - 32px));
    max-width: none;
    padding: 0;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    color: var(--world-text);
    background: rgb(255 255 255 / 84%);
    box-shadow: var(--world-shadow-glass);
    backdrop-filter: blur(24px) saturate(130%);
    -webkit-backdrop-filter: blur(24px) saturate(130%);
}

body.world-ui dialog.sales-serial-dialog::backdrop {
    background: rgb(9 22 29 / 48%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

body.world-ui .sales-serial-dialog-frame {
    display: grid;
    gap: 14px;
    padding: 22px;
}

body.world-ui .sales-serial-dialog-frame > header,
body.world-ui .sales-serial-dialog-frame > footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.world-ui .sales-serial-dialog-frame > header {
    justify-content: space-between;
}

body.world-ui .sales-serial-dialog-frame > header span {
    display: block;
    color: var(--world-brand-deep);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

body.world-ui .sales-serial-dialog-frame h2 {
    margin: 2px 0 0;
    color: var(--world-ink);
    font-size: 20px;
}

body.world-ui .sales-serial-dialog-frame p,
body.world-ui .sales-serial-dialog-frame label,
body.world-ui .sales-serial-dialog-frame footer span {
    margin: 0;
    color: var(--world-muted);
    font-size: 12px;
}

body.world-ui .sales-serial-dialog-frame textarea {
    min-height: 220px;
    resize: vertical;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    line-height: 1.55;
}

body.world-ui .sales-serial-feedback {
    min-height: 20px;
    color: var(--world-danger);
    font-size: 12px;
    font-weight: 650;
}

body.world-ui .sales-serial-dialog-frame > footer {
    justify-content: flex-end;
}

body.world-ui .sales-serial-dialog-frame > footer [data-sales-serial-clear],
body.world-ui .sales-serial-dialog-frame > footer span {
    margin-right: auto;
}

@media (max-width: 600px) {
    body.world-ui .sales-custom-paper {
        grid-template-columns: 1fr;
    }

    body.world-ui .sales-serial-dialog-frame {
        padding: 16px;
    }

    body.world-ui .sales-serial-dialog-frame > footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.world-ui .sales-serial-dialog-frame > footer span {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    body.world-ui .sales-serial-dialog-frame > footer button {
        width: 100%;
    }
}

body.world-ui .report-export-toolbar,
body.world-ui .statement-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
    margin: 0 0 12px;
}

body.world-ui .statement-wrap {
    border: 1px solid var(--world-line);
    border-radius: var(--world-radius-lg);
    padding: 18px;
    background: rgb(231 237 242 / 86%);
    box-shadow: inset 0 1px 3px rgb(23 35 46 / 7%);
}

body.world-ui .statement-page {
    border: 1px solid #d0d8d5;
    background: #fff;
    box-shadow: 0 14px 35px rgb(17 31 27 / 10%);
}

body.world-ui .statement-table {
    font-variant-numeric: tabular-nums;
}

body.world-ui .receipt-voucher-print-page {
    display: grid;
    gap: 18px;
    min-height: 270mm;
    padding: 34px 38px;
}

body.world-ui .receipt-print-heading {
    display: grid;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 2px solid #17252d;
    text-align: center;
}

body.world-ui .receipt-print-heading h2,
body.world-ui .receipt-print-heading h3,
body.world-ui .receipt-print-heading p {
    margin: 0;
}

body.world-ui .receipt-print-heading h2 {
    font-size: 22px;
}

body.world-ui .receipt-print-heading h3 {
    margin-top: 10px;
    font-size: 16px;
    letter-spacing: 0;
}

body.world-ui .receipt-print-heading p {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    font-size: 12px;
}

body.world-ui .receipt-print-meta,
body.world-ui .receipt-print-lines {
    border: 1px solid #9aa7ad;
}

body.world-ui .receipt-print-meta th,
body.world-ui .receipt-print-meta td,
body.world-ui .receipt-print-lines th,
body.world-ui .receipt-print-lines td {
    padding: 7px 8px;
    border: 1px solid #c5ced2;
}

body.world-ui .receipt-print-meta th {
    width: 16%;
    color: #2e3c43;
    background: #f1f5f4;
    text-align: left;
    white-space: nowrap;
}

body.world-ui .receipt-print-meta td {
    width: 34%;
}

body.world-ui .receipt-print-lines thead th {
    color: #17252d;
    background: #eaf1ef;
}

body.world-ui .receipt-print-lines tfoot th {
    border-top: 2px solid #17252d;
    font-size: 14px;
    text-align: right;
}

body.world-ui .receipt-print-sr {
    width: 42px;
    text-align: center;
}

body.world-ui .receipt-print-notes {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #c5ced2;
}

body.world-ui .receipt-print-notes p {
    margin: 4px 0 0;
}

body.world-ui .receipt-print-signatures {
    align-self: end;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    padding-top: 54px;
}

body.world-ui .receipt-print-signatures > div {
    padding-top: 7px;
    border-top: 1px solid #17252d;
    font-size: 12px;
    text-align: center;
}

/* Dashboard */

body.world-ui .dashboard-hero {
    position: relative;
    min-height: 132px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0 0 22px;
    padding: 24px 26px;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    background: var(--world-glass);
    box-shadow:
        inset 0 0 0 1px rgb(184 198 208 / 26%),
        inset 0 1px rgb(255 255 255 / 90%),
        0 14px 36px rgb(23 35 46 / 8%);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
}

body.world-ui .dashboard-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 8px;
    border: 1px solid rgb(255 255 255 / 82%);
    border-radius: var(--world-radius-lg);
    color: var(--world-brand-deep);
    background: rgb(228 245 242 / 72%);
    box-shadow: inset 0 0 0 1px rgb(8 127 122 / 10%);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
}

body.world-ui .dashboard-hero h1 {
    margin: 10px 0 0;
    color: var(--world-ink);
    font-family: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: 30px;
    font-weight: 760;
    line-height: 1.15;
    letter-spacing: 0;
}

body.world-ui .dashboard-session {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 7px;
    color: var(--world-muted);
    font-size: 11px;
}

body.world-ui .dashboard-hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

body.world-ui .dashboard-refresh-cluster {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    background: var(--world-glass-strong);
    box-shadow:
        inset 0 0 0 1px rgb(184 198 208 / 42%),
        inset 0 1px rgb(255 255 255 / 92%),
        0 7px 18px rgb(23 35 46 / 7%);
    backdrop-filter: blur(16px) saturate(145%);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
}

body.world-ui .dashboard-auto-refresh {
    position: relative;
    margin: 0;
    cursor: pointer;
}

body.world-ui .dashboard-auto-refresh > input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

body.world-ui .dashboard-auto-refresh-control {
    min-height: var(--world-control);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    border-radius: 0;
    padding: 0 9px 0 12px;
    color: var(--world-text);
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    font-weight: 650;
}

body.world-ui .dashboard-auto-refresh-control svg {
    width: 16px;
    height: 16px;
    color: var(--world-muted);
}

body.world-ui .dashboard-auto-refresh-control small {
    min-width: 29px;
    min-height: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(8 127 122 / 18%);
    border-radius: var(--world-radius);
    color: var(--world-brand-deep);
    background: var(--world-brand-soft);
    font-size: 9px;
    font-weight: 760;
    text-transform: uppercase;
}

body.world-ui .dashboard-auto-refresh > input:focus-visible + .dashboard-auto-refresh-control {
    outline: 2px solid var(--world-focus);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--world-focus-ring);
}

body.world-ui .dashboard-refresh-cluster .dashboard-refresh-action {
    min-height: var(--world-control);
    border: 0;
    border-left: 1px solid rgb(184 198 208 / 52%);
    border-radius: 0;
    background: transparent;
    box-shadow: inset 1px 0 rgb(255 255 255 / 70%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.world-ui .dashboard-refresh-cluster .dashboard-refresh-action:hover {
    border-color: rgb(184 198 208 / 52%);
    background: rgb(255 255 255 / 52%);
    box-shadow: inset 1px 0 rgb(255 255 255 / 78%);
}

body.world-ui .dashboard-auto-refresh > input:not(:checked) + .dashboard-auto-refresh-control {
    color: var(--world-muted);
    opacity: .78;
}

body.world-ui .dashboard-auto-refresh > input:not(:checked) + .dashboard-auto-refresh-control small {
    border-color: var(--world-line);
    color: var(--world-muted);
    background: var(--world-surface-strong);
}

body.world-ui .dashboard-hero-actions.is-auto-refreshing .dashboard-auto-refresh-control svg {
    color: var(--world-brand);
    animation: world-refresh-breathe 2.8s var(--world-ease) infinite;
}

body.world-ui .dashboard-signout-action {
    color: #9b3028;
    background: rgb(255 240 238 / 68%);
    box-shadow:
        inset 0 0 0 1px rgb(180 35 24 / 14%),
        inset 0 1px rgb(255 255 255 / 92%),
        0 7px 18px rgb(23 35 46 / 6%);
}

body.world-ui .dashboard-overview {
    gap: 18px;
}

body.world-ui .dashboard-section {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.world-ui .dashboard-section > .section-title {
    margin-bottom: 10px;
}

body.world-ui :is(.dashboard-quick-card, .dashboard-focus-list > a, .home-menu-card) {
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    color: var(--world-text);
    background: rgb(255 255 255 / 66%);
    box-shadow:
        inset 0 0 0 1px rgb(184 198 208 / 28%),
        inset 0 1px rgb(255 255 255 / 90%),
        0 9px 24px rgb(23 35 46 / 6%);
    backdrop-filter: blur(16px) saturate(135%);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
    text-decoration: none;
}

body.world-ui :is(.dashboard-quick-card, .dashboard-focus-list > a, .home-menu-card):hover {
    border-color: rgb(255 255 255 / 96%);
    color: var(--world-ink);
    background: rgb(255 255 255 / 88%);
    box-shadow: var(--world-shadow-sm);
    transform: translateY(-2px);
}

body.world-ui :is(.dashboard-quick-card, .dashboard-focus-list > a, .home-menu-card) > svg:last-child {
    color: #84948f;
}

body.world-ui .dashboard-quick-card > svg:first-child,
body.world-ui .home-menu-icon,
body.world-ui .dashboard-focus-list > a > svg:first-child {
    color: var(--world-brand);
    background: var(--world-brand-soft);
}

body.world-ui .dashboard-system-details {
    margin-top: 18px;
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    background: var(--world-glass);
    box-shadow:
        inset 0 0 0 1px rgb(184 198 208 / 26%),
        inset 0 1px rgb(255 255 255 / 88%);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

body.world-ui .dashboard-system-details > summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    color: var(--world-text);
    font-weight: 650;
}

/* Login: image-backed, calm glass, no business behavior changes */

body.world-ui.login-body {
    min-height: 100dvh;
    overflow: auto;
    color: var(--world-text);
    background: #edf2f5;
}

body.world-ui.login-body::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    content: "";
    background: rgb(14 23 31 / 38%);
    pointer-events: none;
}

body.world-ui .login-shell,
body.world-ui .login-surface {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    width: 100%;
    display: grid;
    place-items: center;
    padding: 34px;
    background: transparent;
}

body.world-ui .login-workspace {
    width: min(1040px, 100%);
    min-height: 610px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(390px, .88fr);
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 48%);
    border-radius: var(--world-radius-lg);
    background: rgb(255 255 255 / 12%);
    box-shadow:
        inset 0 1px rgb(255 255 255 / 24%),
        0 34px 90px rgb(10 20 29 / 28%);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
}

body.world-ui .login-brand-panel {
    min-height: 610px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px;
    border: 0;
    border-right: 1px solid rgb(255 255 255 / 24%);
    color: #fff;
    background: rgb(24 35 45 / 72%);
    box-shadow: none;
    backdrop-filter: blur(26px) saturate(125%);
    -webkit-backdrop-filter: blur(26px) saturate(125%);
}

body.world-ui .login-brand-panel::after {
    display: none;
}

body.world-ui .login-brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.world-ui .login-brand-mark {
    width: 142px;
    height: 66px;
    flex: 0 0 142px;
    display: block;
    object-fit: cover;
    object-position: center;
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 8px;
    background: #030404;
    box-shadow:
        inset 0 1px rgb(255 255 255 / 14%),
        0 14px 32px rgb(0 0 0 / 22%);
}

body.world-ui .login-brand-copy {
    display: grid;
}

body.world-ui .login-brand-copy strong {
    color: #fff;
    font-size: 18px;
    font-weight: 750;
}

body.world-ui .login-brand-copy span {
    color: rgb(236 243 247 / 76%);
    font-size: 11px;
}

body.world-ui .login-brand-message {
    max-width: 440px;
}

body.world-ui .login-brand-message p {
    margin: 0 0 12px;
    color: #93e7d8;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .055em;
    text-transform: uppercase;
}

body.world-ui .login-brand-message h2 {
    margin: 0;
    color: #fff;
    font-family: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: 34px;
    font-weight: 670;
    line-height: 1.18;
    letter-spacing: 0;
}

body.world-ui .login-brand-context {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgb(238 245 248 / 82%);
    font-size: 11px;
}

body.world-ui .login-panel {
    min-height: 610px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 46px;
    border: 0;
    background: rgb(255 255 255 / 80%);
    box-shadow: none;
    backdrop-filter: blur(32px) saturate(155%);
    -webkit-backdrop-filter: blur(32px) saturate(155%);
}

body.world-ui .login-panel::before {
    display: none;
}

body.world-ui .login-panel-header {
    margin-bottom: 23px;
}

body.world-ui .login-panel h1 {
    margin: 0;
    color: var(--world-ink);
    font-family: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: 27px;
    font-weight: 740;
    line-height: 1.2;
    letter-spacing: 0;
}

body.world-ui .login-panel .muted {
    margin: 7px 0 0;
    color: var(--world-muted);
    font-size: 12px;
}

body.world-ui .login-form {
    display: grid;
    gap: 16px;
}

body.world-ui .login-fieldset {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: 0;
}

body.world-ui .login-fieldset + .login-fieldset {
    padding-top: 16px;
    border-top: 1px solid rgb(189 203 198 / 70%);
}

body.world-ui .login-fieldset legend {
    margin: 0 0 2px;
    color: var(--world-soft);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .045em;
    text-transform: uppercase;
}

body.world-ui .login-field {
    display: grid;
    gap: 6px;
}

body.world-ui .login-form .login-field :is(input, select) {
    min-height: 46px;
    background: rgb(255 255 255 / 66%);
}

body.world-ui .login-password-control {
    position: relative;
}

body.world-ui .login-password-control input {
    width: 100%;
    padding-right: 48px;
}

body.world-ui .login-form .login-password-toggle {
    position: absolute;
    inset: 4px 4px 4px auto;
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    border: 0;
    padding: 0;
    color: var(--world-muted);
    background: transparent;
    box-shadow: none;
}

body.world-ui .login-form > button[type="submit"] {
    width: 100%;
    min-height: 48px;
    margin-top: 2px;
    font-size: 13px;
}

/* Dialogs, native popovers and transient glass */

body.world-ui :is(dialog, .modal-content, .dialog-card, .popover-panel) {
    border: 1px solid var(--world-glass-line);
    border-radius: var(--world-radius-lg);
    background: rgb(255 255 255 / 86%);
    box-shadow: var(--world-shadow-glass);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

body.world-ui dialog::backdrop {
    background: rgb(14 23 31 / 48%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Motion */

@keyframes world-page-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes world-popover-in {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes world-status-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes world-refresh-breathe {
    0%,
    100% {
        opacity: .72;
        transform: scale(.94);
    }
    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}

body.world-ui .work-area > :not(script) {
    animation: world-page-in var(--world-normal) var(--world-ease) both;
}

body.world-ui .work-area > :nth-child(2) {
    animation-delay: 35ms;
}

body.world-ui .work-area > :nth-child(3) {
    animation-delay: 60ms;
}

body.world-ui :is(.message-bar, .status-band) {
    animation: world-status-in var(--world-normal) var(--world-ease) both;
}

/* Compact shell */

@media screen and (max-width: 1200px) {
    body.world-ui {
        --world-gutter: 22px;
    }

    body.world-ui .desktop-frame {
        grid-template-columns: minmax(0, 1fr);
    }

    body.world-ui .desktop-main {
        grid-column: 1;
    }

    html,
    body.world-ui.desktop-body {
        height: auto !important;
        min-height: 100% !important;
        max-height: none !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: auto !important;
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body.world-ui .desktop-frame,
    body.world-ui .desktop-main {
        height: auto !important;
        min-height: 100dvh !important;
        max-height: none !important;
        overflow: visible !important;
    }

    body.world-ui .work-area {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        overscroll-behavior: auto !important;
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body.world-ui .module-head {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    body.world-ui :is(
        .data-grid-wrap,
        .table-wrap,
        .statement-wrap,
        .sales-item-wrap,
        .purchase-item-wrap,
        .mobile-x-scrollbar
    ) {
        overscroll-behavior: auto !important;
        scrollbar-gutter: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y !important;
    }

    body.world-ui .side-menu {
        display: none;
    }

    body.world-ui .shell-menu-trigger {
        display: inline-flex !important;
    }

    body.world-ui .shell-navigation-content {
        inset: 0 auto 0 0;
        width: min(320px, calc(100vw - 28px));
        border-right: 1px solid rgb(255 255 255 / 13%);
        color: var(--world-shell-text);
        box-shadow: 24px 0 70px rgb(10 20 29 / 36%);
        transform: translateX(-105%);
        transition: transform var(--world-normal) var(--world-ease);
        background: rgb(24 35 45 / 92%);
        backdrop-filter: blur(30px) saturate(135%);
        -webkit-backdrop-filter: blur(30px) saturate(135%);
    }

    body.world-ui .shell-navigation[open] > .shell-navigation-content {
        inset: 0 auto 0 0;
        width: min(320px, calc(100vw - 28px));
        border-right: 1px solid rgb(255 255 255 / 13%);
        color: var(--world-shell-text);
        background: rgb(24 35 45 / 92%);
        box-shadow: 24px 0 70px rgb(10 20 29 / 36%);
    }

    body.world-ui.ui-navigation-open .shell-navigation-content,
    body.world-ui .shell-navigation[open].ui-navigation-open .shell-navigation-content {
        transform: translateX(0);
    }

    body.world-ui .shell-navigation-mobile-head {
        min-height: var(--world-top-height);
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 14px;
        border-bottom: 1px solid var(--world-shell-line);
    }

    body.world-ui .shell-navigation-mobile-head .side-brand-copy {
        display: none;
    }

    body.world-ui .shell-navigation-mobile-head button {
        width: 42px;
        min-width: 42px;
        height: 42px;
        margin-left: auto;
        border-color: rgb(255 255 255 / 12%);
        color: #fff;
        background: rgb(255 255 255 / 6%);
        box-shadow: none;
    }

    body.world-ui .work-area {
        width: 100%;
    }
}

/* Tablet and mobile work surfaces */

@media screen and (max-width: 767px) {
    body.world-ui {
        --world-gutter: 14px;
        --world-top-height: 60px;
        font-size: 13px;
    }

    body.world-ui .top-bar {
        min-height: var(--world-top-height);
        gap: 9px;
        top: 8px;
        margin: 8px 10px 0;
        padding: 0 10px;
        backdrop-filter: blur(18px) saturate(140%);
        -webkit-backdrop-filter: blur(18px) saturate(140%);
    }

    body.world-ui .shell-menu-trigger {
        width: 42px;
        min-width: 42px;
        height: 42px;
    }

    body.world-ui .top-product-context {
        display: none;
    }

    body.world-ui .top-brand-home > span {
        display: none;
    }

    body.world-ui .top-brand-home .tdr-brand-mark {
        width: 72px;
        height: 34px;
        flex-basis: 72px;
    }

    body.world-ui .top-session {
        margin: 0 0 0 auto;
        padding: 4px 6px;
    }

    body.world-ui .top-company-avatar {
        display: none;
    }

    body.world-ui .top-session-copy {
        text-align: right;
    }

    body.world-ui .top-company {
        max-width: 220px;
        font-size: 11px;
    }

    body.world-ui .top-context {
        font-size: 9px;
    }

    body.world-ui .work-area {
        padding: 18px var(--world-gutter) 92px;
    }

    body.world-ui .module-head {
        min-height: auto;
        display: block;
        margin-bottom: 14px;
        padding: 15px;
        border: 1px solid var(--world-glass-line);
        border-radius: var(--world-radius-lg);
    }

    body.world-ui .module-head h1 {
        font-size: 23px;
    }

    body.world-ui .module-head p {
        margin-top: 4px;
        font-size: 12px;
    }

    body.world-ui .module-head .module-actions {
        position: fixed !important;
        inset: auto 0 0 !important;
        z-index: 70;
        width: 100vw !important;
        min-height: 66px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
        gap: 8px;
        margin: 0 !important;
        padding: 8px 12px max(8px, env(safe-area-inset-bottom));
        border: 0;
        border-top: 1px solid rgb(255 255 255 / 82%);
        border-radius: 0 !important;
        background: rgb(255 255 255 / 76%);
        box-shadow:
            inset 0 1px rgb(255 255 255 / 92%),
            0 -16px 40px rgb(23 35 46 / 12%);
        backdrop-filter: blur(16px) saturate(140%);
        -webkit-backdrop-filter: blur(16px) saturate(140%);
    }

    body.world-ui .module-head .module-actions > * {
        width: 100%;
        min-width: 0;
        min-height: 46px;
        margin: 0 !important;
        white-space: nowrap;
    }

    body.world-ui .module-head .module-actions:has(> :nth-child(3)) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.world-ui .ui-action-menu-content,
    body.world-ui .reports-menu-content {
        position: fixed !important;
        inset: auto 12px calc(72px + env(safe-area-inset-bottom)) 12px !important;
        width: auto;
        max-height: min(70dvh, 560px);
        overflow: auto;
    }

    body.world-ui :is(.entry-panel, .work-panel, .report-filter-panel) {
        padding: 14px;
        backdrop-filter: blur(10px) saturate(125%);
        -webkit-backdrop-filter: blur(10px) saturate(125%);
    }

    body.world-ui .grid-panel {
        min-height: 330px;
    }

    body.world-ui .form-grid,
    body.world-ui .report-filter-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 6px;
    }

    body.world-ui .form-grid > :is(input, select, textarea, .check-row, .field-control),
    body.world-ui .report-filter-grid > :is(input, select, textarea, .check-row, button) {
        width: 100%;
        grid-column: 1 !important;
    }

    body.world-ui .form-grid > label:not(.check-row),
    body.world-ui .report-filter-grid > label:not(.check-row) {
        grid-column: 1 !important;
        margin-top: 8px;
    }

    body.world-ui .sales-item-picker {
        margin: 14px -6px 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 94px;
        gap: 6px 8px;
    }

    body.world-ui .sales-item-picker > label:first-child,
    body.world-ui .sales-item-picker > select {
        grid-column: 1 / -1;
    }

    body.world-ui .sales-item-picker > button {
        min-width: 0;
    }

    body.world-ui .section-title,
    body.world-ui .inline-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    body.world-ui .section-title > span,
    body.world-ui .inline-title > span {
        margin-left: 0;
    }

    body.world-ui .inline-title .toolbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    body.world-ui .inline-title .toolbar-actions > * {
        min-width: 0;
        width: 100%;
    }

    body.world-ui .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.world-ui .metric-card {
        min-height: 104px;
        padding: 12px;
    }

    body.world-ui .metric-card strong {
        margin-top: 10px;
        font-size: 20px;
    }

    body.world-ui .report-export-toolbar,
    body.world-ui .statement-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.world-ui .report-export-toolbar > *,
    body.world-ui .statement-toolbar > * {
        width: 100%;
        min-width: 0;
    }

    body.world-ui .dashboard-hero {
        min-height: auto;
        display: block;
        margin: 0 0 17px;
        padding: 18px;
    }

    body.world-ui .dashboard-hero h1 {
        font-size: 24px;
    }

    body.world-ui .dashboard-session {
        gap: 3px 9px;
        font-size: 10px;
    }

    body.world-ui .dashboard-hero-actions {
        position: static;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        margin: 16px 0 0;
    }

    body.world-ui .dashboard-hero-main {
        padding-right: 0;
    }

    body.world-ui .dashboard-refresh-cluster {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    body.world-ui .dashboard-auto-refresh-control,
    body.world-ui .dashboard-hero-actions .btn-line {
        width: 100%;
        min-width: 0;
    }

    body.world-ui .dashboard-overview {
        gap: 17px;
    }

    body.world-ui .dashboard-quick-grid,
    body.world-ui .home-menu-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.world-ui :is(.sales-item-wrap, .purchase-item-wrap)
        :not(.sales-entry-item-grid):not(.purchase-entry-item-grid) {
        min-width: 0;
    }

    body.world-ui :is(.sales-item-wrap, .purchase-item-wrap)
        :not(:has(.sales-entry-item-grid)):not(:has(.purchase-entry-item-grid)) {
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        overscroll-behavior: auto !important;
        scrollbar-gutter: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y !important;
    }

    body.world-ui .login-shell,
    body.world-ui .login-surface {
        min-height: 100dvh;
        padding: 12px;
    }

    body.world-ui.login-body {
        background-attachment: scroll;
    }

    body.world-ui .login-workspace {
        width: min(100%, 480px);
        min-height: auto;
        display: block;
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    body.world-ui .login-brand-panel {
        min-height: auto;
        display: flex;
        padding: 18px 18px 14px;
        border: 1px solid rgb(255 255 255 / 24%);
        border-bottom: 0;
        border-radius: var(--world-radius-lg) var(--world-radius-lg) 0 0;
        background: rgb(24 35 45 / 78%);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    body.world-ui .login-brand-mark {
        width: 126px;
        height: 58px;
        flex-basis: 126px;
    }

    body.world-ui .login-brand-message,
    body.world-ui .login-brand-context {
        display: none;
    }

    body.world-ui .login-panel {
        min-height: auto;
        padding: 24px 18px;
        border: 1px solid rgb(255 255 255 / 56%);
        border-radius: 0 0 var(--world-radius-lg) var(--world-radius-lg);
        background: rgb(255 255 255 / 84%);
    }

    body.world-ui .login-panel h1 {
        font-size: 24px;
    }
}

@media screen and (max-width: 1099px) {
    body.world-ui .sales-history-panel {
        grid-template-rows: auto auto auto;
    }

    body.world-ui .sales-history-table-wrap {
        min-height: 0 !important;
        max-height: none !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        scrollbar-gutter: auto !important;
        overscroll-behavior-x: contain !important;
        overscroll-behavior-y: auto !important;
        touch-action: pan-x pan-y !important;
    }
}

@media screen and (max-width: 767px) {
    body.world-ui .work-area > .master-split.sales-entry-split {
        height: auto !important;
        min-height: 0 !important;
        display: block !important;
    }

    body.world-ui .sales-entry-split > .entry-panel {
        margin-bottom: 16px;
    }

    body.world-ui .grid-panel.sales-history-panel {
        width: 100%;
        max-width: 100% !important;
        min-height: 0 !important;
        display: block;
        overflow: visible !important;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    body.world-ui .sales-history-heading {
        min-height: 58px;
        margin-bottom: 8px;
        padding: 10px 12px;
        border: 1px solid var(--world-glass-line);
        border-radius: var(--world-radius-lg);
        background: rgb(245 250 249 / 74%);
        box-shadow:
            inset 0 1px rgb(255 255 255 / 96%),
            0 10px 28px rgb(23 35 46 / 8%);
    }

    body.world-ui .sales-history-heading h2 {
        font-size: 15px;
    }

    body.world-ui .sales-history-search {
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 7px;
        margin-bottom: 9px;
        padding: 8px;
        border: 1px solid var(--world-glass-line);
        border-radius: var(--world-radius-lg);
        background: rgb(248 251 251 / 72%);
        box-shadow:
            inset 0 1px rgb(255 255 255 / 94%),
            0 9px 24px rgb(23 35 46 / 7%);
    }

    body.world-ui .sales-history-search > :is(input, button) {
        min-height: 46px;
    }

    body.world-ui .sales-history-search button {
        width: auto;
        min-width: 92px;
    }

    body.world-ui .grid-panel.sales-history-panel > .data-grid-wrap.sales-history-table-wrap {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-x: clip !important;
        overflow-y: visible !important;
        padding: 0 0 4px;
        border: 0;
        background: transparent;
        scrollbar-gutter: auto !important;
    }

    body.world-ui table.data-grid.sales-entry-list-grid {
        width: 100% !important;
        min-width: 0 !important;
        display: block;
        border: 0;
        background: transparent;
        table-layout: auto;
    }

    body.world-ui .sales-entry-list-grid thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    body.world-ui .sales-entry-list-grid tbody {
        width: 100%;
        min-height: var(--sales-history-reserved-height, 0);
        display: grid;
        align-content: start;
        gap: 10px;
    }

    body.world-ui .sales-entry-list-grid tbody tr {
        position: relative;
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas:
            "number id status"
            "customer customer customer"
            "date store store"
            "net balance balance"
            "document tax tax";
        gap: 0 12px;
        overflow: hidden;
        border: 1px solid rgb(255 255 255 / 90%);
        border-radius: var(--world-radius-lg);
        padding: 13px;
        background: rgb(248 252 251 / 82%);
        box-shadow:
            inset 0 0 0 1px rgb(155 174 186 / 22%),
            inset 0 1px rgb(255 255 255 / 100%),
            0 12px 30px rgb(23 35 46 / 9%);
        content-visibility: auto;
        contain-intrinsic-size: auto 246px;
    }

    body.world-ui .sales-entry-list-grid tbody tr.selected {
        border-color: rgb(8 127 122 / 58%);
        box-shadow:
            inset 3px 0 var(--world-brand),
            inset 0 0 0 1px rgb(8 127 122 / 20%),
            inset 0 1px rgb(255 255 255 / 100%),
            0 14px 34px rgb(8 127 122 / 14%);
    }

    body.world-ui .sales-entry-list-grid tbody td,
    body.world-ui .sales-entry-list-grid tbody tr:nth-child(even) td,
    body.world-ui .sales-entry-list-grid tbody tr:hover td,
    body.world-ui .sales-entry-list-grid tbody tr.selected td {
        width: auto !important;
        min-width: 0 !important;
        min-height: 0;
        display: flex;
        align-items: flex-start;
        gap: 3px;
        overflow-wrap: anywhere;
        border: 0;
        padding: 7px 0;
        color: var(--world-text);
        background: transparent !important;
        box-shadow: none;
        white-space: normal;
        text-align: left;
    }

    body.world-ui .sales-entry-list-grid tbody td::before {
        content: attr(data-mobile-label);
        flex: 0 0 auto;
        color: var(--world-soft);
        font-size: 9px;
        font-weight: 740;
        line-height: 1.3;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    body.world-ui .sales-history-number {
        grid-area: number;
        padding-top: 0 !important;
    }

    body.world-ui .sales-history-number::before,
    body.world-ui .sales-history-status::before {
        display: none;
    }

    body.world-ui .sales-history-number a {
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        color: var(--world-brand-deep);
        font-size: 14px;
        font-weight: 750;
        text-decoration: none;
    }

    body.world-ui .sales-history-id {
        grid-area: id;
        align-self: center;
        padding-top: 0 !important;
        color: var(--world-muted) !important;
        font-size: 10px;
        white-space: nowrap !important;
    }

    body.world-ui .sales-history-id::before {
        content: "#";
    }

    body.world-ui .sales-history-status {
        grid-area: status;
        align-self: center;
        justify-self: end;
        padding-top: 0 !important;
    }

    body.world-ui .sales-history-status .table-status {
        min-height: 27px;
        padding: 0 7px;
        font-size: 9px;
    }

    body.world-ui .sales-history-customer {
        grid-area: customer;
        min-height: 44px !important;
        flex-direction: column;
        justify-content: center;
        border-top: 1px solid rgb(184 198 208 / 44%) !important;
        border-bottom: 1px solid rgb(184 198 208 / 44%) !important;
        color: var(--world-ink) !important;
        font-size: 13px;
        font-weight: 660;
    }

    body.world-ui .sales-history-date {
        grid-area: date;
    }

    body.world-ui .sales-history-store {
        grid-area: store;
    }

    body.world-ui .sales-history-net {
        grid-area: net;
    }

    body.world-ui .sales-history-balance {
        grid-area: balance;
    }

    body.world-ui .sales-history-document {
        grid-area: document;
    }

    body.world-ui .sales-history-tax {
        grid-area: tax;
    }

    body.world-ui :is(
        .sales-history-date,
        .sales-history-store,
        .sales-history-net,
        .sales-history-balance,
        .sales-history-document,
        .sales-history-tax
    ) {
        flex-direction: column;
    }

    body.world-ui :is(.sales-history-store, .sales-history-balance, .sales-history-tax) {
        align-items: flex-end !important;
        text-align: right !important;
    }

    body.world-ui :is(.sales-history-net, .sales-history-balance) {
        color: var(--world-ink) !important;
        font-size: 14px;
        font-weight: 720;
        font-variant-numeric: tabular-nums;
    }

    body.world-ui .sales-history-table-wrap > .table-empty-state {
        min-height: 150px;
        border: 1px solid var(--world-glass-line);
        border-radius: var(--world-radius-lg);
        background: rgb(255 255 255 / 70%);
    }
}

@media screen and (max-width: 359px) {
    body.world-ui .sales-history-search button {
        width: 48px;
        min-width: 48px;
        padding: 0;
    }

    body.world-ui .sales-history-search button > span {
        display: none;
    }
}

/* Large report sets remain a contained table instead of creating thousands of mobile cards. */

@media screen and (max-width: 1099px) {
    body.world-ui .data-grid-wrap:has(> table.ui-mobile-report-grid tbody tr:nth-child(51)) {
        max-width: 100% !important;
        max-height: 66dvh !important;
        overflow: auto !important;
        border: 1px solid var(--world-line) !important;
        background: var(--world-surface) !important;
        overscroll-behavior: auto !important;
        scrollbar-gutter: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y !important;
    }

    body.world-ui table.data-grid.ui-mobile-report-grid:has(tbody tr:nth-child(51)) {
        width: max-content !important;
        min-width: 100% !important;
        display: table !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        background: var(--world-surface) !important;
    }

    body.world-ui table.data-grid.ui-mobile-report-grid:has(tbody tr:nth-child(51)) thead {
        position: static !important;
        width: auto !important;
        height: auto !important;
        display: table-header-group !important;
        overflow: visible !important;
        clip: auto !important;
        white-space: normal !important;
    }

    body.world-ui table.data-grid.ui-mobile-report-grid:has(tbody tr:nth-child(51)) tbody {
        display: table-row-group !important;
    }

    body.world-ui table.data-grid.ui-mobile-report-grid:has(tbody tr:nth-child(51)) tbody tr {
        position: static !important;
        display: table-row !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.world-ui table.data-grid.ui-mobile-report-grid:has(tbody tr:nth-child(51)) tbody td {
        min-width: 92px !important;
        display: table-cell !important;
        padding: 10px 11px !important;
        border-right: 1px solid #e7ecea !important;
        border-bottom: 1px solid #e7ecea !important;
        background: var(--world-surface) !important;
        white-space: nowrap !important;
    }

    body.world-ui table.data-grid.ui-mobile-report-grid:has(tbody tr:nth-child(51)) tbody td::before,
    body.world-ui table.data-grid.ui-mobile-report-grid:has(tbody tr:nth-child(51)) .mobile-report-row-toggle {
        display: none !important;
    }

    body.world-ui .data-grid-wrap:has(> table.ui-mobile-report-grid tbody tr:nth-child(51))
        + .mobile-x-scrollbar {
        display: block !important;
    }
}

@media (pointer: coarse) {
    body.world-ui :is(
        button,
        input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
        select,
        textarea,
        .btn,
        .btn-line,
        .btn-primary-form,
        .shell-menu-trigger,
        .shell-navigation-close,
        .side-menu a,
        .shell-navigation-content a,
        .ui-action-menu-content a,
        .ui-action-menu-content button,
        .reports-menu-content a,
        .password-toggle,
        .mobile-line-toggle,
        .mobile-report-row-toggle
    ) {
        min-height: 44px !important;
    }

    body.world-ui :is(
        .shell-menu-trigger,
        .shell-navigation-close,
        .password-toggle,
        .mobile-line-toggle,
        .mobile-report-row-toggle
    ) {
        min-width: 44px !important;
    }

    body.world-ui :is(.data-grid, .record-grid, .statement-table) a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

@media screen and (max-width: 420px) {
    body.world-ui {
        --world-gutter: 12px;
    }

    body.world-ui .top-company {
        max-width: 190px;
    }

    body.world-ui .metric-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.world-ui .metric-card {
        min-height: 96px;
    }

    body.world-ui .login-panel {
        padding: 22px 16px;
    }
}

/* Login workspace v2 */

body.world-ui.login-body {
    min-height: 100dvh;
    color: var(--world-text);
    background: #edf2f5;
}

body.world-ui.login-body::before {
    inset: 0 auto 0 0;
    width: 43%;
    background: #18262e;
}

body.world-ui .login-shell {
    min-height: 100dvh;
    display: block;
    padding: 0;
}

body.world-ui .login-surface {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(22px, 4vw, 54px);
}

body.world-ui .login-stage {
    width: min(1180px, 100%);
    min-height: min(720px, calc(100dvh - 64px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 18px;
}

body.world-ui .login-brandbar {
    width: fit-content;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 9px 16px 9px 10px;
    border: 0;
    border-radius: var(--world-radius-lg);
    color: #fff;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.world-ui .login-brandbar .login-brand-mark {
    width: 104px;
    height: 48px;
    flex: 0 0 104px;
    border-color: rgb(255 255 255 / 12%);
    box-shadow: none;
}

body.world-ui .login-brandbar-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

body.world-ui .login-brandbar-copy strong {
    color: #fff;
    font-size: 14px;
    font-weight: 720;
    line-height: 1.3;
}

body.world-ui .login-brandbar-copy span {
    color: rgb(236 244 247 / 72%);
    font-size: 11px;
}

body.world-ui .login-workspace {
    width: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, .72fr) minmax(540px, 1.28fr);
    align-items: center;
    gap: clamp(30px, 6vw, 76px);
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.world-ui .login-brand-panel {
    position: relative;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 28px 12px 28px 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.world-ui .login-context-kicker {
    margin: 0;
    color: #8ee1d4;
    font-size: 11px;
    font-weight: 760;
    letter-spacing: 0;
    text-transform: uppercase;
}

body.world-ui .login-brand-panel h2 {
    max-width: 340px;
    margin: 0;
    color: #fff;
    font-family: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: 30px;
    font-weight: 680;
    line-height: 1.2;
    letter-spacing: 0;
}

body.world-ui .login-context-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

body.world-ui .login-context-steps > span {
    min-width: 0;
    min-height: 72px;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 8px;
    padding: 11px;
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: var(--world-radius);
    color: rgb(243 248 250 / 86%);
    background: rgb(255 255 255 / 7%);
    font-size: 11px;
    font-weight: 650;
}

body.world-ui .login-context-steps svg {
    width: 18px;
    height: 18px;
    color: #79d3c5;
}

body.world-ui .login-ledger-pattern {
    width: min(360px, 100%);
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: 10px;
    border-top: 1px solid rgb(255 255 255 / 13%);
    border-left: 1px solid rgb(255 255 255 / 13%);
}

body.world-ui .login-ledger-pattern > span {
    height: 30px;
    border-right: 1px solid rgb(255 255 255 / 13%);
    border-bottom: 1px solid rgb(255 255 255 / 13%);
    background: transparent;
}

body.world-ui .login-ledger-pattern > span:nth-child(6n + 1),
body.world-ui .login-ledger-pattern > span:nth-child(11),
body.world-ui .login-ledger-pattern > span:nth-child(21) {
    background: rgb(59 195 178 / 28%);
}

body.world-ui .login-ledger-pattern > span:nth-child(4),
body.world-ui .login-ledger-pattern > span:nth-child(15) {
    background: rgb(97 126 205 / 25%);
}

body.world-ui .login-ledger-pattern > span:nth-child(8),
body.world-ui .login-ledger-pattern > span:nth-child(19) {
    background: rgb(255 255 255 / 11%);
}

body.world-ui .login-panel {
    width: 100%;
    min-height: 0;
    justify-self: end;
    padding: clamp(26px, 3.2vw, 38px);
    border: 1px solid rgb(255 255 255 / 86%);
    border-radius: var(--world-radius-lg);
    color: var(--world-text);
    background: rgb(250 253 254 / 78%);
    box-shadow:
        inset 0 1px rgb(255 255 255 / 96%),
        0 30px 78px rgb(18 31 40 / 22%);
    backdrop-filter: blur(34px) saturate(145%);
    -webkit-backdrop-filter: blur(34px) saturate(145%);
}

body.world-ui .login-panel-header {
    width: 100%;
    max-width: none;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

body.world-ui .login-panel-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border: 1px solid #b8ddd7;
    border-radius: var(--world-radius);
    color: var(--world-brand-deep);
    background: rgb(228 245 242 / 82%);
    box-shadow: inset 0 1px rgb(255 255 255 / 90%);
}

body.world-ui .login-panel-icon svg {
    width: 20px;
    height: 20px;
}

body.world-ui .login-panel-heading {
    min-width: 0;
    display: grid;
}

body.world-ui .login-panel-eyebrow {
    margin-bottom: 3px;
    color: var(--world-brand-deep);
    font-size: 10px;
    font-weight: 760;
    letter-spacing: 0;
    text-transform: uppercase;
}

body.world-ui .login-panel h1 {
    margin: 0;
    color: var(--world-ink);
    font-family: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: 31px;
    font-weight: 720;
    line-height: 1.14;
    letter-spacing: 0;
}

body.world-ui .login-panel .muted {
    margin: 6px 0 0;
    color: var(--world-muted);
    font-size: 12px;
}

body.world-ui .login-form {
    width: 100%;
    max-width: none;
    display: grid;
    gap: 18px;
}

body.world-ui .login-fieldset {
    min-width: 0;
    display: grid;
    gap: 11px;
    margin: 0;
    padding: 0;
    border: 0;
}

body.world-ui .login-fieldset + .login-fieldset {
    padding-top: 17px;
    border-top: 1px solid rgb(184 198 208 / 68%);
}

body.world-ui .login-fieldset legend {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 0;
    color: #5d6f79;
    font-size: 10px;
    font-weight: 760;
    letter-spacing: 0;
    text-transform: uppercase;
}

body.world-ui .login-fieldset legend svg {
    width: 14px;
    height: 14px;
    color: var(--world-brand);
}

body.world-ui .login-field-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

body.world-ui .login-field {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 6px;
}

body.world-ui .login-field label {
    color: #465963;
    font-size: 11px;
    font-weight: 680;
}

body.world-ui .login-form .login-field :is(input, select) {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border-color: #b8c6d0;
    color: var(--world-ink);
    background: rgb(255 255 255 / 72%);
    box-shadow:
        inset 0 1px 2px rgb(21 36 46 / 4%),
        0 1px rgb(255 255 255 / 88%);
}

body.world-ui .login-form .login-field :is(input, select):hover {
    border-color: #91a6b3;
    background-color: rgb(255 255 255 / 88%);
}

body.world-ui .login-password-control {
    position: relative;
}

body.world-ui .login-password-control input {
    width: 100%;
    padding-right: 50px;
}

body.world-ui .login-form .login-password-toggle {
    position: absolute;
    inset: 2px 2px 2px auto;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    color: var(--world-muted);
    background: transparent;
    box-shadow: none;
}

body.world-ui .login-form .login-password-toggle:hover {
    color: var(--world-brand-deep);
    background: var(--world-brand-soft);
}

body.world-ui .login-form > button[type="submit"] {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 1px 0 0;
    border-color: var(--world-brand);
    color: #fff;
    background: var(--world-brand);
    box-shadow:
        inset 0 1px rgb(255 255 255 / 18%),
        0 12px 24px rgb(8 89 83 / 18%);
    font-size: 13px;
    font-weight: 720;
}

body.world-ui .login-form > button[type="submit"]:hover {
    border-color: var(--world-brand-hover);
    background: var(--world-brand-hover);
    box-shadow:
        inset 0 1px rgb(255 255 255 / 18%),
        0 15px 30px rgb(8 89 83 / 23%);
    transform: translateY(-1px);
}

body.world-ui .login-form > button[type="submit"] svg {
    width: 17px;
    height: 17px;
}

body.world-ui .login-session-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--world-muted);
    font-size: 10px;
}

body.world-ui .login-session-note svg {
    width: 14px;
    height: 14px;
    color: var(--world-success);
}

body.world-ui .login-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    width: fit-content;
    justify-self: end;
    padding: 7px 10px;
    border: 1px solid rgb(255 255 255 / 72%);
    border-radius: var(--world-radius);
    color: var(--world-muted);
    background: rgb(255 255 255 / 62%);
    box-shadow: inset 0 1px rgb(255 255 255 / 88%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    font-size: 10px;
    font-weight: 650;
    text-shadow: none;
}

body.world-ui .login-form .validation-summary:empty {
    display: none;
}

/* Shared confirmation and alert dialog */

body.world-ui dialog.world-dialog {
    width: min(480px, calc(100vw - 28px));
    max-width: 480px;
    max-height: calc(100dvh - 28px);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 1px solid rgb(255 255 255 / 88%);
    border-radius: var(--world-radius-lg);
    color: var(--world-text);
    background: rgb(250 253 254 / 92%);
    box-shadow:
        inset 0 1px rgb(255 255 255 / 96%),
        0 34px 90px rgb(13 25 33 / 32%);
    backdrop-filter: blur(30px) saturate(145%);
    -webkit-backdrop-filter: blur(30px) saturate(145%);
}

body.world-ui dialog.world-dialog[open] {
    animation: world-dialog-in var(--world-normal) var(--world-ease) both;
}

body.world-ui dialog.world-dialog::backdrop {
    background: rgb(12 23 30 / 56%);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

body.world-ui .world-dialog-frame {
    display: grid;
    gap: 18px;
    padding: 24px;
}

body.world-ui .world-dialog-header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
}

body.world-ui .world-dialog-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid #bcd9ee;
    border-radius: var(--world-radius);
    color: var(--world-info);
    background: var(--world-info-soft);
}

body.world-ui .world-dialog-icon svg {
    width: 21px;
    height: 21px;
}

body.world-ui .world-dialog-heading {
    min-width: 0;
    display: grid;
    align-content: center;
    min-height: 48px;
}

body.world-ui .world-dialog-eyebrow {
    color: var(--world-info);
    font-size: 10px;
    font-weight: 760;
    letter-spacing: 0;
    text-transform: uppercase;
}

body.world-ui .world-dialog h2 {
    margin: 3px 0 0;
    color: var(--world-ink);
    font-family: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: 20px;
    font-weight: 720;
    line-height: 1.3;
    letter-spacing: 0;
}

body.world-ui .world-dialog-message {
    margin: 0;
    padding: 0 0 0 62px;
    color: var(--world-muted);
    font-size: 13px;
    line-height: 1.55;
}

body.world-ui .world-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 5px;
    border-top: 1px solid var(--world-line);
}

body.world-ui .world-dialog-actions button {
    min-width: 104px;
    min-height: 44px;
}

body.world-ui .world-dialog-confirm {
    border-color: var(--world-brand);
    color: #fff;
    background: var(--world-brand);
}

body.world-ui .world-dialog-confirm:hover {
    border-color: var(--world-brand-hover);
    background: var(--world-brand-hover);
}

body.world-ui .world-dialog[data-variant="warning"] .world-dialog-icon {
    border-color: #ecd39c;
    color: var(--world-amber);
    background: var(--world-amber-soft);
}

body.world-ui .world-dialog[data-variant="warning"] .world-dialog-eyebrow {
    color: var(--world-amber);
}

body.world-ui .world-dialog[data-variant="danger"] .world-dialog-icon {
    border-color: #e8bbb6;
    color: var(--world-danger);
    background: var(--world-danger-soft);
}

body.world-ui .world-dialog[data-variant="danger"] .world-dialog-eyebrow {
    color: var(--world-danger);
}

body.world-ui .world-dialog[data-variant="danger"] .world-dialog-confirm {
    border-color: var(--world-danger);
    background: var(--world-danger);
}

body.world-ui .world-dialog[data-variant="danger"] .world-dialog-confirm:hover {
    border-color: #931b13;
    background: #931b13;
}

@keyframes world-dialog-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media screen and (max-width: 900px) {
    body.world-ui.login-body::before {
        inset: 0 0 auto;
        width: 100%;
        height: 150px;
    }

    body.world-ui .login-stage {
        width: min(680px, 100%);
        min-height: auto;
    }

    body.world-ui .login-workspace {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    body.world-ui .login-brand-panel {
        display: none;
    }

    body.world-ui .login-panel {
        justify-self: stretch;
    }
}

@media screen and (max-width: 620px) {
    body.world-ui.login-body {
        background: #edf2f5;
    }

    body.world-ui.login-body::before {
        height: 132px;
        background: #18262e;
    }

    body.world-ui .login-shell,
    body.world-ui .login-surface {
        min-height: 100dvh;
    }

    body.world-ui .login-surface {
        align-items: start;
        padding: max(14px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
    }

    body.world-ui .login-stage {
        gap: 12px;
    }

    body.world-ui .login-brandbar {
        width: 100%;
        min-height: 58px;
        padding: 7px 11px 7px 8px;
        border: 1px solid rgb(255 255 255 / 12%);
        background: rgb(24 38 46 / 96%);
        box-shadow:
            inset 0 1px rgb(255 255 255 / 10%),
            0 10px 24px rgb(15 29 37 / 16%);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    body.world-ui .login-brandbar .login-brand-mark {
        width: 94px;
        height: 44px;
        flex-basis: 94px;
    }

    body.world-ui .login-brandbar-copy strong {
        font-size: 12px;
    }

    body.world-ui .login-brandbar-copy span {
        font-size: 10px;
    }

    body.world-ui .login-brand-panel {
        display: none;
    }

    body.world-ui .login-panel {
        padding: 22px 18px;
    }

    body.world-ui .login-panel-header {
        margin-bottom: 20px;
    }

    body.world-ui .login-panel h1 {
        font-size: 27px;
    }

    body.world-ui .login-field-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 11px;
    }

    body.world-ui .login-footer {
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px 12px;
        text-align: center;
    }

    body.world-ui .world-dialog-frame {
        gap: 16px;
        padding: 20px;
    }

    body.world-ui .world-dialog-message {
        padding-left: 0;
    }

    body.world-ui .world-dialog-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.world-ui .world-dialog-actions button {
        width: 100%;
        min-width: 0;
    }

    body.world-ui .world-dialog-cancel[hidden] + .world-dialog-confirm {
        grid-column: 1 / -1;
    }
}

@media screen and (max-width: 360px) {
    body.world-ui .login-surface {
        padding-inline: 10px;
    }

    body.world-ui .login-panel {
        padding: 19px 14px;
    }

    body.world-ui .login-brandbar {
        gap: 10px;
    }

    body.world-ui .login-brandbar-copy strong {
        max-width: 145px;
        font-size: 11px;
        line-height: 1.25;
    }

    body.world-ui .login-brandbar-copy span {
        display: none;
    }

    body.world-ui .login-panel-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    body.world-ui .login-panel h1 {
        font-size: 25px;
    }

    body.world-ui .login-form {
        gap: 15px;
    }

    body.world-ui .login-footer {
        width: 100%;
        display: grid;
        justify-items: center;
        gap: 2px;
        padding-inline: 8px;
        white-space: normal;
    }

    body.world-ui .world-dialog-header {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 11px;
    }

    body.world-ui .world-dialog-icon {
        width: 42px;
        height: 42px;
    }

    body.world-ui .world-dialog h2 {
        font-size: 18px;
    }
}

/* Print output must remain stable and free from screen effects. */

@media print {
    body.world-ui {
        color: #000 !important;
        background: #fff !important;
    }

    body.world-ui::before,
    body.world-ui .top-bar,
    body.world-ui .side-menu,
    body.world-ui .shell-navigation,
    body.world-ui .module-head,
    body.world-ui .desktop-footer,
    body.world-ui .shell-progress,
    body.world-ui .shell-live-status {
        display: none !important;
    }

    body.world-ui .desktop-frame,
    body.world-ui .desktop-main,
    body.world-ui .work-area {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    body.world-ui :is(.statement-wrap, .statement-page, .work-panel, .entry-panel) {
        overflow: visible !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    body.world-ui .work-area > :not(script) {
        animation: none !important;
    }

    body.world-ui .receipt-voucher-print-page {
        display: grid !important;
        min-height: 270mm !important;
        padding: 0 !important;
    }

    body.world-ui .receipt-print-meta,
    body.world-ui .receipt-print-lines,
    body.world-ui .receipt-print-notes {
        border-color: #000 !important;
    }

    body.world-ui .receipt-print-meta th,
    body.world-ui .receipt-print-meta td,
    body.world-ui .receipt-print-lines th,
    body.world-ui .receipt-print-lines td {
        border-color: #000 !important;
        background: #fff !important;
    }

    body.world-ui:not(:has(.statement-print-area)) *,
    body.world-ui:not(:has(.statement-print-area)) *::before,
    body.world-ui:not(:has(.statement-print-area)) *::after {
        visibility: visible !important;
    }

    body.world-ui:not(:has(.statement-print-area)) :is(.work-panel, .entry-panel, .grid-panel) {
        display: block !important;
    }

    body.world-ui:not(:has(.statement-print-area)) .audit-work-panel {
        display: grid !important;
    }
}

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

@media (prefers-reduced-transparency: reduce) {
    body.world-ui .top-bar,
    body.world-ui .side-menu,
    body.world-ui .shell-navigation-content,
    body.world-ui .module-head .module-actions,
    body.world-ui .module-head,
    body.world-ui .dashboard-hero,
    body.world-ui .dashboard-auto-refresh-control,
    body.world-ui :is(.entry-panel, .grid-panel, .work-panel, .report-filter-panel),
    body.world-ui :is(.metric-card, .dashboard-quick-card, .dashboard-focus-list > a, .home-menu-card),
    body.world-ui :is(button, .btn, .btn-line, .ui-action-menu > summary),
    body.world-ui :is(input, select, textarea),
    body.world-ui .ui-action-menu-content,
    body.world-ui .reports-menu-content,
    body.world-ui :is(dialog, .modal-content, .dialog-card, .popover-panel),
    body.world-ui .login-brand-panel,
    body.world-ui .login-panel {
        background-color: var(--world-surface);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    body.world-ui .side-menu,
    body.world-ui .shell-navigation-content,
    body.world-ui .login-brand-panel {
        color: var(--world-shell-text);
        background-color: var(--world-shell);
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    body.world-ui .top-bar,
    body.world-ui .module-head,
    body.world-ui .dashboard-hero,
    body.world-ui :is(.entry-panel, .grid-panel, .work-panel, .report-filter-panel),
    body.world-ui :is(.metric-card, .dashboard-quick-card, .dashboard-focus-list > a, .home-menu-card),
    body.world-ui :is(button, .btn, .btn-line, .ui-action-menu > summary),
    body.world-ui :is(input, select, textarea),
    body.world-ui .login-panel {
        background-color: #ffffff;
    }

    body.world-ui .side-menu,
    body.world-ui .shell-navigation-content,
    body.world-ui .login-brand-panel {
        background-color: var(--world-shell);
    }
}

body.world-ui .voucher-report-totals {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.world-ui .voucher-report-toolbar {
    align-items: center;
    gap: 12px;
}

body.world-ui .voucher-report-toolbar > div:first-child {
    min-width: 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
}

body.world-ui .voucher-report-toolbar > div:first-child > span {
    color: var(--world-muted);
    font-size: 11px;
}

body.world-ui .voucher-report-toolbar .dashboard-grid-export {
    flex: 0 0 auto;
    margin-left: auto;
}

body.world-ui .voucher-report-grid {
    min-width: 1320px;
}

body.world-ui .voucher-report-grid tbody tr[data-row-url] {
    cursor: pointer;
}

body.world-ui .voucher-report-grid tfoot th {
    border-top: 1px solid var(--world-line-strong);
    color: var(--world-text);
    background: var(--world-surface-soft);
}

@media screen and (max-width: 1099px) {
    body.world-ui .voucher-report-totals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.world-ui .voucher-report-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    body.world-ui .voucher-report-toolbar .dashboard-grid-export {
        width: 100%;
        margin-left: 0;
    }

    body.world-ui table.ui-mobile-report-grid.voucher-report-grid tfoot {
        display: none;
    }
}

@media screen and (max-width: 639px) {
    body.world-ui .voucher-report-totals {
        grid-template-columns: minmax(0, 1fr);
    }

    body.world-ui .voucher-report-toolbar .dashboard-grid-export {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    body.world-ui .voucher-report-toolbar .dashboard-grid-export > span {
        grid-column: 1 / -1;
    }

    body.world-ui .voucher-report-toolbar .dashboard-grid-export button {
        min-width: 0;
        min-height: 44px;
    }
}

@media (forced-colors: active) {
    body.world-ui,
    body.world-ui.login-body {
        color: CanvasText;
        background: Canvas;
    }

    body.world-ui.login-body::before {
        display: none;
    }

    body.world-ui :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
        outline: 3px solid Highlight !important;
        outline-offset: 2px;
        box-shadow: none !important;
    }

    body.world-ui :is(
        .top-bar,
        .side-menu,
        .shell-navigation-content,
        .module-head .module-actions,
        .ui-action-menu-content,
        .reports-menu-content,
        .entry-panel,
        .grid-panel,
        .work-panel,
        .report-filter-panel,
        .metric-card,
        .login-brand-panel,
        .login-panel
    ) {
        border: 1px solid CanvasText;
        color: CanvasText;
        background: Canvas;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    body.world-ui .side-link.active {
        border: 2px solid Highlight;
    }
}
