/* ═══════════════════════ Appstron One look (UI redesign, 7 Nov 2026) ═══════════════════════
   Colours, type and shapes only: no page logic lives here. Every colour is a token below; pages use the tokens,
   never a hard-coded value. Loaded after the theme and merp-nav.css, so it wins over them.
   Light mode only: dark mode keeps the theme's own colours until its own switch is built (not in this change).
   The private books site (PrivateSite) does not load this file and keeps its own look. */

/* ── fonts, served from this site (no outside font service; OFL licence, see ../fonts/OFL.txt) ── */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url("../fonts/inter-latin.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500 700; font-display: swap;
    src: url("../fonts/space-grotesk-latin.woff2") format("woff2"); }

:root {
    /* the type scale, the only sizes used: Space Grotesk for headings and big figures, Inter for the rest */
    --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 30px;
    /* brand */
    --ao-navy: #0E1B33;
    --ao-navy-2: #1A2846;          /* a control on the navy bar */
    --ao-navy-line: #2C3C60;
    --ao-navy-ink: #C9D2E3;        /* quiet text on navy */
    --ao-orange: #E2643B;          /* accents only: the menu underline, tile borders, the logo tile, chart bars */
    --ao-orange-hover: #C24E26;
    --ao-btn: #C24E26;             /* every filled button, white text 4.8:1 (decided 7 Nov 2026) */
    --ao-btn-hover: #A8421F;
    --ao-orange-tint: #FDEDE6;
    --ao-orange-ink: #B9461F;      /* orange text on white (4.5:1) */
    /* surfaces and text */
    --ao-page: #F4F6FB;
    --ao-card: #FFFFFF;
    --ao-ink: #0E1B33;
    --ao-ink-2: #4A5672;           /* secondary text, 4.5:1 on white */
    --ao-line: #DCE2EE;
    --ao-line-soft: #EEF1F7;
    --ao-head: #F8F9FC;            /* table heads and totals */
    --ao-radius: 14px;
    --ao-radius-lg: 18px;
    --ao-shadow: 0 1px 3px rgba(14, 27, 51, .08);
    --ao-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --ao-font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
    /* app colours (the same in the modern and classic views) */
    --app-sales: #1E9E6A; --app-purchase: #2F6FDB; --app-accounting: #E2643B; --app-pos: #7B4FD6;
    --app-inventory: #0F9AA8; --app-crm: #E0A21B; --app-contacts: #2A9FD6; --app-reports: #D6457A;
    --app-mrp: #5B6B86; --app-hr: #4F5BD5; --app-expenses: #C2410C; --app-settings: #3B4A66;
    /* status badges: background / text */
    --st-draft-bg: #EEF0F4;   --st-draft: #4A5672;
    --st-posted-bg: #E8F0FE;  --st-posted: #2457B8;
    --st-partial-bg: #FFF4DB; --st-partial: #8A5A00;
    --st-paid-bg: #E3F6EC;    --st-paid: #18704A;   /* spec #1E7F55 is 4.4:1 on its tint; 5.5:1 here (audit 18 Nov) */
    --st-late-bg: #FDE8E8;    --st-late: #B42318;
    --st-cancel-bg: #EEF0F4;  --st-cancel: #6B7489;
    /* dots and tile borders that go with them */
    --st-draft-dot: #8A94A8; --st-posted-dot: #2F6FDB; --st-partial-dot: #E0A21B; --st-paid-dot: #1E9E6A; --st-late-dot: #D92D20;
}

/* ── the theme's own variables, light mode ── */
html:not(.dark) {
    --primary: var(--ao-btn);      /* buttons, links and the theme's other uses of the primary colour: all 4.5:1 on white */
    --primary-foreground: #FFFFFF;
    --foreground: var(--ao-ink);
    --secondary-foreground: var(--ao-ink-2);
    --border: var(--ao-line);
    --font-sans: var(--ao-font);
}
html:not(.dark) body { font-family: var(--ao-font); color: var(--ao-ink); background: var(--ao-page); }
html:not(.dark) h1, html:not(.dark) h2, html:not(.dark) .kt-card-title, html:not(.dark) .merp-cp-title,
html:not(.dark) .ao-head { font-family: var(--ao-font-head); color: var(--ao-navy); }
html:not(.dark) .merp-cp-title { font-size: var(--fs-xl); font-weight: 700; }

/* cards: white, rounded, a soft shadow */
html:not(.dark) .kt-card { background: var(--ao-card); border-color: var(--ao-line-soft); border-radius: var(--ao-radius); box-shadow: var(--ao-shadow); }
/* buttons: primary orange; secondary white with a border */
html:not(.dark) .kt-btn-primary { background: var(--ao-btn); color: #fff; }
html:not(.dark) .kt-btn-primary:hover { background: var(--ao-btn-hover); }
html:not(.dark) .kt-btn-outline { background: #fff; border-color: var(--ao-line); }
html:not(.dark) .merp-cp-new { background: var(--ao-btn); color: #fff; border-radius: 10px; font-weight: 600;
    box-shadow: 0 4px 12px rgba(194, 78, 38, .30); }
html:not(.dark) .merp-cp-new:hover { background: var(--ao-btn-hover); }
/* a form's sticky bar sits on the page colour */
html:not(.dark) .merp-fv-bar { background: var(--ao-page); }

/* ── the top bar: navy, white menus, an orange line under the current one ── */
html:not(.dark) #header { background: var(--ao-navy); backdrop-filter: none; -webkit-backdrop-filter: none; border-color: var(--ao-navy) !important; }
html:not(.dark) #header .merp-apps-btn,
html:not(.dark) #header .merp-appname,
html:not(.dark) #header .merp-menubar > .merp-menu-btn,
html:not(.dark) #header .merp-menubar > .merp-menu-entry > .merp-menu-btn,
html:not(.dark) #header .merp-menubar > .merp-menu-more > .merp-menu-btn,
html:not(.dark) #header .merp-navbar > div > .merp-menu-btn { color: var(--ao-navy-ink); }
html:not(.dark) #header .merp-appname { color: #fff; font-family: var(--ao-font-head); font-weight: 600; }
html:not(.dark) #header .merp-apps-btn:hover,
html:not(.dark) #header .merp-appname:hover,
html:not(.dark) #header .merp-menubar .merp-menu-btn:hover,
html:not(.dark) #header .merp-navbar > div > .merp-menu-btn:hover { background: rgba(255, 255, 255, .10); color: #fff; }
html:not(.dark) #header .merp-menubar .merp-menu-btn.is-active,
html:not(.dark) #header .merp-menubar [data-kt-dropdown][class*="open"] > .merp-menu-btn,
html:not(.dark) #header .merp-menubar .merp-menu-btn[aria-expanded="true"] {
    color: #fff; font-weight: 600; background: transparent; border-color: transparent; border-radius: 0;
    box-shadow: inset 0 -3px 0 var(--ao-orange);
}
/* the menus that open from the bar stay light */
html:not(.dark) #header .kt-dropdown-menu { color: var(--ao-ink); }
html:not(.dark) #header .kt-dropdown-menu .merp-menu-btn { color: var(--ao-ink); }
/* search, company, and the round buttons on the right */
html:not(.dark) #header #topsearch { background: rgba(255, 255, 255, .10); border-color: transparent; color: var(--ao-navy-ink); }
html:not(.dark) #header #topsearch:hover { background: rgba(255, 255, 255, .16); }
html:not(.dark) #header #topsearch .text-2xs { background: transparent; border-color: var(--ao-navy-line); color: var(--ao-navy-ink); }
html:not(.dark) #headerContainer > .flex > [data-kt-dropdown] > button,
html:not(.dark) #headerContainer > .flex > [data-kt-dropdown] > button i,
html:not(.dark) #headerContainer > .flex > [data-kt-dropdown] > button .text-mono,
html:not(.dark) #headerContainer > .flex > [data-kt-dropdown] > button .text-muted-foreground,
html:not(.dark) #headerContainer > .flex > button,
html:not(.dark) #headerContainer > .flex > button i { color: #fff; }
html:not(.dark) #headerContainer > .flex > [data-kt-dropdown] > button:hover,
html:not(.dark) #headerContainer > .flex > button:hover { background: rgba(255, 255, 255, .10); }
html:not(.dark) #headerContainer .merp-avatar { background: var(--app-purchase); color: #fff; }

/* ── app tiles: one flat colour each (the launcher, the menu bar, Settings → Apps, the home screen) ── */
.merp-app-art[data-app="sales"]       { --a1: var(--app-sales);      --a2: var(--app-sales); }
.merp-app-art[data-app="purchase"]    { --a1: var(--app-purchase);   --a2: var(--app-purchase); }
.merp-app-art[data-app="accounting"]  { --a1: var(--app-accounting); --a2: var(--app-accounting); }
.merp-app-art[data-app="pos"]         { --a1: var(--app-pos);        --a2: var(--app-pos); }
.merp-app-art[data-app="inventory"]   { --a1: var(--app-inventory);  --a2: var(--app-inventory); }
.merp-app-art[data-app="crm"]         { --a1: var(--app-crm);        --a2: var(--app-crm); }
.merp-app-art[data-app="contacts"]    { --a1: var(--app-contacts);   --a2: var(--app-contacts); }
.merp-app-art[data-app="mrp"]         { --a1: var(--app-mrp);        --a2: var(--app-mrp); }
.merp-app-art[data-app="hr"]          { --a1: var(--app-hr);         --a2: var(--app-hr); }
.merp-app-art[data-app="expenses"]    { --a1: var(--app-expenses);   --a2: var(--app-expenses); }
.merp-app-art[data-app="settings"]    { --a1: var(--app-settings);   --a2: var(--app-settings); }

/* ── status badges: a pill with a word in it, so they read without colour too ── */
.ao-badge { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; padding: 4px 8px;
    font-size: var(--fs-xs); font-weight: 700; line-height: 1.4; }
.ao-draft   { background: var(--st-draft-bg);   color: var(--st-draft); }
.ao-posted  { background: var(--st-posted-bg);  color: var(--st-posted); }
.ao-partial { background: var(--st-partial-bg); color: var(--st-partial); }
.ao-paid    { background: var(--st-paid-bg);    color: var(--st-paid); }
.ao-late    { background: var(--st-late-bg);    color: var(--st-late); }
.ao-cancel  { background: var(--st-cancel-bg);  color: var(--st-cancel); text-decoration: line-through; }
.ao-neutral { background: var(--ao-line-soft);  color: var(--ao-ink-2); }

/* ── lists: status chips above the table, initials, late due dates ── */
.ao-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ao-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--ao-card); border: 1px solid transparent;
    border-radius: 12px; padding: 8px 16px; box-shadow: var(--ao-shadow); font: inherit; cursor: pointer; color: var(--ao-ink); }
.ao-chip:hover { border-color: var(--ao-line); }
.ao-chip[aria-pressed="true"] { border-color: var(--ao-orange); box-shadow: 0 0 0 1px var(--ao-orange) inset, var(--ao-shadow); }
.ao-chip .ao-dot { width: 10px; height: 10px; border-radius: 50%; }
.ao-chip .ao-chip-label { font-size: var(--fs-sm); color: var(--ao-ink-2); }
.ao-chip .ao-chip-n { font-weight: 700; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.ao-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ao-ini { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: var(--fs-xs); font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; }
/* drawn by CSS, so exports, search and grouping read the partner's name only */
.ao-ini::before { content: attr(data-ini); }
.ao-due-late { color: var(--st-late); font-weight: 600; }
html:not(.dark) .ao-list thead tr { background: var(--ao-head); color: var(--ao-ink-2); }
html:not(.dark) .ao-list tbody tr { border-color: var(--ao-line-soft); }
html:not(.dark) .ao-list td, html:not(.dark) .ao-list th { padding-top: .8rem; padding-bottom: .8rem; }
html:not(.dark) .ao-list tfoot tr { background: var(--ao-head); }

/* ── home screen ── */
.ao-home { width: 100%; max-width: 1280px; margin: 0 auto; padding: 4px 0 48px; }
.ao-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 24px; }
/* a phone has no Alt key: no key hints */
@media (max-width: 767px) { .ao-action .ao-key, .ao-action.ao-keys-btn { display: none; } }
.ao-action { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 9px; padding: 8px 16px;
    font: inherit; font-size: var(--fs-sm); font-weight: 600; background: #EBEEF5; color: var(--ao-ink); text-decoration: none; }
.ao-action:hover { background: #DFE4EE; color: var(--ao-ink); }
.ao-action.is-main { background: var(--ao-btn); color: #fff; }
.ao-action.is-main:hover { background: var(--ao-btn-hover); color: #fff; }
.ao-key { font-size: var(--fs-xs); opacity: .8; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; font-weight: 600; }
.ao-insight { background: var(--ao-navy); color: #fff; border-radius: var(--ao-radius-lg); padding: 24px 24px; display: flex;
    justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.ao-insight-hello { font-size: var(--fs-sm); color: #F4B39B; font-weight: 600; }
.ao-insight-text { font-family: var(--ao-font-head); font-size: var(--fs-xl); font-weight: 600; margin: 8px 0 0; line-height: 1.3; color: #fff; }
.ao-insight-btn { background: var(--ao-btn); color: #fff; border: 0; border-radius: 10px; padding: 12px 16px; font: inherit;
    font-size: var(--fs-md); font-weight: 700; cursor: pointer; white-space: nowrap; }
.ao-insight-btn:hover { background: var(--ao-btn-hover); }
.ao-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.ao-sec-h h2 { font-family: var(--ao-font); font-size: var(--fs-md); color: var(--ao-ink-2); margin: 0; font-weight: 600; }
.ao-viewas { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ao-ink-2); }
.ao-viewas select { font: inherit; font-size: var(--fs-sm); background: #fff; color: var(--ao-ink); border: 1px solid var(--ao-line);
    border-radius: 8px; padding: 4px 8px; }
.ao-cues { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.ao-cue { background: var(--ao-card); color: var(--ao-ink); text-decoration: none; border-radius: var(--ao-radius); padding: 16px;
    box-shadow: var(--ao-shadow); border-top: 5px solid var(--cue, var(--st-draft-dot)); display: flex; flex-direction: column; gap: 8px; }
a.ao-cue:hover { box-shadow: 0 6px 16px rgba(14, 27, 51, .10); color: var(--ao-ink); }
.ao-cue-label { font-size: var(--fs-sm); color: var(--ao-ink-2); }
.ao-cue-n { font-family: var(--ao-font-head); font-size: var(--fs-2xl); font-weight: 700; line-height: 1; color: var(--cue-ink, var(--ao-ink)); }
.ao-cue[hidden] { display: none; }
.ao-row { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.ao-apps-wrap { flex: 2 1 520px; min-width: 0; }
.ao-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 12px; }
.ao-app { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--ao-ink);
    font-weight: 600; font-size: var(--fs-sm); text-align: center; }
.ao-app:hover { color: var(--ao-ink); }
.ao-app .merp-app-art { width: 68px; height: 68px; border-radius: 18px; background: var(--a2);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--a2) 33%, transparent); transition: transform .15s ease; }
.ao-app .merp-app-art i { font-size: 2rem; }
.ao-app:hover .merp-app-art { transform: translateY(-2px); }
.ao-money { flex: 1 1 320px; min-width: 0; background: var(--ao-card); border-radius: var(--ao-radius-lg); padding: 20px 24px; box-shadow: var(--ao-shadow); }
.ao-money h2 { font-family: var(--ao-font-head); font-size: var(--fs-lg); margin: 0 0 8px; color: var(--ao-navy); }
.ao-money-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: var(--fs-md); border-top: 1px solid var(--ao-line-soft); }
.ao-money-row:first-of-type { border-top: 0; }
.ao-money-row span { color: var(--ao-ink-2); }
.ao-money-row strong { font-variant-numeric: tabular-nums; }
.ao-money-link { display: inline-block; margin-top: 8px; font-size: var(--fs-md); font-weight: 700; color: var(--ao-orange-ink); }
.ao-money-link:hover { color: var(--ao-orange-hover); }
@media (max-width: 640px) {
    .ao-insight { padding: 16px; }
    .ao-insight-text { font-size: var(--fs-lg); }
    .ao-cues { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .ao-cue-n { font-size: var(--fs-xl); }
    .ao-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ao-app .merp-app-art { width: 58px; height: 58px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) { .ao-app .merp-app-art { transition: none; } }

/* ── document forms (invoice first): the status pill, tinted smart chips, the totals box, the chatter beside ── */
html:not(.dark) .ao-status { background: #fff; border-radius: 999px; padding: 4px; box-shadow: var(--ao-shadow); gap: 2px; }
html:not(.dark) .ao-status > span { border-radius: 999px !important; margin: 0 !important; padding: 8px 16px; font-size: var(--fs-sm); }
html:not(.dark) .ao-status > .bg-muted { background: transparent !important; color: var(--ao-ink-2) !important; }
html:not(.dark) .ao-status > .bg-primary { background: var(--app-purchase) !important; color: #fff !important; font-weight: 700; }
.ao-badge-lg { font-size: var(--fs-sm); padding: 8px 16px; }
html:not(.dark) .ao-smart { background: var(--st-paid-bg); color: var(--st-paid); font-weight: 600; text-decoration: none; border: 0; }
html:not(.dark) .ao-smart:hover { background: #D3EFE0; color: var(--st-paid); }
html:not(.dark) .ao-smart b { font-weight: 700; }
html:not(.dark) .ao-btn-wa:not(.hidden) { background: var(--st-paid-bg); color: var(--st-paid); border-color: transparent; font-weight: 600; }
html:not(.dark) .ao-totals { gap: 8px; width: 320px; max-width: 100%; }
html:not(.dark) .ao-totals > div:nth-child(3) { font-family: var(--ao-font-head); font-size: var(--fs-lg); }
html:not(.dark) .ao-totals .italic { font-style: normal; color: var(--st-paid) !important; }
html:not(.dark) .ao-amount-due { border-top: 0 !important; background: var(--ao-orange-tint); color: var(--ao-orange-ink); border-radius: 10px; padding: 8px 12px !important; font-weight: 700; }
.ao-formcols { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.ao-formcols > .ao-formmain { flex: 999 1 640px; min-width: 0; }
.ao-formcols > .ao-formside { flex: 1 1 300px; min-width: 0; margin-top: 0 !important; }
html:not(.dark) .ao-formside #in-chat-msg, html:not(.dark) .ao-formside [id$="-chat-msg"] { background: var(--app-purchase); color: #fff; }
html:not(.dark) .ao-formmain .merp-tab.is-active { box-shadow: inset 0 -3px 0 var(--ao-orange); color: var(--ao-ink); }

/* ── accounting dashboard: four figures, the bar chart, the aged bar, journal cards in their colour ── */
.ao-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.ao-kpi { background: var(--ao-card); border-radius: var(--ao-radius-lg); padding: 20px 24px; box-shadow: var(--ao-shadow); display: flex; gap: 16px; align-items: center; text-decoration: none; color: var(--ao-ink); }
.ao-kpi:hover { box-shadow: 0 6px 16px rgba(14, 27, 51, .10); color: var(--ao-ink); }
.ao-kpi-icon { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; background: var(--kpi-bg); color: var(--kpi); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xl); }
.ao-kpi-label { display: block; font-size: var(--fs-sm); color: var(--ao-ink-2); }
.ao-kpi-n { display: block; font-family: var(--ao-font-head); font-size: var(--fs-xl); font-weight: 700; color: var(--kpi); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* a long figure stays on one line with its currency: a smaller size, not a wrap */
.ao-kpi-n-sm { font-size: 16px; }
.ao-kpi-n-xs { font-size: 13.5px; }
.ao-dashrow { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ao-panel { background: var(--ao-card); border-radius: var(--ao-radius-lg); padding: 24px 24px; box-shadow: var(--ao-shadow); min-width: 0; }
.ao-panel h2 { font-family: var(--ao-font-head); font-size: var(--fs-lg); margin: 0; color: var(--ao-navy); }
.ao-chart-panel { flex: 2 1 560px; }
.ao-aged-panel { flex: 1 1 320px; }
.ao-panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ao-legend { display: flex; gap: 16px; font-size: var(--fs-sm); color: var(--ao-ink-2); }
.ao-legend span { display: inline-flex; align-items: center; gap: 8px; }
.ao-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ao-bars { display: flex; align-items: flex-end; gap: 16px; height: 240px; margin-top: 20px; padding-bottom: 8px; border-bottom: 1px solid var(--ao-line-soft); overflow-x: auto; }
.ao-bar-month { flex: 1 0 34px; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; font-size: var(--fs-xs); color: var(--ao-ink-2); }
.ao-bar-pair { display: flex; gap: 4px; align-items: flex-end; height: calc(100% - 24px); }
.ao-bar-inc, .ao-bar-exp { width: 16px; min-height: 2px; border-radius: 4px 4px 0 0; }
.ao-bar-inc { background: var(--ao-orange); }
.ao-bar-exp { background: var(--ao-navy); }
.ao-aged-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--ao-line-soft); margin-top: 16px; gap: 2px; }
.ao-aged-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; font-size: var(--fs-sm); }
.ao-aged-legend a { display: flex; flex-direction: column; text-decoration: none; color: var(--ao-ink-2); }
.ao-aged-legend a span:first-child { font-weight: 700; }
html:not(.dark) .ao-jcard { border-top: 5px solid var(--jc); }
.ao-jbtn { background: var(--jc); color: #fff; border-radius: 10px; padding: 8px 16px; font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.ao-jbtn:hover { color: #fff; filter: brightness(.92); }

/* ── bank matching: Bank says | OK | Appstron suggests ── */
.ao-tomatch { color: var(--ao-orange-ink); }
.ao-okall { background: #17855A; color: #fff; border: 0; border-radius: 10px; padding: 8px 16px; font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; }
.ao-okall:hover { filter: brightness(.92); }
.ao-okall:disabled { opacity: .6; }
.ao-banklist { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.ao-bank-empty { background: var(--ao-card); border-radius: var(--ao-radius); padding: 28px; text-align: center; color: var(--ao-ink-2); box-shadow: var(--ao-shadow); }
.ao-bankrow { display: flex; gap: 16px; flex-wrap: wrap; align-items: stretch; }
.ao-bank-says { flex: 1 1 360px; background: var(--ao-card); border-radius: var(--ao-radius); padding: 16px 16px; box-shadow: var(--ao-shadow); display: flex; justify-content: space-between; gap: 12px; min-width: 0; }
.ao-bank-k { font-size: var(--fs-xs); color: #6B7590; }
.ao-bank-t { font-weight: 600; margin-top: 4px; color: var(--ao-ink); overflow-wrap: anywhere; }
.ao-bank-p { font-weight: 400; color: var(--ao-ink-2); }
.ao-bank-amt { font-family: var(--ao-font-head); font-weight: 700; font-size: var(--fs-lg); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ao-bank-amt.is-in { color: var(--st-paid); }
.ao-bank-amt.is-out { color: var(--st-late); }
.ao-bank-act { flex: 0 0 auto; display: flex; align-items: center; }
.ao-bank-ok, .ao-bank-choose { border: 0; border-radius: 12px; padding: 12px 20px; font: inherit; font-weight: 700; color: #fff; cursor: pointer; min-width: 92px; }
.ao-bank-ok { background: #17855A; }
.ao-bank-choose { background: #1D4ED8; }   /* row 132: white on blue-700, 6.7:1 in both themes (the badge ink was light blue in dark mode) */

/* D-13: a statement heading above its lines; its check in amber when it does not add up */
.ao-stmt-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 4px 4px 6px; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); color: var(--ao-ink-2); }
.ao-stmt-head strong { color: var(--ao-ink); }
.ao-stmt-warn { color: #B45309; font-weight: 600; }
html.dark .ao-stmt-warn { color: #FBBF24; }
.ao-bank-stmt { background: none; border: 0; padding: 0; margin-top: 6px; font: inherit; font-size: var(--fs-xs); color: var(--ao-ink-2); text-decoration: underline; cursor: pointer; }
.ao-bank-ok:hover, .ao-bank-choose:hover { filter: brightness(.92); }
.ao-bank-sug { flex: 1 1 360px; background: var(--ao-card); border: 1px dashed #B8C2D6; border-radius: var(--ao-radius); padding: 16px 16px; min-width: 0; }
.ao-bank-sug.is-match { background: var(--st-paid-bg); border-color: var(--app-sales); }
.ao-bank-other { margin-top: 8px; background: none; border: 0; padding: 0; font: inherit; font-size: var(--fs-xs); color: var(--st-posted); text-decoration: underline; cursor: pointer; }
.ao-bankdone > summary { cursor: pointer; font-weight: 600; color: var(--ao-ink-2); margin: 8px 0 12px; }
@media (max-width: 640px) { .ao-bank-act { width: 100%; } .ao-bank-ok, .ao-bank-choose { width: 100%; } }

/* ── the keyboard shortcuts panel (?): a navy card, bottom right ── */
.ao-keys-panel { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: min(320px, calc(100vw - 32px)); background: var(--ao-navy);
    color: #fff; border-radius: var(--ao-radius-lg); padding: 16px 16px; box-shadow: 0 16px 40px rgba(14, 27, 51, .35); font-size: var(--fs-sm); }
.ao-keys-panel[hidden] { display: none; }
.ao-keys-h { display: flex; justify-content: space-between; align-items: center; font-family: var(--ao-font-head); font-weight: 600; font-size: var(--fs-md); margin-bottom: 8px; }
.ao-keys-h button { background: none; border: 0; color: var(--ao-navy-ink); font-size: var(--fs-lg); line-height: 1; cursor: pointer; }
.ao-keys-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--ao-navy-line); color: var(--ao-navy-ink); }
.ao-keys-row kbd { font: inherit; font-weight: 600; color: #fff; background: var(--ao-navy-2); border: 1px solid var(--ao-navy-line); border-radius: 6px; padding: 0 8px; white-space: nowrap; }
.ao-keys-btn { background: transparent; border: 1px dashed var(--ao-line); color: var(--ao-ink-2); cursor: pointer; }

/* ── skeletons (grey placeholders while a list or page loads) and empty states ── */
@keyframes ao-shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }
.ao-skel { display: inline-block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #E6EAF2 0, #F1F4F9 40%, #E6EAF2 80%);
    background-size: 400px 100%; animation: ao-shimmer 1.2s linear infinite; }
.ao-skel-row { display: flex; gap: 24px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--ao-line-soft); }
.ao-skel-row:last-child { border-bottom: 0; }
html.dark .ao-skel { background: linear-gradient(90deg, #27272a 0, #3f3f46 40%, #27272a 80%); background-size: 400px 100%; }
@media (prefers-reduced-motion: reduce) { .ao-skel { animation: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
body.ao-navigating #content > * { visibility: hidden; }
body.ao-navigating #content { position: relative; min-height: 60vh; }
body.ao-navigating #content::before { content: ""; position: absolute; inset: 20px max(16px, calc((100% - 1280px) / 2)) auto; height: 360px; border-radius: var(--ao-radius-lg);
    background: linear-gradient(90deg, #E6EAF2 0, #F1F4F9 40%, #E6EAF2 80%); background-size: 400px 100%; animation: ao-shimmer 1.2s linear infinite; opacity: .8; }
.ao-empty-box { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ao-empty-text { font-size: var(--fs-md); color: var(--ao-ink-2); }
[id$='-empty'] .ao-empty-new { margin-top: 4px; }

/* every app tile is one flat colour (no gradients), in the launcher, the classic menu and on home */
.merp-app-art { background: var(--a2) !important; box-shadow: none; }
.ao-app .merp-app-art { box-shadow: 0 6px 16px color-mix(in srgb, var(--a2) 33%, transparent); }
html:not(.dark) #nav-progress { background: var(--ao-orange); box-shadow: none; }

/* ── one primary (orange) button per screen; any further filled button reads as secondary ── */
html:not(.dark) .kt-btn-primary:not(.hidden) ~ .kt-btn-primary { background: #fff; color: var(--ao-ink); border: 1px solid var(--ao-line); }
html:not(.dark) .merp-fv-bar .merp-cp-new { background: #fff; color: var(--ao-ink); border: 1px solid var(--ao-line); box-shadow: none; }
html:not(.dark) .merp-fv-bar .merp-cp-new:hover { background: var(--ao-page); }
/* the form's Save: a bordered button with a green word, as in the design (Confirm / Pay is the one orange) */
html:not(.dark) body.merp-save-words .merp-fv-bar button[title="Save"]:not(.hidden) { background: #fff; color: var(--st-paid) !important;
    border: 1px solid var(--ao-line); }
html:not(.dark) body.merp-save-words .merp-fv-bar button[title="Save"]:hover { background: var(--st-paid-bg); }
/* the dashboard's journal cards: their action as a secondary button in the journal's colour */
.ao-jbtn { background: #fff; color: var(--ao-ink); border: 1px solid var(--ao-line); box-shadow: inset 4px 0 0 var(--jc); }
.ao-jbtn:hover { color: var(--ao-ink); background: var(--ao-page); filter: none; }
/* the home banner's reminder is secondary to the action bar's one orange button */
.ao-insight-btn { background: #fff; color: var(--ao-navy); }
.ao-insight-btn:hover { background: #F4B39B; color: var(--ao-navy); }
/* empty states: their New is secondary to the page's own New */
.ao-empty-new { background: #fff !important; color: var(--ao-ink) !important; border: 1px solid var(--ao-line) !important; }

/* ── numbers: tabular figures, right-aligned in tables and totals ── */
.ao-totals span:last-child, .ao-cue-n, .ao-kpi-n, .ao-chip-n, .ao-money-row strong, .ao-bank-amt { font-variant-numeric: tabular-nums; }
.ao-totals > div > span:last-child { text-align: end; }
html:not(.dark) .merp-jtitle { font-family: var(--ao-font-head); }

/* the theme has no "light" button: it fell back to the primary colour (orange now). A quiet grey one. */
html:not(.dark) .kt-btn-light { background: #EBEEF5; color: var(--ao-ink); border: 0; }
html:not(.dark) .kt-btn-light:hover { background: #DFE4EE; color: var(--ao-ink); }
html:not(.dark) .kt-btn-light i { color: var(--ao-ink-2); }
/* the chatter's Send message: a plain bordered button on every form, so the form's one orange button is the only
   filled one (some forms drew it in the New style, others grey); its buttons wrap in a narrow column */
html:not(.dark) [id$="-chat-msg"].kt-btn-light,
html:not(.dark) button[id$="-msg"].merp-cp-new { background: #fff; color: var(--ao-ink); border: 1px solid var(--ao-line); box-shadow: none; }
html:not(.dark) [id$="-chat-msg"].kt-btn-light:hover,
html:not(.dark) button[id$="-msg"].merp-cp-new:hover { background: var(--ao-page); color: var(--ao-ink); }
.ao-formside .kt-card-content > .flex:first-child { flex-wrap: wrap; }
/* the lines table fits beside the chatter: a narrower Product column */
.ao-formmain .merp-o2m th { min-width: 0 !important; }
.ao-formmain .merp-o2m th:nth-child(2) { min-width: 160px !important; }

/* the bank's "use outstanding accounts" notice: one row, and its button secondary to New Transaction */
#br-outstanding { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; text-align: start; }
html:not(.dark) #br-outstanding .kt-btn-primary { background: #fff; color: var(--ao-ink); border: 1px solid var(--ao-line); }

/* ══ calm backgrounds (Sajjad, 8 Nov 2026: "all backgrounds should be decent") — light mode only ══
   A soft neutral page, white cards with a light 1px border and a very soft shadow; no large dark or coloured blocks
   inside the app except the navy top bar; no gradients or patterns; light amber only for warnings, light green and red
   only inside status badges. */
html:not(.dark) {
    --ao-page: #F7F8FA;
    --ao-card-line: #E6E9F0;
    --ao-shadow: 0 1px 2px rgba(14, 27, 51, .05);
}
html:not(.dark) .kt-card, html:not(.dark) .ao-cue, html:not(.dark) .ao-money, html:not(.dark) .ao-kpi,
html:not(.dark) .ao-panel, html:not(.dark) .ao-chip:not([aria-pressed="true"]), html:not(.dark) .ao-bank-says,
html:not(.dark) .ao-bank-empty, html:not(.dark) .ao-status {
    border: 1px solid var(--ao-card-line); box-shadow: var(--ao-shadow);
}
html:not(.dark) a.ao-cue:hover, html:not(.dark) .ao-kpi:hover { box-shadow: 0 2px 6px rgba(14, 27, 51, .08); }

/* home: the insight banner is a white card with navy text and a thin orange left border; its reminder a bordered button */
html:not(.dark) .ao-insight { background: var(--ao-card); color: var(--ao-navy); border: 1px solid var(--ao-card-line);
    border-left: 4px solid var(--ao-orange); box-shadow: var(--ao-shadow); }
html:not(.dark) .ao-insight-hello { color: var(--ao-orange-ink); }
html:not(.dark) .ao-insight-text { color: var(--ao-navy); }
html:not(.dark) .ao-insight-btn { background: #fff; color: var(--ao-navy); border: 1px solid var(--ao-line); }
html:not(.dark) .ao-insight-btn:hover { background: var(--ao-page); color: var(--ao-navy); }
/* action tiles: white, only a thin coloured top line (and the dashboard's journal cards the same) */
html:not(.dark) .ao-cue { border-top: 3px solid var(--cue, var(--st-draft-dot)); }
html:not(.dark) .ao-jcard { border-top: 3px solid var(--jc); }

/* the invoice form: payment chips and the WhatsApp button bordered, amount due a white box with an orange left line */
html:not(.dark) .ao-smart { background: #fff; color: var(--ao-navy); border: 1px solid var(--ao-line); }
html:not(.dark) .ao-smart:hover { background: var(--ao-page); color: var(--ao-navy); }
html:not(.dark) .ao-btn-wa:not(.hidden) { background: #fff; color: var(--ao-navy); border: 1px solid var(--ao-line); }
html:not(.dark) .ao-btn-wa:not(.hidden):hover { background: var(--ao-page); }
html:not(.dark) .ao-amount-due { background: #fff; color: var(--ao-orange-ink); border: 1px solid var(--ao-card-line);
    border-left: 4px solid var(--ao-orange); }

/* bank matching: white rows; a suggested match has a green line, not a green fill; OK and Choose are bordered buttons */
html:not(.dark) .ao-bank-sug { background: #fff; border: 1px dashed #C9D1E0; }
html:not(.dark) .ao-bank-sug.is-match { background: #fff; border: 1px solid var(--ao-card-line); border-left: 4px solid var(--st-paid-dot); }
html:not(.dark) .ao-bank-ok, html:not(.dark) .ao-bank-choose, html:not(.dark) .ao-okall {
    background: #fff; border: 1px solid var(--ao-line); filter: none; }
html:not(.dark) .ao-bank-ok, html:not(.dark) .ao-okall { color: var(--st-paid); }
html:not(.dark) .ao-bank-choose { color: var(--st-posted); }
html:not(.dark) .ao-bank-ok:hover, html:not(.dark) .ao-bank-choose:hover, html:not(.dark) .ao-okall:hover { background: var(--ao-page); filter: none; }

/* the shortcuts panel: a white card */
html:not(.dark) .ao-keys-panel { background: #fff; color: var(--ao-navy); border: 1px solid var(--ao-card-line);
    box-shadow: 0 8px 24px rgba(14, 27, 51, .12); }
html:not(.dark) .ao-keys-h button { color: var(--ao-ink-2); }
html:not(.dark) .ao-keys-row { border-top-color: var(--ao-line-soft); color: var(--ao-ink-2); }
html:not(.dark) .ao-keys-row kbd { color: var(--ao-navy); background: var(--ao-page); border-color: var(--ao-line); }

/* loading placeholders: flat grey that breathes, no gradient */
@keyframes ao-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
html:not(.dark) .ao-skel { background: #ECEFF4; animation: ao-breathe 1.4s ease-in-out infinite; }
html:not(.dark) body.ao-navigating #content::before { background: #ECEFF4; animation: ao-breathe 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { html:not(.dark) .ao-skel, html:not(.dark) body.ao-navigating #content::before { animation: none; } }
/* the chatter's Send message beside a form: bordered, as on every other form (an older rule drew it blue here) */
html:not(.dark) .ao-formside #in-chat-msg, html:not(.dark) .ao-formside [id$="-chat-msg"] {
    background: #fff; color: var(--ao-ink); border: 1px solid var(--ao-line); }
html:not(.dark) .ao-formside #in-chat-msg:hover, html:not(.dark) .ao-formside [id$="-chat-msg"]:hover { background: var(--ao-page); }

/* S-SET 3: a delivery's lines show no destination (Odoo hides To on deliveries) */
#tr-lines.tr-no-dest .tr-destcol { display: none !important; }

/* a confirmed document's fields read as values, as Odoo's read-only fields do, not as empty-looking disabled boxes */
.merp-readonly .merp-field input:disabled, .merp-readonly .merp-field select:disabled, .merp-readonly .merp-field textarea:disabled {
    border-color: transparent !important; background: transparent !important; box-shadow: none !important; color: var(--foreground) !important;
    opacity: 1 !important; -webkit-text-fill-color: var(--foreground); padding-left: 0; appearance: none; cursor: default; }
/* I5: a read-only many2one and amount read as plain text too (no underline, no faded picker, amounts left-aligned like the other values) */
.merp-readonly .merp-field .m2o-trigger { border-color: transparent !important; background: transparent !important; box-shadow: none !important; opacity: 1 !important; }
.merp-readonly .merp-field .m2o-input:disabled { color: var(--foreground) !important; -webkit-text-fill-color: var(--foreground); opacity: 1 !important; padding-left: 0; cursor: default; }
.merp-readonly .merp-field input[type=number]:disabled { text-align: left !important; -moz-appearance: textfield; }
.merp-readonly .merp-field input[type=number]:disabled::-webkit-inner-spin-button, .merp-readonly .merp-field input[type=number]:disabled::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ══ dark mode (tester UI audit 18 Nov, group A): the same tokens, dark values — every panel, word and badge above that
   reads a token follows; text 4.5:1 or better on the dark card (#18181B) and page (#09090B) ══ */
html.dark {
    --ao-page: #09090B;
    --ao-card: #18181B;
    --ao-card-line: #27272A;
    --ao-ink: #F4F4F5;
    --ao-ink-2: #B4B9C6;           /* secondary text: 8.9:1 on the card */
    --ao-line: #3F3F46;
    --ao-line-soft: #27272A;
    --ao-head: #1F1F23;
    --ao-orange-ink: #F4A07F;      /* orange words: 7.6:1 on the card */
    --ao-orange-tint: #3A2117;
    --ao-shadow: 0 1px 2px rgba(0, 0, 0, .5);
    --st-draft-bg: #2A2D35;   --st-draft: #CDD3DF;
    --st-posted-bg: #1B2A4A;  --st-posted: #A9C4F7;
    --st-partial-bg: #3A2C0A; --st-partial: #F5C76B;
    --st-paid-bg: #12301F;    --st-paid: #84D9AD;
    --st-late-bg: #3D1515;    --st-late: #F7A39C;
    --st-cancel-bg: #2A2D35;  --st-cancel: #A3AABA;
    /* the theme's quiet text (zinc-500, about 4:1) is too faint: breadcrumbs, New, Add a line, the footer, list dates */
    --muted-foreground: #A1A1AA;
}
/* home: the role tiles keep their coloured top line; their figure is plain light ink (the tile inks are for white) */
html.dark .ao-cue-n { color: var(--ao-ink); }
/* red words and red outline buttons (the theme's red is 4.0-4.2:1 here): the late-status red, 8:1 on the card (re-test 20 Nov) */
html.dark .text-destructive, html.dark .kt-btn-destructive.kt-btn-outline { color: #F7A39C; }
html.dark .ao-money, html.dark .ao-money-row strong { color: var(--ao-ink); }
html.dark .ao-money h2 { color: var(--ao-ink); }
html.dark .ao-action { background: #27272A; color: var(--ao-ink); }
html.dark .ao-action:hover { background: #3F3F46; color: var(--ao-ink); }
html.dark .ao-action.is-main { background: var(--ao-btn); color: #fff; }
html.dark .ao-viewas select { background: var(--ao-card); color: var(--ao-ink); }
html.dark .ao-sec-h h2, html.dark .ao-cue-label, html.dark .ao-money-row span { color: var(--ao-ink-2); }
html.dark .ao-app, html.dark .ao-app:hover { color: var(--ao-ink); }
html.dark .ao-jbtn, html.dark .ao-insight-btn, html.dark .ao-empty-new { background: var(--ao-card) !important; color: var(--ao-ink) !important; border: 1px solid var(--ao-line) !important; }
html.dark .ao-bank-sug { background: var(--ao-card); border-color: var(--ao-line); }
html.dark .ao-bank-k { color: var(--ao-ink-2); }
/* the footer's links (audit item 14): darker orange on the page colour, 5:1 light; light orange in dark mode */
html:not(.dark) .kt-footer a.text-primary { color: var(--ao-orange-ink); }
html.dark .kt-footer a.text-primary { color: var(--ao-orange-ink); }
/* ══ UI audit group B (items 2, 7, 8): every status badge in the spec's token pairs, both themes ══
   The theme's solid badges were white on green / yellow / violet (Paid 2.2, Partially Paid 1.6); its outline ones close.
   Success = paid, warning = partially paid, info = posted / in payment, destructive = late; the word carries the meaning. */
.kt-badge.kt-badge-success, .merp-badge-done { background: var(--st-paid-bg) !important; color: var(--st-paid) !important; border-color: transparent !important; }
.kt-badge.kt-badge-warning { background: var(--st-partial-bg) !important; color: var(--st-partial) !important; border-color: transparent !important; }
.kt-badge.kt-badge-info, .merp-badge-ready { background: var(--st-posted-bg) !important; color: var(--st-posted) !important; border-color: transparent !important; }
.kt-badge.kt-badge-destructive, .merp-badge-cancel { background: var(--st-late-bg) !important; color: var(--st-late) !important; border-color: transparent !important; }
/* warning words outside a badge (the sale order's "· 1 to do", 2.9 on white) */
html:not(.dark) .text-warning { color: var(--st-partial); }
html.dark .text-warning { color: var(--st-partial); }
/* a read-only choice (Payment Type on a posted payment) shows the chosen option only, as Odoo's read-only radio does */
.merp-readonly label:has(> input[type=radio]:not(:checked)) { display: none !important; }
.merp-readonly input[type=radio]:checked { display: none; }
/* ══ UI audit group C (item 10): on a phone every control is at least 36 px to tap (was 13–29 px) ══ */
@media (max-width: 640px) {
    .kt-btn-sm, .kt-btn-xs, .kt-input-sm, .kt-select-sm, .merp-cp-box input, .merp-cell-input { min-height: 36px; }
    .kt-btn-icon, .merp-cp-arrow, .merp-cp-sp-toggle, .merp-star, .merp-o2m button, .merp-fv-bar button { min-width: 36px; min-height: 36px; }
    .merp-star { display: inline-flex; align-items: center; justify-content: center; }
    #content nav a, .merp-crumbs a, main a.inline-flex { min-height: 32px; display: inline-flex; align-items: center; }
    .kt-table input[type=checkbox], .merp-o2m input[type=checkbox] { width: 22px; height: 22px; }
    .m2o-input, .m2o-trigger { min-height: 36px; }
    /* item 3: a form's grid never grows wider than the phone (the product form was 401 px on 375): its column shrinks to fit */
    .merp-fv .grid:not([class*="grid-cols-"]), .merp-fv .grid[class*="md:grid-cols-"] { grid-template-columns: minmax(0, 1fr); }
    .merp-fv .grid > * { min-width: 0; }
    .kt-checkbox, .kt-radio { width: 22px; height: 22px; }
    button.rm { min-width: 28px; min-height: 28px; }
    .ao-money-link { min-height: 36px; display: inline-flex; align-items: center; }
    .merp-fv button.hover\:text-primary { min-height: 36px; }
    .merp-fv select, .merp-fv .kt-select, .merp-fv .kt-input { max-width: 100%; }
    main a.text-primary.hover\:underline, main button.text-primary.hover\:underline { min-height: 36px; display: inline-flex; align-items: center; }
}
/* ══ UI audit group D (item 9): a long partner name stays on one line with "…"; hovering shows it whole (merp-list-cards.js) ══ */
.ao-who { max-width: 280px; }
.ao-who > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kt-table td[data-col="customer"], .kt-table td[data-col="partner"], .kt-table td[data-col="vendor"], .kt-table td[data-col="contact"] {
    max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ══ UI audit group E (items 12, 13) ══ */
/* the shortcuts button is a small "?" square, so it no longer drops alone onto a second line under the action bar */
.ao-action.ao-keys-btn { min-width: 36px; justify-content: center; padding-left: 0; padding-right: 0; font-weight: 700; }
/* item 13: Due Date "or" Payment Terms stays on one line; the terms box shrinks instead of wrapping */
.merp-due { flex-wrap: nowrap; min-width: 0; }
.merp-due > span { white-space: nowrap; }
.merp-due > select { min-width: 0; flex: 1 1 0; }
.merp-due > input[type=date] { flex: 0 1 150px; min-width: 120px; }

/* ══ re-test 18 Nov (after #208): the last text under 4.5:1, measured with the theme's oklch colours read correctly ══
   Dark: the theme's blue primary (oklch .546, 3.5–3.8 on the dark page and card) was every link, breadcrumb, account code,
   the form's outlined New, "Show archived" and the active status step. Text and outlines now take the light orange
   (7.6:1 on the card); a filled button stays the brand orange with white text (4.8:1), as in light mode. */
html.dark {
    --primary: var(--ao-orange-ink);
    --primary-foreground: #18181B;
}
html.dark .kt-btn-primary, html.dark .merp-cp-new:not(.merp-fv-bar .merp-cp-new) { background: var(--ao-btn); color: #fff; }
html.dark .kt-btn-primary:hover { background: var(--ao-btn-hover); }
/* Light: grey text on the grey status bar and list cells (4.0–4.4) and orange on its own tint (3.8–3.9) */
html:not(.dark) { --muted-foreground: #5E5E68; }                          /* 5.6:1 on the status bar's grey, 6.3:1 on white */
html:not(.dark) .merp-step.is-active,
html:not(.dark) .coa-codelink,
html:not(.dark) .rounded-full.bg-primary\/10 { color: #9A3412; }        /* deep orange: 6.5:1 on the orange tint */
/* the account type badges (Equity, ...): the theme's violet outline was 3.5 light / 4.1 dark */
html:not(.dark) .kt-badge-primary.kt-badge-outline { color: #6D28D9 !important; border-color: #C4B5FD !important; }
html.dark .kt-badge-primary.kt-badge-outline { color: #C4B5FD !important; border-color: #6D28D9 !important; }

/* Odoo's product configurator dialog (any product with attributes) */
.mcfg-overlay { position: fixed; inset: 0; z-index: 10060; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow-y: auto; }
.mcfg { width: 100%; max-width: 960px; display: flex; flex-direction: column; }
.mcfg-head, .mcfg-foot { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.mcfg-head { justify-content: space-between; border-bottom: 1px solid var(--border); }
.mcfg-foot { border-top: 1px solid var(--border); flex-wrap: wrap; justify-content: flex-end; }
.mcfg-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.mcfg-quickrow { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.mcfg-main { display: grid; grid-template-columns: 1fr 260px; gap: 18px; }
.mcfg-rows { display: flex; flex-direction: column; gap: 10px; }
.mcfg-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: start; }
.mcfg-k { font-size: var(--fs-xs); color: var(--ao-ink-2); padding-top: 8px; }
.mcfg-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.mcfg-pill { min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--border); background: var(--background); color: var(--foreground); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.mcfg-pill.is-on { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); font-weight: 600; }
.mcfg-pill.is-off { border-style: dashed; color: var(--ao-ink-2); text-decoration: line-through; opacity: .75; }   /* still chosen on a click: it clears what rules it out */
.mcfg-sel option.is-off { color: var(--ao-ink-2); }
.mcfg-note { font-size: var(--fs-xs); color: #B45309; } html.dark .mcfg-note { color: #FBBF24; } .mcfg-note:empty { display: none; }
.mcfg-side { border-left: 1px solid var(--border); padding-left: 16px; }
.mcfg-hs { font-family: var(--ao-font-head); font-size: 1.4rem; font-weight: 700; color: var(--ao-ink); }
.mcfg-hswarn { margin-top: 6px; max-width: 220px; font-size: var(--fs-xs); color: var(--destructive); }
.mcfg-hswarn:empty { display: none; }
.mcfg-hsbox + .mcfg-specbox:not([hidden]) { margin-top: 12px; }
.mcfg-specname { font-weight: 600; color: var(--ao-ink); margin-bottom: 4px; }
.mcfg-spec { width: 100%; font-size: var(--fs-xs); border-collapse: collapse; }
.mcfg-spec th { text-align: start; font-weight: 400; color: var(--ao-ink-2); padding: 3px 8px 3px 0; vertical-align: top; }
.mcfg-spec td { text-align: end; color: var(--ao-ink); padding: 3px 0; font-variant-numeric: tabular-nums; }
.mcfg-spec tr + tr > * { border-top: 1px solid var(--border); }
.mcfg-unit { color: var(--ao-ink-2); }
.mcfg-qty { width: 110px; text-align: end; }
.mcfg-missing { font-size: var(--fs-xs); color: #B45309; margin-right: auto; padding-left: 6px; } html.dark .mcfg-missing { color: #FBBF24; }
@media (max-width: 720px) { .mcfg-main { grid-template-columns: 1fr; } .mcfg-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 10px; } .mcfg-quickrow { grid-template-columns: 1fr; } .mcfg-row { grid-template-columns: 1fr; } }
/* the variant's values under a line's product, in full (the product box cuts them off) */
.lc-variant { font-size: var(--fs-xs); color: var(--ao-ink-2); margin-top: 2px; white-space: normal; overflow-wrap: anywhere; }
/* Create and edit... on an order line: the product form in a dialog over the order (the page with ?embed=1) */
.merp-embed .kt-header, .merp-embed .kt-footer, .merp-embed aside, .merp-embed #merp-help-btn { display: none !important; }
.merp-embed main { padding-top: 0 !important; }
.m2o-formdlg { position: fixed; inset: 0; z-index: 10070; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 2vh 12px; }
.m2o-formdlg-box { width: min(1200px, 100%); height: 94vh; background: var(--background); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.m2o-formdlg-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.m2o-formdlg iframe { flex: 1; width: 100%; border: 0; }
/* the line product list: a product with attributes once, by its name, then its recent variants */
.m2o-opt.m2o-opt-cfg { font-weight: 600; }
.m2o-opt.m2o-opt-cfg::after { content: "  \2192  choose options"; font-weight: 400; font-size: var(--fs-xs); color: var(--ao-ink-2); }
.m2o-group { padding: 4px 12px 2px 24px; font-size: var(--fs-xs); color: var(--ao-ink-2); }
.m2o-opt.m2o-opt-recent { padding-left: 24px; font-size: var(--fs-sm); }
/* configurator: no HS code on the product, no side panel; extra prices; Odoo's order grid */
.mcfg-main.no-side { grid-template-columns: 1fr; }
.mcfg-view { margin-left: auto; display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.mcfg-view button { padding: 4px 12px; font: inherit; font-size: var(--fs-xs); background: var(--background); color: var(--ao-ink-2); border: 0; cursor: pointer; }
.mcfg-view button + button { border-left: 1px solid var(--border); }
.mcfg-view button[aria-pressed="true"] { background: var(--primary); color: var(--primary-foreground); font-weight: 600; }
.mcfg-view button:focus-visible, .mcfg-sel:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mcfg-row .mcfg-sel { max-width: 420px; }
.mcfg-pill-extra { margin-left: 6px; font-size: var(--fs-xs); opacity: .8; font-variant-numeric: tabular-nums; }
.mcfg-pill:focus-visible, .mcfg-cell:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mcfg-extra { font-size: var(--fs-xs); color: var(--ao-ink-2); font-variant-numeric: tabular-nums; }
.mcfg-gridwrap { overflow-x: auto; }
.mcfg-grid { border-collapse: collapse; font-size: var(--fs-sm); }
.mcfg-grid th, .mcfg-grid td { padding: 4px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.mcfg-grid thead th { font-weight: 600; text-align: center; color: var(--ao-ink-2); }
.mcfg-grid tbody th { text-align: left; font-weight: 500; }
.mcfg-cell { width: 84px; text-align: end; }
.mcfg-cell-off { text-align: center; color: var(--ao-ink-2); }
/* the sales line stock popover: short of the quantity (Odoo's "Not enough inventory") */
.merp-stockpop-short { color: #B42318; font-weight: 600; } html.dark .merp-stockpop-short { color: #F7A39C; }
