/* Library-neutral layout helpers on the WebEon tokens (theme.css). Components come from the chosen library. */
.weo-page { max-width: 1480px; margin: 0 auto; padding: 8px 32px 40px; box-sizing: border-box; }
.weo-page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.weo-page-head h1 { font-size: 28px; font-weight: 600; margin: 0; letter-spacing: -.025em; line-height: 1.2; }
.weo-page-head p { margin: 6px 0 0; color: var(--weo-muted); font-size: 14px; max-width: 760px; }
.weo-page-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.weo-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.weo-kpi-label { color: var(--weo-muted); font-size: 13px; font-weight: 500; }
.weo-kpi-value { font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.03em; margin: 8px 0 4px; line-height: 1.1; }
.weo-kpi-note { font-size: 12px; color: var(--weo-muted); }
.weo-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.weo-span-3 { grid-column: span 3; } .weo-span-4 { grid-column: span 4; } .weo-span-5 { grid-column: span 5; } .weo-span-6 { grid-column: span 6; } .weo-span-7 { grid-column: span 7; } .weo-span-8 { grid-column: span 8; } .weo-span-9 { grid-column: span 9; } .weo-span-12 { grid-column: span 12; }
@media (max-width: 1200px) { .weo-span-3 { grid-column: span 6; } .weo-span-5, .weo-span-7 { grid-column: span 12; } }
@media (max-width: 960px) { .weo-span-3, .weo-span-4, .weo-span-6, .weo-span-8, .weo-span-9 { grid-column: span 12; } .weo-page { padding: 8px 16px 24px; } }
.weo-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
/* A row of a list edited in place: number, two fields, remove; the second field on its own line on a phone. */
.weo-level-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
@media (max-width: 600px) { .weo-level-row { grid-template-columns: 72px minmax(0, 1fr) auto; } .weo-level-row > :nth-child(3) { grid-column: 1 / 3; grid-row: 2; } .weo-level-row > :nth-child(4) { grid-column: 3; grid-row: 1; } }
.weo-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.weo-permissions { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 16px; }
.weo-facts { width: 100%; border-collapse: collapse; font-size: 13px; }
.weo-facts th { text-align: left; font-weight: 500; color: var(--weo-muted); padding: 7px 12px 7px 0; white-space: nowrap; vertical-align: top; }
.weo-facts td { padding: 7px 0; }
.weo-facts tr + tr th, .weo-facts tr + tr td { border-top: 1px solid var(--weo-line); }
.weo-section-title { font-size: 16px; font-weight: 600; margin: 0 0 4px; letter-spacing: -.01em; }
.weo-section-title:has(> svg) { display: flex; align-items: center; gap: 7px; }
.weo-section-title > svg { flex: none; color: var(--weo-tint-text); }
.weo-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--weo-tint); color: var(--weo-tint-text); display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; }
.weo-avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.weo-context-card { border: 1px solid var(--weo-line); border-radius: 14px; padding: 10px 12px; background: var(--weo-subtle); display: block; text-decoration: none; color: inherit; transition: border-color .15s; }
.weo-context-card:hover { border-color: var(--weo-line-strong); }
.weo-context-title { font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.weo-context-sub { color: var(--weo-muted); font-size: 12px; margin-top: 2px; }
.weo-search-btn { display: flex; align-items: center; gap: 10px; width: min(380px, 40vw); height: 44px; padding: 0 10px 0 16px; border: 1px solid var(--weo-card-border); border-radius: 14px; background: var(--weo-card); box-shadow: var(--weo-card-shadow); color: var(--weo-muted); font: inherit; font-size: 14px; cursor: pointer; transition: border-color .15s; }
.weo-search-btn:hover { border-color: var(--weo-line-strong); }
.weo-search-btn .weo-kbd { margin-left: auto; }
.weo-crumbs { display: flex; gap: 6px; align-items: center; min-width: 0; font-size: 13px; color: var(--weo-muted); white-space: nowrap; }
.weo-crumbs b { color: var(--weo-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
/* Phones: no keyboard shortcut to show, and only the current page in the breadcrumb. */
@media (max-width: 720px) { .weo-search-btn { width: 44px; padding: 0; justify-content: center; } .weo-search-btn span { display: none; } .weo-crumbs { display: none; } .weo-user-chip .weo-user-text { display: none; } }
.weo-topbar { height: 76px; display: flex; align-items: center; gap: 14px; padding: 0 32px; background: color-mix(in srgb, var(--weo-bg) 88%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; box-sizing: border-box; }
@media (max-width: 960px) { .weo-topbar { padding: 0 16px; height: 64px; } }
.weo-topbar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.weo-tile-btn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--weo-card-border); background: var(--weo-card); box-shadow: var(--weo-card-shadow); color: var(--weo-text); display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; transition: background .15s; }
.weo-tile-btn:hover { background: var(--weo-subtle); }
.weo-user-chip { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px; border-radius: 14px; border: 1px solid var(--weo-card-border); background: var(--weo-card); box-shadow: var(--weo-card-shadow); min-width: 0; }
.weo-user-text { display: grid; line-height: 1.25; min-width: 0; padding-right: 4px; }
.weo-user-text b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.weo-user-text span { font-size: 12px; color: var(--weo-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.weo-user-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; min-width: 0; }
.weo-user-row .weo-user-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weo-icon-btn { border: 0; background: transparent; color: var(--weo-muted); width: 32px; height: 32px; border-radius: var(--weo-radius); display: inline-grid; place-items: center; cursor: pointer; }
.weo-icon-btn:hover { background: var(--weo-subtle); color: var(--weo-text); }
.weo-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.weo-table th { text-align: left; font-weight: 500; color: var(--weo-muted); font-size: 12px; padding: 14px 12px 10px; border-bottom: 1px solid var(--weo-line); white-space: nowrap; }
.weo-table td { padding: 14px 12px; border-bottom: 1px solid var(--weo-line); }
.weo-table tr:not(:has(> th)):hover td { background: color-mix(in srgb, var(--weo-subtle) 70%, transparent); }
.weo-table tr:last-child td { border-bottom: 0; }
.weo-card { background: var(--weo-card); border: 1px solid var(--weo-card-border); border-radius: var(--weo-radius-card); box-shadow: var(--weo-card-shadow); }
.weo-card-pad { padding: 22px 24px; }
.weo-card-head { display: flex; align-items: center; gap: 8px; padding: 20px 24px 14px; border-bottom: 1px solid var(--weo-line); }
.weo-tile { color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; } .weo-tile:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px color-mix(in srgb, var(--weo-primary) 35%, transparent); }
.weo-row-link { cursor: pointer; } .weo-row-link:hover > td { background: color-mix(in srgb, var(--weo-primary) 5%, transparent); }
.weo-table th:first-child, .weo-table td:first-child { padding-left: 24px; } .weo-table th:last-child, .weo-table td:last-child { padding-right: 24px; }

/* Phone layout for lists: inside .weo-stack, tables become cards below 720px. The first cell is the card title;
   other cells show their label (data-label on plain tables, .weo-cell-label inside data-grid cells). */
.weo-cell-label { display: none; }
@media (max-width: 720px) {
  .weo-stack table, .weo-stack tbody, .weo-stack tr, .weo-stack td { display: block; width: 100% !important; box-sizing: border-box; }
  .weo-stack thead, .weo-stack tr:has(> th) { display: none; }
  .weo-stack tr { padding: 12px 16px; border-bottom: 1px solid var(--weo-line); }
  .weo-stack tr:last-child { border-bottom: 0; }
  .weo-stack td { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 3px 0 !important; border: 0 !important; text-align: right !important; min-height: 24px; }
  .weo-stack td:first-child { justify-content: flex-start; text-align: left !important; padding-bottom: 6px !important; }
  .weo-stack td:empty { display: none; }
  .weo-stack td[data-label]::before { content: attr(data-label); color: var(--weo-muted); font-size: 12px; font-weight: 400; text-align: left; margin-right: auto; }
  .weo-stack .weo-cell-label { display: inline; color: var(--weo-muted); font-size: 12px; font-weight: 400; margin-right: auto; }
  .weo-toolbar > * { flex: 1 1 100%; width: 100% !important; }
  .weo-page-actions { margin-left: 0; }
}
.weo-tree-row { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--weo-line); }
.weo-tree-row:last-child { border-bottom: 0; }
.weo-select-card { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; transition: border-color .15s; }
.weo-select-card:hover { border-color: var(--weo-line-strong); }
.weo-select-card.on { border-color: var(--weo-primary); box-shadow: 0 0 0 1px var(--weo-primary); }
.weo-lock-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; }
@media (max-width: 720px) { .weo-lock-form { grid-template-columns: minmax(0, 1fr); } }
.weo-lock-row { padding: 14px 20px; border-bottom: 1px solid var(--weo-line); }
.weo-lock-row:last-child { border-bottom: 0; }
.weo-badge-x { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 4px; font-size: 14px; line-height: 1; }
/* Settings: search and filters over the page, areas down the side, each area a card of sections and rows. */
.weo-settings-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.weo-settings-search { flex: 1 1 360px; max-width: 560px; background: var(--weo-card); }
.weo-settings { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.weo-settings-nav { position: sticky; top: 92px; display: grid; gap: 2px; max-height: calc(100vh - 110px); overflow-y: auto; }
.weo-settings-area { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--weo-text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.weo-settings-area:hover { background: var(--weo-subtle); }
.weo-settings-area.on { background: var(--weo-tint); color: var(--weo-tint-text); font-weight: 600; }
.weo-settings-area.none { color: var(--weo-muted); opacity: .55; }
.weo-settings-area > span:first-child { flex: 1; min-width: 0; }
.weo-settings-count { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--weo-muted); }
.weo-settings-area.on .weo-settings-count { color: inherit; }
.weo-settings-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--weo-primary); flex: none; }
.weo-settings-main { display: grid; gap: 18px; min-width: 0; }
.weo-settings-found { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--weo-muted); }
.weo-settings-empty { display: flex; gap: 12px; align-items: center; color: var(--weo-muted); font-size: 14px; }
.weo-settings-card { overflow: hidden; }
.weo-settings-card-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--weo-line); }
.weo-settings-card-head h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.weo-settings-card-head p { margin: 4px 0 0; font-size: 13px; color: var(--weo-muted); max-width: 70ch; }
.weo-settings-section { margin: 0; padding: 14px 24px 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--weo-muted); background: var(--weo-subtle); border-bottom: 1px solid var(--weo-line); }
.weo-set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; padding: 16px 24px; border-bottom: 1px solid var(--weo-line); align-items: start; }
.weo-set-row:last-child { border-bottom: 0; }
.weo-set-changed { box-shadow: inset 3px 0 0 var(--weo-primary); }
.weo-set-text { min-width: 0; display: grid; gap: 3px; }
.weo-set-label { font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.weo-set-desc { font-size: 13px; color: var(--weo-muted); line-height: 1.5; max-width: 72ch; }
.weo-set-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12px; color: var(--weo-muted); margin-top: 2px; }
.weo-set-meta code { font-size: 11px; background: var(--weo-subtle); padding: 1px 6px; border-radius: 4px; color: var(--weo-text); }
.weo-set-control { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; min-height: 36px; }
.weo-set-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.weo-set-empty { color: var(--weo-muted); font-weight: 400; font-style: italic; }
.weo-set-edit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.weo-set-branches { grid-column: 1 / -1; }
.weo-link-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 2px 0; color: var(--weo-primary-text); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.weo-link-btn:hover { text-decoration: underline; }
.weo-set-branch-list { margin-top: 8px; border: 1px solid var(--weo-line); border-radius: 12px; background: var(--weo-subtle); }
.weo-set-branch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--weo-line); }
.weo-set-branch-name { font-size: 13px; font-weight: 500; }
.weo-set-branch-add { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; }
@media (max-width: 960px) {
  .weo-settings { grid-template-columns: minmax(0, 1fr); }
  .weo-settings-nav { position: static; max-height: none; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .weo-settings-area.none { display: none; }
  .weo-settings-area { width: auto; flex: none; white-space: nowrap; border: 1px solid var(--weo-line); background: var(--weo-card); }
}
@media (max-width: 720px) {
  .weo-set-row { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .weo-set-control, .weo-set-edit { justify-content: flex-start; }
  .weo-settings-card-head, .weo-settings-section { padding-left: 16px; padding-right: 16px; }
  .weo-settings-bar > .weo-seg { display: grid; grid-auto-flow: column; width: 100%; }
}
/* Counter screens */
.weo-counter-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.weo-counter-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--weo-tint); color: var(--weo-primary-text); flex: none; }
.weo-counter-code { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.weo-confirm { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--weo-line); border-radius: var(--weo-radius); background: var(--weo-bg); }
.weo-confirm-row td { background: var(--weo-bg); }
/* Masters (M1) */
.weo-split-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; padding-top: 16px; border-top: 1px solid var(--weo-line); }
.weo-chip { font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--weo-line-strong); background: var(--weo-card); color: var(--weo-text); cursor: pointer; }
.weo-chip:hover { border-color: var(--weo-primary); }
.weo-chip-off { color: var(--weo-muted); text-decoration: line-through; background: var(--weo-subtle); }
.weo-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; }
.weo-check { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.weo-flag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 20px; }
.weo-flag { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.weo-account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 6px 20px; }
.weo-account-row { display: grid; grid-template-columns: 1fr 130px auto; gap: 8px; align-items: center; }
.weo-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.weo-product-off { opacity: .65; }
.weo-product-code, .weo-code-pill { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--weo-tint); color: var(--weo-tint-text); font-weight: 600; font-size: 12px; letter-spacing: .02em; }
.weo-product-code { min-width: 36px; height: 30px; font-size: 13px; }
.weo-master-detail { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 16px; align-items: start; }
.weo-list-group { padding: 12px 16px 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--weo-muted); }
.weo-list-row { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 16px; border: 0; border-top: 1px solid var(--weo-line); background: transparent; color: var(--weo-text); font: inherit; font-size: 13px; cursor: pointer; }
.weo-list-row:first-child { border-top: 0; }
.weo-list-row:hover { background: var(--weo-subtle); }
.weo-list-row-on, .weo-list-row-on:hover { background: var(--weo-tint); box-shadow: inset 3px 0 0 var(--weo-primary); }
.weo-limit { padding: 12px 0; border-top: 1px solid var(--weo-line); display: grid; gap: 8px; }
.weo-limit-edit { padding: 14px; margin-top: 8px; border: 1px solid var(--weo-line); border-radius: var(--weo-radius); background: var(--weo-bg); }
.weo-limit-amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 16px; font-size: 13px; color: var(--weo-muted); }
.weo-limit-amounts b { color: var(--weo-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.weo-matrix td, .weo-matrix th { padding: 8px 10px; }
.weo-matrix-branch td { background: var(--weo-subtle); }
.weo-pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 12px; border-top: 1px solid var(--weo-line); }
/* Narrow screens: one pane at a time; an open record hides the list until it is closed. */
@media (max-width: 900px) { .weo-master-detail { grid-template-columns: minmax(0, 1fr); } .weo-detail-open > :first-child { display: none; } }
@media (max-width: 720px) { .weo-account-row { grid-template-columns: 1fr 110px auto; } .weo-matrix-branch td { background: transparent; } }

/* Rates (M1b) */
.weo-row-stale td { background: color-mix(in srgb, var(--weo-warning-bg) 45%, transparent); }
.weo-rate-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; align-items: end; }
.weo-margin-grid td, .weo-margin-grid th { padding: 6px 8px; }
.weo-margin-cell { text-align: center; }
.weo-margin-btn { width: 100%; min-width: 92px; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 6px 4px; font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--weo-text); cursor: pointer; }
.weo-margin-btn:hover { border-color: var(--weo-line-strong); }
.weo-margin-own .weo-margin-btn { background: var(--weo-tint); color: var(--weo-tint-text); font-weight: 600; }
.weo-margin-inherited .weo-margin-btn { color: var(--weo-muted); }
.weo-margin-editing .weo-margin-btn { border-color: var(--weo-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--weo-primary) 20%, transparent); }
.weo-margin-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--weo-muted); }
.weo-margin-legend > span { display: inline-flex; gap: 6px; align-items: center; }
.weo-margin-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--weo-line-strong); }
.weo-margin-swatch.weo-margin-own { background: var(--weo-tint); }
.weo-band { display: block; font-size: 11px; }
.weo-rate-first td { border-top: 1px solid var(--weo-line-strong); }
@media print {
  .weo-no-print, .weo-topbar, [data-sidebar], aside, nav { display: none !important; }
  .weo-page { padding: 0 !important; max-width: none !important; }
  .weo-card { border: 0 !important; box-shadow: none !important; }
  body { background: #fff !important; }
}

/* Parties (M1c) */
.weo-party-form { display: grid; gap: 22px; }
.weo-party-form section { display: grid; gap: 4px; }
.weo-party-form h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--weo-text); padding-bottom: 8px; border-bottom: 1px solid var(--weo-line); }

/* Documents (M2b): a label styled as a small outline button around a hidden file input */
.weo-file-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--weo-line); border-radius: var(--weo-radius); background: var(--weo-card); color: var(--weo-text); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.weo-file-btn:hover { background: var(--weo-subtle); }
.weo-file-btn:focus-within { outline: 2px solid var(--weo-primary); outline-offset: 2px; }
.weo-file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.weo-file-btn[aria-disabled=true] { opacity: .5; pointer-events: none; }
.weo-doc-list { display: grid; gap: 0; }
.weo-doc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--weo-line); }
.weo-doc-row:last-child { border-bottom: 0; }
.weo-doc-name { flex: 1 1 220px; min-width: 0; }
.weo-doc-meta { font-size: 12px; color: var(--weo-muted); overflow-wrap: anywhere; }

/* Till count (M3) */
.weo-till-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.weo-till-row { display: grid; grid-template-columns: 72px 96px 1fr; align-items: center; gap: 8px; font-size: 13px; }
.weo-till-row > :last-child { text-align: right; }
.weo-till-total { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font-size: 13px; padding-top: 8px; border-top: 1px solid var(--weo-line); }
.weo-till-total > :nth-child(even) { text-align: right; }

/* Settings: colour swatches and pickers */
.weo-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--weo-line-strong); vertical-align: middle; }
.weo-colour-input { width: 40px; height: 36px; padding: 2px; border: 1px solid var(--weo-line); border-radius: 10px; background: var(--weo-card); cursor: pointer; }

/* Dashboard (Overview) */
.weo-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.weo-hello h1 { font-size: 30px; font-weight: 600; letter-spacing: -.03em; margin: 0; }
.weo-hello p { margin: 6px 0 0; color: var(--weo-muted); font-size: 14px; }
.weo-stat { display: grid; gap: 4px; }
.weo-stat-label { color: var(--weo-muted); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.weo-stat-value { font-size: 34px; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.weo-stat-big { font-size: clamp(28px, 3.2vw, 42px); overflow-wrap: anywhere; }
/* Grid columns never grow past their share: wide content scrolls or wraps inside them. */
.weo-grid > * { min-width: 0; }
.weo-stat-note { font-size: 12px; color: var(--weo-muted); }
.weo-trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; }
.weo-trend-up { color: var(--weo-success); }
.weo-trend-down { color: var(--weo-danger); }
.weo-stat-stack { display: grid; gap: 22px; align-content: start; }
.weo-stat-stack > * + * { padding-top: 22px; border-top: 1px solid var(--weo-line); }
.weo-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.weo-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--weo-muted); }
.weo-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.weo-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 8px; }
.weo-action { display: grid; justify-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--weo-text); text-decoration: none; }
.weo-action-icon { width: 54px; height: 54px; border-radius: 16px; border: 1px solid var(--weo-line); display: grid; place-items: center; background: var(--weo-card); transition: background .15s, border-color .15s; }
.weo-action:hover .weo-action-icon { background: var(--weo-tint); border-color: transparent; color: var(--weo-tint-text); }
.weo-mix { display: flex; gap: 4px; height: 26px; margin: 14px 0 18px; }
.weo-mix > span { border-radius: 7px; min-width: 6px; }
.weo-mix-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.weo-mix-row b { font-weight: 500; font-variant-numeric: tabular-nums; }
.weo-feed-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; text-decoration: none; color: inherit; }
.weo-feed-row + .weo-feed-row { border-top: 1px solid var(--weo-line); }
.weo-feed-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--weo-tint); color: var(--weo-tint-text); }
.weo-feed-mark.weo-buy { background: var(--weo-accent-tint); color: color-mix(in srgb, var(--weo-accent) 75%, var(--weo-text)); }
.weo-feed-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weo-feed-sub { font-size: 12px; color: var(--weo-muted); }
.weo-feed-amount { text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.weo-feed-amount small { display: block; font-weight: 500; font-size: 11px; }
.weo-gauge { display: grid; justify-items: center; position: relative; }
.weo-gauge-label { position: absolute; bottom: 4px; text-align: center; }
.weo-gauge-label b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -.03em; }
.weo-gauge-label span { font-size: 12px; color: var(--weo-muted); }
.weo-card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.weo-card-sub { font-size: 12px; color: var(--weo-muted); margin-top: 2px; }
.weo-seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 3px; border-radius: 12px; background: color-mix(in srgb, var(--weo-line) 70%, var(--weo-card)); gap: 2px; }
.weo-seg button { border: 0; background: transparent; color: var(--weo-muted); font: inherit; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.weo-seg button[aria-pressed="true"] { background: var(--weo-card); color: var(--weo-text); box-shadow: var(--weo-card-shadow); }
@media (max-width: 720px) { .weo-stat-big { font-size: 34px; } .weo-stat-value { font-size: 30px; } .weo-hello h1 { font-size: 24px; } }
@media (max-width: 720px) { .weo-toolbar > .weo-seg { display: flex; } .weo-toolbar > .weo-seg button { flex: 1 1 auto; } }
/* Medium widths (sidebar open on a small laptop or tablet): search and user collapse to icon tiles. */
@media (max-width: 1180px) {
  .weo-search-btn { width: 44px; padding: 0; justify-content: center; }
  .weo-search-btn span { display: none; }
  .weo-user-chip .weo-user-text { display: none; }
}
.weo-crumbs { flex: 1 1 auto; overflow: hidden; }
main { min-width: 0; }
h1:focus, [tabindex="-1"]:focus { outline: none; }

/* Reports (M9): sticky column titles, figures right-aligned in tabular numbers, sections and totals set apart */
.weo-report-scroll { overflow: auto; }
.weo-report-table thead th { position: sticky; top: 0; z-index: 1; background: var(--weo-card); }
.weo-report-table td { padding-top: 9px; padding-bottom: 9px; }
.weo-num-col { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.weo-report-table .weo-row-heading td { font-weight: 600; background: var(--weo-subtle); }
.weo-report-table .weo-row-subtotal td { font-weight: 600; }
.weo-report-table .weo-row-total td { font-weight: 700; border-top: 1px solid var(--weo-line-strong); border-bottom: 3px double var(--weo-line-strong); }
.weo-report-head { display: grid; gap: 2px; margin-bottom: 12px; font-size: 12px; color: var(--weo-muted); }
.weo-report-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; margin-bottom: 16px; }
.weo-report-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.weo-check-tile { display: grid; gap: 6px; }
.weo-check-pass { border-left: 4px solid var(--weo-success) !important; }
.weo-check-warn { border-left: 4px solid #d97706 !important; }
.weo-check-fail { border-left: 4px solid var(--weo-danger) !important; }
.weo-print-only { display: none; }
@media print {
  .weo-report-scroll { max-height: none !important; overflow: visible !important; }
  .weo-report-table thead th { position: static; }
  .weo-print-only { display: grid; }
  .weo-report-bar, .weo-report-actions { display: none !important; }
}

/* Deal entry (M4 design §20): numbered step cards, the customer at a glance, currency lines as a table. */
.weo-entry { display: grid; gap: 18px; align-content: start; min-width: 0; }
.weo-entry > * { min-width: 0; }
.weo-entry-step > header { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--weo-line); flex-wrap: wrap; }
.weo-entry-step > header h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.weo-step-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--weo-tint); color: var(--weo-tint-text); font-size: 12px; font-weight: 700; flex: none; }
.weo-entry-body { padding: 18px 22px 20px; display: grid; gap: 14px; }
.weo-entry-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.weo-switch-label { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; }
.weo-entry-sub { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid var(--weo-line); border-radius: 14px; background: var(--weo-subtle); }
.weo-entry-sub-title { font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.weo-entry-sub-title .weo-muted { font-weight: 400; }
.weo-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.weo-entry-search { display: flex; align-items: center; gap: 10px; max-width: 560px; padding: 0 0 0 12px; border: 1px solid var(--weo-line-strong); border-radius: 12px; color: var(--weo-muted); }
.weo-entry-search input, .weo-entry-search > div { border: 0 !important; box-shadow: none !important; flex: 1; }
.weo-entry-search:focus-within { border-color: var(--weo-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--weo-primary) 18%, transparent); }
.weo-entry-keys { display: inline-flex; gap: 3px; padding-right: 10px; }
.weo-entry-keys kbd, .weo-kbd-inline { font: 600 10px/1 ui-monospace, monospace; padding: 3px 5px; border-radius: 5px; border: 1px solid var(--weo-line-strong); color: var(--weo-muted); background: var(--weo-subtle); }
.weo-kbd-inline { margin-left: 6px; opacity: .8; border-color: currentColor; background: transparent; color: inherit; }
@media (max-width: 720px) { .weo-entry-keys, .weo-kbd-inline { display: none; } }
/* Customers found: the whole row picks, arrow keys move the highlight, the last row adds a new customer. */
.weo-pick-list { max-width: 720px; }
.weo-pick-scroll { max-height: 340px; overflow-y: auto; padding: 0 12px; margin: 0 -12px; overscroll-behavior: contain; }
/* Choices in a form field (gender, residence): wrap rather than run out of a narrow panel. */
.weo-field > .weo-seg { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.weo-pick { padding: 10px 12px; margin: 0 -12px; border-radius: 10px; border-bottom-color: transparent; cursor: pointer; }
.weo-pick:hover { background: var(--weo-subtle); }
.weo-pick.is-highlighted { background: var(--weo-tint); box-shadow: inset 3px 0 0 var(--weo-primary); }
.weo-pick-new { display: flex; align-items: center; gap: 8px; width: calc(100% + 24px); margin: 4px -12px 0; padding: 10px 12px; border: 1px dashed var(--weo-line-strong); border-radius: 10px; background: transparent; color: var(--weo-primary-text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.weo-pick-new:hover, .weo-pick-new:focus-visible { background: var(--weo-tint); border-color: var(--weo-primary); outline: none; }
.weo-pick-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; max-width: 720px; padding: 12px 14px; border: 1px dashed var(--weo-line-strong); border-radius: 12px; font-size: 13px; }
.weo-pick-empty .weo-muted { font-size: 12px; margin-top: 2px; }
/* What is done and still to do, in the summary; the total fades while it is worked out again. */
.weo-checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12.5px; color: var(--weo-muted); }
.weo-checklist li { display: flex; align-items: center; gap: 6px; }
.weo-checklist li.is-done { color: var(--weo-text); }
.weo-checklist li.is-done svg { color: var(--weo-success); }
.weo-calculating { opacity: .45; transition: opacity .2s; }
.weo-balance-gap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--weo-danger) 10%, transparent); font-size: 12.5px; }
.weo-field-hint { font-size: 11.5px; font-weight: 400; color: var(--weo-muted); }
.weo-field-hint.is-wrong { color: var(--weo-danger); }
.weo-entry-place { display: flex; gap: 8px; flex-wrap: wrap; }
.weo-entry-place > span { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--weo-subtle); border: 1px solid var(--weo-line); color: var(--weo-muted); }
.weo-entry-who { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--weo-muted); }
.weo-cust { display: grid; gap: 14px; }
.weo-cust-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.weo-cust-avatar { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: var(--weo-tint); color: var(--weo-tint-text); font-weight: 700; font-size: 15px; flex: none; }
.weo-cust-name { font-size: 16px; font-weight: 600; }
.weo-cust-sub { font-size: 12px; color: var(--weo-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.weo-cust-badges { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.weo-cust-kyc { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 18px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--weo-subtle); }
.weo-cust-kyc dt { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--weo-muted); }
.weo-cust-kyc dd { margin: 2px 0 0; font-size: 13px; }
.weo-cust-missing { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--weo-warning); }
.weo-cust-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.weo-cust-history { overflow-x: auto; margin: 0 -4px; }
.weo-cust-history .weo-table { font-size: 13px; min-width: 460px; }
.weo-cust-history .weo-table th, .weo-cust-history .weo-table td { padding: 8px 8px; }
.weo-lines { display: grid; gap: 0; }
.weo-line { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr) 32px; gap: 8px; align-items: center; }
.weo-line > * { min-width: 0; }
.weo-line-head { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--weo-muted); padding-bottom: 6px; border-bottom: 1px solid var(--weo-line); }
.weo-line-block { padding: 10px 0; border-bottom: 1px solid var(--weo-line); display: grid; gap: 8px; }
.weo-line-block:last-child { border-bottom: 0; }
.weo-line-inr { font-weight: 600; text-align: right; }
.weo-line-more { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.weo-line-more:empty { display: none; }
.weo-sheet-wide { width: min(640px, 100vw) !important; max-width: 100vw !important; display: flex; flex-direction: column; }
.weo-sheet-body { overflow-y: auto; padding: 4px 4px 16px; flex: 1; }
@media (max-width: 1100px) {
    .weo-line { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .weo-line-head { display: none; }
}
@media (max-width: 720px) {
    .weo-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .weo-line-head { display: none; }
    .weo-entry-step > header, .weo-entry-body { padding-left: 16px; padding-right: 16px; }
}


/* Pages that may not open, and pages that ran into a problem (UX review 2026-10-28). */
.weo-no-access { max-width: 520px; margin: 8vh auto 0; padding: 32px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.weo-no-access h1 { font-size: 22px; font-weight: 600; margin: 6px 0 0; letter-spacing: -.02em; }
.weo-no-access p { margin: 0; color: var(--weo-muted); font-size: 14px; line-height: 1.55; }
.weo-no-access-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--weo-primary) 12%, transparent); color: var(--weo-primary); }
.weo-no-access-icon.is-problem { background: color-mix(in srgb, var(--weo-danger) 12%, transparent); color: var(--weo-danger); }
.weo-no-access-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }

/* Phone widths: nothing pushes the page sideways (UX review 2026-10-28). Grid items and cards may shrink below their
   content, a table outside a phone list scrolls in its own box, and fixed widths set inline stop at the screen. */
.weo-grid > *, .weo-card, main [style*="display: grid"] > * { min-width: 0; }
@media (max-width: 720px) {
  .weo-table:not(.weo-stack .weo-table) { display: block; overflow-x: auto; }
  main [style*="width: "]:not(table, tr, th, td, col) { max-width: 100%; }
}

/* Connection to the server lost (App.razor): Blazor sets components-reconnect-* on #components-reconnect-modal. */
#components-reconnect-modal { display: none; }
#components-reconnect-modal.components-reconnect-show, #components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-failed, #components-reconnect-modal.components-reconnect-rejected {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 10001; background: color-mix(in srgb, var(--weo-text) 18%, transparent); backdrop-filter: blur(2px); }
.weo-reconnect-card { max-width: 420px; margin: 16px; padding: 22px 24px; border-radius: 16px; background: var(--weo-card); color: var(--weo-text); box-shadow: var(--weo-card-shadow); border: 1px solid var(--weo-line); }
.weo-reconnect-card > div { display: none; gap: 8px; justify-items: start; font-size: 14px; }
.weo-reconnect-card span { color: var(--weo-muted); line-height: 1.5; }
.weo-reconnect-card b { font-size: 16px; }
.weo-reconnect-card button, .weo-fatal button { margin-top: 6px; border: 0; border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; background: var(--weo-primary); color: #fff; }
.components-reconnect-show .weo-reconnect-on-show, .components-reconnect-retrying .weo-reconnect-on-show,
.components-reconnect-failed .weo-reconnect-on-failed, .components-reconnect-rejected .weo-reconnect-on-rejected { display: grid; }
.weo-reconnect-spin { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--weo-line); border-top-color: var(--weo-primary); animation: weo-spin .8s linear infinite; }
@keyframes weo-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .weo-reconnect-spin { animation-duration: 2.4s; } }

/* An error that ended the page (blazor.web.js shows #blazor-error-ui). */
#blazor-error-ui { display: none; }
.weo-fatal { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 10002; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px;
  background: var(--weo-card); color: var(--weo-text); border: 1px solid color-mix(in srgb, var(--weo-danger) 45%, var(--weo-line)); box-shadow: var(--weo-card-shadow); font-size: 14px; max-width: calc(100vw - 32px); }
.weo-fatal button { margin-top: 0; }

/* The assistant (M11): a panel on the right, full screen on phones. */
.weo-ai-toggle[aria-expanded="true"] { color: var(--weo-primary); background: color-mix(in srgb, var(--weo-primary) 12%, transparent); }
.weo-ai-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 60; display: flex; flex-direction: column;
  background: var(--weo-card); border-left: 1px solid var(--weo-line); box-shadow: -18px 0 48px rgba(0, 0, 0, .16);
  animation: weo-ai-in .22s cubic-bezier(.2, .8, .2, 1); transition: width .22s cubic-bezier(.2, .8, .2, 1); }
.weo-ai-panel.is-wide { width: min(760px, 100vw); }
@keyframes weo-ai-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.weo-ai-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--weo-line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--weo-primary) 6%, var(--weo-card)), var(--weo-card)); }
.weo-ai-title { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; min-width: 0; }
.weo-ai-sub { font-weight: 400; font-size: 11.5px; color: var(--weo-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.weo-ai-mark, .weo-ai-avatar { display: grid; place-items: center; flex: none; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, var(--weo-primary), color-mix(in srgb, var(--weo-primary) 55%, #a855f7)); box-shadow: 0 4px 14px color-mix(in srgb, var(--weo-primary) 35%, transparent); }
.weo-ai-mark { width: 32px; height: 32px; }
.weo-ai-avatar { width: 24px; height: 24px; border-radius: 8px; margin-top: 1px; }
.weo-ai-head-actions { display: inline-flex; gap: 2px; }
.weo-ai-head-actions [aria-pressed="true"] { color: var(--weo-primary); background: color-mix(in srgb, var(--weo-primary) 12%, transparent); }
.weo-ai-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: grid; align-content: start; gap: 16px; scroll-behavior: smooth; }
.weo-ai-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--weo-muted); margin: 4px 0 2px; }
.weo-ai-empty { display: grid; gap: 10px; padding: 8px 2px; animation: weo-fade-in .3s ease-out; }
.weo-ai-hello { font-size: 21px; font-weight: 650; letter-spacing: -.01em;
  background: linear-gradient(90deg, var(--weo-text), color-mix(in srgb, var(--weo-primary) 70%, var(--weo-text))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.weo-ai-empty p { color: var(--weo-muted); font-size: 13px; line-height: 1.55; margin: 0 0 4px; }
.weo-ai-suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.weo-ai-panel.is-wide .weo-ai-suggestions { grid-template-columns: repeat(4, 1fr); }
.weo-ai-suggestions button { display: grid; gap: 8px; align-content: start; text-align: left; border: 1px solid var(--weo-line); background: var(--weo-card);
  color: var(--weo-text); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 12.5px; line-height: 1.35; cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s; }
.weo-ai-suggestions button svg { color: var(--weo-primary); }
.weo-ai-suggestions button:hover { border-color: color-mix(in srgb, var(--weo-primary) 55%, var(--weo-line)); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.weo-ai-picks button { border: 1px solid var(--weo-line); background: transparent; color: var(--weo-text); border-radius: 10px; padding: 6px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.weo-ai-picks button:hover { border-color: var(--weo-primary); color: var(--weo-primary); }
.weo-ai-turn { display: grid; gap: 8px; animation: weo-fade-in .2s ease-out; }
.weo-ai-turn.is-mine { justify-items: end; }
.weo-ai-bubble { max-width: 85%; padding: 9px 13px; border-radius: 16px 16px 4px 16px; color: #fff; white-space: pre-wrap; font-size: 14px; line-height: 1.45;
  background: linear-gradient(135deg, var(--weo-primary), color-mix(in srgb, var(--weo-primary) 80%, #6366f1)); box-shadow: 0 4px 14px color-mix(in srgb, var(--weo-primary) 25%, transparent); }
.weo-ai-reply { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.weo-ai-reply-body { display: grid; gap: 8px; min-width: 0; }
.weo-ai-steps { display: flex; flex-wrap: wrap; gap: 4px; }
.weo-ai-step { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--weo-muted); padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--weo-line) 55%, transparent); }
.weo-ai-step svg { color: var(--weo-success); }
.weo-ai-answer { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.weo-ai-answer.is-streaming > :last-child::after { content: ""; display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; border-radius: 2px;
  background: var(--weo-primary); animation: weo-caret 1s steps(2) infinite; }
@keyframes weo-caret { 50% { opacity: 0; } }
.weo-ai-answer p { margin: 0 0 8px; } .weo-ai-answer p:last-child { margin-bottom: 0; }
.weo-ai-answer ul, .weo-ai-answer ol { margin: 0 0 8px; padding-left: 20px; }
.weo-ai-answer h4 { margin: 10px 0 4px; font-size: 14px; }
.weo-ai-answer strong { font-weight: 650; }
.weo-ai-answer table { border-collapse: collapse; font-size: 12.5px; margin: 4px 0 8px; display: block; overflow-x: auto; }
.weo-ai-answer th, .weo-ai-answer td { border-bottom: 1px solid var(--weo-line); padding: 5px 8px; text-align: left; }
.weo-ai-answer code { font-size: 12.5px; padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, var(--weo-line) 70%, transparent); }
.weo-ai-table { overflow-x: auto; }
.weo-ai-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.weo-ai-table th, .weo-ai-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--weo-line); white-space: nowrap; }
.weo-ai-table th.weo-num, .weo-ai-table td.weo-num { text-align: right; font-variant-numeric: tabular-nums; }
.weo-ai-table th { color: var(--weo-muted); font-weight: 500; }
.weo-ai-table tr.weo-row-link { cursor: pointer; } .weo-ai-table tr.weo-row-link:hover td { background: color-mix(in srgb, var(--weo-primary) 6%, transparent); }
.weo-ai-card { border: 1px solid var(--weo-line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; background: var(--weo-card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .04); }
.weo-ai-card-title { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; }
.weo-ai-card-title svg { color: var(--weo-primary); }
.weo-ai-card-note { color: var(--weo-muted); font-size: 12px; }
.weo-ai-facts { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 0; font-size: 13px; }
.weo-ai-facts dt { color: var(--weo-muted); } .weo-ai-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; } .weo-ai-facts dd.is-strong { font-weight: 650; }
.weo-ai-problems { margin: 0; padding: 8px 10px 8px 26px; color: var(--weo-danger); font-size: 12.5px; border-radius: 10px; list-style: disc;
  background: color-mix(in srgb, var(--weo-danger) 8%, transparent); }
.weo-ai-link { justify-self: start; border: 0; background: none; padding: 0; color: var(--weo-primary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.weo-ai-link:hover { text-decoration: underline; }
.weo-ai-nav { grid-template-columns: 1fr auto; align-items: center; }
.weo-ai-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.weo-ai-picks button { display: grid; text-align: left; }
.weo-ai-picks button span { color: var(--weo-muted); font-size: 11.5px; }
.weo-ai-confirm { border-color: color-mix(in srgb, var(--weo-primary) 50%, var(--weo-line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--weo-primary) 5%, var(--weo-card)), var(--weo-card)); }
.weo-ai-confirm > .weo-ai-card { border: 0; box-shadow: none; padding: 0; background: transparent; }
.weo-ai-pending { justify-self: start; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  color: var(--weo-warning); background: color-mix(in srgb, var(--weo-warning) 14%, transparent); }
.weo-ai-pending.is-done { color: var(--weo-success); background: color-mix(in srgb, var(--weo-success) 14%, transparent); }
.weo-ai-confirm-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.weo-ai-working { display: inline-flex; align-items: center; gap: 10px; color: var(--weo-muted); font-size: 12.5px; }
.weo-ai-dots { display: inline-flex; gap: 3px; }
.weo-ai-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--weo-primary); animation: weo-dot 1.2s infinite ease-in-out; }
.weo-ai-dots i:nth-child(2) { animation-delay: .15s; } .weo-ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes weo-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.weo-ai-failed { display: flex; gap: 6px; align-items: flex-start; color: var(--weo-danger); font-size: 13px; padding: 8px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--weo-danger) 8%, transparent); }
.weo-ai-feedback { display: flex; gap: 2px; opacity: .55; transition: opacity .15s; }
.weo-ai-turn:hover .weo-ai-feedback, .weo-ai-feedback:focus-within { opacity: 1; }
.weo-ai-feedback button { border: 0; background: none; color: var(--weo-muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.weo-ai-feedback button:hover:not(:disabled) { background: color-mix(in srgb, var(--weo-line) 60%, transparent); color: var(--weo-text); }
.weo-ai-feedback button[aria-pressed="true"] { color: var(--weo-primary); }
.weo-ai-feedback button:disabled:not([aria-pressed="true"]) { opacity: .35; cursor: default; }
.weo-ai-input { padding: 10px 14px 4px; border-top: 1px solid var(--weo-line); }
.weo-ai-compose { display: flex; gap: 8px; align-items: flex-end; padding: 6px 6px 6px 12px; border: 1px solid var(--weo-line); border-radius: 14px; background: var(--weo-card);
  transition: border-color .15s, box-shadow .15s; }
.weo-ai-compose:focus-within { border-color: color-mix(in srgb, var(--weo-primary) 60%, var(--weo-line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--weo-primary) 15%, transparent); }
.weo-ai-compose.is-busy { background: color-mix(in srgb, var(--weo-line) 25%, var(--weo-card)); }
.weo-ai-compose textarea { flex: 1; resize: none; border: 0; outline: 0; padding: 6px 0; font: inherit; font-size: 14px; line-height: 1.45; background: transparent;
  color: var(--weo-text); max-height: 160px; }
.weo-ai-send { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff;
  background: var(--weo-primary); transition: transform .12s, opacity .12s; }
.weo-ai-send:hover:not(:disabled) { transform: scale(1.05); }
.weo-ai-send:disabled { opacity: .35; cursor: default; }
.weo-ai-send.is-stop { background: var(--weo-text); }
.weo-ai-note { margin: 0; padding: 6px 14px 10px; color: var(--weo-muted); font-size: 10.5px; line-height: 1.5; }
.weo-ai-note kbd { font: inherit; font-size: 10px; padding: 0 4px; border: 1px solid var(--weo-line); border-radius: 4px; }
.weo-ai-history-row { display: flex; gap: 6px; align-items: center; }
.weo-ai-history-open { flex: 1; display: grid; text-align: left; gap: 2px; border: 1px solid var(--weo-line); border-radius: 10px; padding: 9px 11px; background: transparent;
  color: var(--weo-text); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s; }
.weo-ai-history-open:hover { border-color: color-mix(in srgb, var(--weo-primary) 50%, var(--weo-line)); }
.weo-ai-history-open span:last-child { font-size: 11.5px; }
@media (max-width: 640px) { .weo-ai-panel, .weo-ai-panel.is-wide { width: 100vw; } .weo-ai-wide-btn { display: none; } .weo-ai-suggestions { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .weo-ai-panel, .weo-ai-turn, .weo-ai-empty { animation: none; } .weo-ai-dots i { animation: none; opacity: .6; } }
/* Explanations (M11 Phase 4, D-03): in a chat card and under the till, day and books-health figures. */
.weo-explain { display: grid; gap: 10px; font-size: 13px; }
.weo-explain-summary { margin: 0; font-size: 13.5px; line-height: 1.5; }
.weo-explain-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--weo-muted); margin-bottom: 4px; }
.weo-explain-likely { border-left: 3px solid var(--weo-warning, #d97706); padding: 6px 10px; border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--weo-warning, #d97706) 8%, transparent); }
.weo-explain-likely ul, .weo-explain-next ol { margin: 0; padding-left: 18px; line-height: 1.5; }
.weo-explain-likely ul { list-style: disc; } .weo-explain-next ol { list-style: decimal; }
.weo-explain-section { border: 1px solid var(--weo-line); border-radius: 10px; padding: 6px 10px; }
.weo-explain-section summary { cursor: pointer; font-weight: 600; font-size: 12.5px; padding: 2px 0; }
.weo-explain-records { list-style: none; margin: 6px 0 2px; padding: 0; display: grid; gap: 4px; }
.weo-explain-records li { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 10px; align-items: baseline; padding: 3px 6px; border-radius: 6px; }
.weo-explain-records li.is-flag { background: color-mix(in srgb, var(--weo-warning, #d97706) 6%, transparent); box-shadow: inset 2px 0 0 var(--weo-warning, #d97706); border-radius: 0 6px 6px 0; }
.weo-explain-ref { border: 0; background: none; padding: 0; color: var(--weo-primary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; font-variant-numeric: tabular-nums; }
.weo-explain-ref.is-plain { color: var(--weo-text); cursor: default; }
.weo-explain-detail { color: var(--weo-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.weo-ai-answer ul { list-style: disc; } .weo-ai-answer ol { list-style: decimal; }
.weo-ai-answer li { margin: 2px 0; }

.weo-guide-pulse { outline: 3px solid var(--weo-primary); outline-offset: 3px; border-radius: 8px; transition: outline-color .3s; }

/* A plain text box (e.g. the assistant's company instructions). */
.weo-textarea { border: 1px solid var(--weo-line); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13.5px; background: transparent; color: var(--weo-text); resize: vertical; }
.weo-textarea:focus { outline: 2px solid color-mix(in srgb, var(--weo-primary) 45%, transparent); }

/* M11 B-08: the checker's notes, above the decision. */
.weo-checker-notes { display: grid; gap: 8px; border-left: 3px solid var(--weo-warning); }
.weo-checker-notes ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.weo-checker-notes li.is-strong { font-weight: 600; }
.weo-checker-summary { margin: 0; font-size: 13px; }

/* M11 C-03: scanning a document into a form. */
.weo-scan { display: grid; gap: 10px; margin-top: 10px; padding: 12px; border: 1px dashed var(--weo-line-strong); border-radius: 10px; }
.weo-scan-pick { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.weo-scan-pick input[type=file] { max-width: 100%; font-size: 12px; }
.weo-scan-fields th { width: 38%; font-weight: 500; text-align: left; }
.weo-scan-fields td:last-child { text-align: right; white-space: nowrap; }

/* M11 C-05: entry hints, quiet under the customer. */
.weo-entry-hints { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; }
.weo-entry-hints li { display: flex; gap: 6px; align-items: flex-start; color: var(--weo-muted); }
.weo-entry-hints li.is-warning { color: var(--weo-warning); }
.weo-entry-hints li svg { flex: none; margin-top: 2px; }
.weo-entry-hints .weo-ai-link { margin-left: auto; white-space: nowrap; }

/* Dashboard summaries (M11 Phase 4, D-04). */
.weo-narrative { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: 0 0 16px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--weo-primary) 30%, var(--weo-line)); background: color-mix(in srgb, var(--weo-primary) 6%, var(--weo-card));
  animation: weo-fade-in .35s ease-out; }
.weo-narrative > svg { color: var(--weo-primary); margin-top: 2px; }
.weo-narrative p { margin: 0; font-size: 14px; line-height: 1.55; }
.weo-narrative details { margin-top: 6px; font-size: 12px; color: var(--weo-muted); }
.weo-narrative summary { cursor: pointer; }
.weo-narrative.is-working { color: var(--weo-muted); animation: weo-narrative-wait 1.6s ease-in-out infinite; }
@keyframes weo-narrative-wait { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .weo-narrative.is-working { animation: none; } }
.weo-narrative ul { margin: 6px 0 0; padding-left: 18px; list-style: disc; line-height: 1.5; }
@keyframes weo-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* AI feedback (M11 A-10). */
.weo-feedback-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--weo-line); }
.weo-feedback-row:last-child { border-bottom: 0; }
.weo-feedback-thumb { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.weo-feedback-thumb.is-good { color: var(--weo-success); background: color-mix(in srgb, var(--weo-success) 12%, transparent); }
.weo-feedback-thumb.is-bad { color: var(--weo-danger); background: color-mix(in srgb, var(--weo-danger) 12%, transparent); }
