/* semaiX v4 layer (Fajar, 15 Oct 2026): approved key screens v4 applied to every screen.
   Typeface Source Sans 3 (F-1a). Tabler icons at 1.5 stroke (I-1a). Work first: compact header, page tabs, figure strips.
   Colour roles: navy = action, current, highlight; green = done; amber = waiting; red = refused or overdue; app colours only on app badges.
   Type: 22 title, 18 figure, 15 section, 14 body, 13 label. Loaded after core.css; colours only as tokens, except the values below. */
:root {
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --bg: #F5F6F8; --surface: #FFFFFF; --surface-2: #F8F9FB; --sunken: #EFF2F6; --ink: #101828; --ink-2: #475467; --muted: #667085;
  --line: #E6E9EF; --line-strong: #7E8AA1; --line-soft: #D3D9E2; --primary: #002060; --primary-hover: #1A3E8C; --primary-tint: #EBF0F9; --on-primary: #FFFFFF;
  --accent: #002060; --accent-tint: #EBF0F9; --focus: #006C07;
  --success: #067647; --success-tint: #E7F5ED; --warning: #93590A; --warning-tint: #FEF4E2; --danger: #B42318; --danger-tint: #FDECEA; --info: #1F58B8; --info-tint: #E7EFFB;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .04); --shadow-2: 0 12px 40px rgba(16, 24, 40, .16);
  --header-h: 56px; --bar: #E3E8EF;
  --a1: #E8EEF9; --a1i: #1F3B7A; --a2: #E6F2F1; --a2i: #1E5E5A; --a3: #F3ECF7; --a3i: #5B3D7A; --a4: #F7EEE6; --a4i: #7A4A1F; --a5: #EAF2E6; --a5i: #355E25; --a6: #EEF0F3; --a6i: #3D4A5C;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0F17; --surface: #121925; --surface-2: #151D2B; --sunken: #0F1520; --ink: #E7ECF3; --ink-2: #B4BECD; --muted: #8E99AB;
    --line: #212B3A; --line-strong: #617090; --line-soft: #2E3A4C; --primary: #A9C1F2; --primary-hover: #C5D5F6; --primary-tint: #1A2843; --on-primary: #0B0F17;
    --accent: #A9C1F2; --accent-tint: #1A2843; --focus: #72C97A;
    --success: #6CCB94; --success-tint: #13291D; --warning: #E9B65A; --warning-tint: #2F2410; --danger: #F29B91; --danger-tint: #36191A; --info: #8FB5F6; --info-tint: #16264A;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 16px 48px rgba(0, 0, 0, .55); --bar: #243042;
    --a1: #1C2A45; --a1i: #B9CCF5; --a2: #15302E; --a2i: #9ED9D3; --a3: #2A2036; --a3i: #D4BCEB; --a4: #33261A; --a4i: #EBC9A6; --a5: #1C2C17; --a5i: #B5DBA3; --a6: #222A36; --a6i: #C3CCD9;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0F17; --surface: #121925; --surface-2: #151D2B; --sunken: #0F1520; --ink: #E7ECF3; --ink-2: #B4BECD; --muted: #8E99AB;
  --line: #212B3A; --line-strong: #617090; --line-soft: #2E3A4C; --primary: #A9C1F2; --primary-hover: #C5D5F6; --primary-tint: #1A2843; --on-primary: #0B0F17;
  --accent: #A9C1F2; --accent-tint: #1A2843; --focus: #72C97A;
  --success: #6CCB94; --success-tint: #13291D; --warning: #E9B65A; --warning-tint: #2F2410; --danger: #F29B91; --danger-tint: #36191A; --info: #8FB5F6; --info-tint: #16264A;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 16px 48px rgba(0, 0, 0, .55); --bar: #243042;
  --a1: #1C2A45; --a1i: #B9CCF5; --a2: #15302E; --a2i: #9ED9D3; --a3: #2A2036; --a3i: #D4BCEB; --a4: #33261A; --a4i: #EBC9A6; --a5: #1C2C17; --a5i: #B5DBA3; --a6: #222A36; --a6i: #C3CCD9;
}

/* Base */
body { font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
svg.i { width: 16px; height: 16px; stroke-width: 1.5; }
svg.i.l { width: 20px; height: 20px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
b, strong { font-weight: 600; }

/* Header: one row with the app's sections */
.top { height: 56px; gap: 12px; padding-inline: 16px; }
.logo { height: 48px; padding: 4px 7px; }
.logo img { height: 40px; }
.vsep { height: 24px; }
.switch-btn { height: 36px; font-size: 15px; font-weight: 600; gap: 8px; }
.tile { width: 26px; height: 26px; border-radius: 7px; box-shadow: none; }
.tile svg.i { width: 15px; height: 15px; }
.tile.sm { width: 22px; height: 22px; border-radius: 6px; }
.sect { display: flex; align-items: stretch; align-self: stretch; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sect::-webkit-scrollbar { display: none; }
.top > .sect { flex: 0 1 auto; }
.sect .sect-more { flex: 0 0 auto; width: 34px; padding: 0; display: grid; place-items: center; }
.sect .sect-more svg.i { width: 16px; height: 16px; }
.sect-pop { top: 52px; width: 260px; }
.sect button { border: 0; background: none; padding: 0 10px; font: 500 14px var(--font); color: var(--muted); border-bottom: 2px solid transparent; border-top: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.sect button[aria-current="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--primary); }
.search { flex: 0 0 240px; max-width: 240px; height: 34px; border-radius: 8px; border-color: var(--line); background: var(--surface-2); margin-left: auto; }
.top > .search { flex-shrink: 0; }
kbd { font: 600 12px var(--font); }
.top-right { margin-left: 0; gap: 6px; }
.ask { height: 34px; border-radius: 8px; padding: 0 10px 0 5px; font-size: 14px; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; }
.me { border-left: 0; margin-left: 2px; padding: 0; height: 34px; }
.me-name { display: none; }
.badge { min-width: 18px; height: 18px; line-height: 18px; font-size: 13px; top: 1px; right: 0; padding: 0 4px; }
.demo { height: 24px; font-size: 13px; padding: 0 8px; }
.demo svg.i { width: 13px; height: 13px; }
.menu-btn { display: none !important; }

/* Frame: no sidebar; page tabs drawn by the core over each screen */
.frame, .frame.no-nav { grid-template-columns: minmax(0, 1fr); min-height: calc(100dvh - 56px); }
.nav, .nav-scrim { display: none !important; }
.main { padding: 0 24px 96px; }
.pbar-wrap { max-width: 1360px; margin: 0 auto 12px; border-bottom: 1px solid var(--line); }
.ptabs { display: flex; align-items: stretch; gap: 20px; height: 40px; overflow-x: auto; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs button { border: 0; background: none; padding: 0; font: 500 14px var(--font); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; }
.ptabs button[aria-current="true"] { color: var(--ink); font-weight: 600; border-color: var(--primary); }
.main > .wrap:first-child, .main > .narrow:first-child { margin-top: 16px; }
.wrap { max-width: 1360px; }
.bnav { display: none; }

/* Page head: one line */
.page-head { margin-bottom: 12px; gap: 8px 16px; align-items: center; min-height: 40px; }
.crumbs { font-size: 13px; margin-bottom: 4px; }

/* Buttons and controls */
.btn { height: 34px; padding: 0 12px; border-radius: 8px; border-color: var(--line-soft); font: 600 14px var(--font); gap: 6px; }
.btn.sm { height: 30px; padding: 0 10px; border-radius: 7px; font-size: 13px; }
.btn.wide { height: 38px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.ghost { color: var(--primary); }
.link { font-weight: 600; }
.input, .radios label { height: 38px; border-radius: 8px; border-color: var(--line-strong); }
textarea.ta { border-radius: 8px; border-color: var(--line-strong); font-size: 14px; }
.input input, .input select { font-size: 14px; }
.input:focus-within, .composer:focus-within { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.field > label, .field > .lab { font-size: 13px; font-weight: 600; }
.field .hint, .req, .by-hr, .err { font-size: 13px; }
.form-grid { gap: 14px 12px; }

/* Cards and sections */
.panel, .card { border-radius: 12px; border-color: var(--line); box-shadow: var(--shadow-1); }
.sec-head { min-height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.sec-head h2 { font-size: 15px; font-weight: 600; }
.sec-head .count, h2 .count { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 20px; }
.chipf { height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-soft); background: var(--surface); font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chipf.on, .chipf[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-tint); color: var(--primary); font-weight: 600; }
.chipf svg.i { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) { .chipf:hover { background: var(--surface-2); } }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; background: var(--sunken); }
.seg button { border: 0; background: none; height: 28px; padding: 0 10px; border-radius: 6px; font: inherit; font-weight: 500; font-size: 13px; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }
.tsearch { display: flex; align-items: center; gap: 6px; height: 30px; width: 200px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); }
.tsearch input { border: 0; outline: 0; background: none; width: 100%; font: inherit; font-size: 13px; color: var(--ink); }
@media (max-width: 720px) { .tsearch { width: 100%; order: 9; } }
.s-body h3 { font-size: 15px; font-weight: 600; }
.mono { font-size: 13px; }
/* Type scale 22/18/15/14/13 for the remaining core pieces */
.avatar.sm { font-size: 13px; }
#main small, .sheet small, .dialog small, .pop small, .pop .who span, .msg-b .who, .b-note, .kcard .kmeta, .cal .ev, .thread .day-sep, .phone .p-tabs button { font-size: 13px; }
.signed-out #main h1 { font-size: 22px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.file-pick[data-bad="true"] { border-color: var(--danger); }
h3.gh { font-size: 15px; font-weight: 600; color: var(--ink); margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
h3.gh:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.count { font-size: 13px; font-weight: 600; background: var(--sunken); color: var(--ink-2); padding: 0 7px; min-width: 20px; text-align: center; }
.count.z { background: none; color: var(--muted); font-weight: 500; }
.empty, .empty.box { font-size: 14px; padding: 12px 16px; }
.banner { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.empty-state { padding: 32px 16px; gap: 8px; }
.empty-state .tile { width: 40px; height: 40px; border-radius: 50%; background: var(--sunken); color: var(--muted); }
.empty-state h2 { font-size: 15px; font-weight: 600; }

/* Home and work rows */
.home-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; }
.col { gap: 12px; }
.task { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; padding: 10px 16px; align-items: center; }
.task .tile { margin-top: 0; }
.task-title { font-size: 15px; font-weight: 600; }
.task-meta { font-size: 13px; color: var(--muted); }
.task-foot { font-size: 13px; margin-top: 2px; }
.mini, .notif { padding: 10px 16px; }
.mini p, .notif small { font-size: 13px; }
.two { gap: 12px; }
.stat { padding: 8px 16px 14px; }
.stat .fig { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.stat .fig small { font-size: 13px; font-weight: 500; color: var(--muted); }
.stat .per { font-size: 13px; color: var(--muted); }
.meter { height: 6px; background: var(--sunken); }
.legend { font-size: 13px; }

/* Figure strip (PX.figs) and stat line */
.figs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.figs > div { padding: 8px 16px; border-left: 1px solid var(--line); display: grid; gap: 2px; min-width: 0; }
.figs > div:first-child { border-left: 0; }
.figs .lab { font-size: 13px; color: var(--muted); }
.figs .v { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.figs .fig { font-size: 18px; font-weight: 700; line-height: 1.25; }
.figs small { font-size: 13px; color: var(--muted); }
.stat-line dt { font-size: 13px; font-weight: 500; }
.stat-line dd { font-size: 18px; font-weight: 700; }
.stat-line > div { padding: 10px 16px; }

/* Chips: pills with an icon and a word */
.chip { border-radius: 99px; height: 22px; padding: 0 8px 0 7px; font-size: 13px; font-weight: 600; gap: 4px; }
.chip svg.i { width: 12px; height: 12px; stroke-width: 2; }
.c-wait { background: var(--warning-tint); color: var(--warning); } .c-ok { background: var(--success-tint); color: var(--success); } .c-bad { background: var(--danger-tint); color: var(--danger); } .c-off { background: var(--sunken); color: var(--ink-2); } .c-draft { background: var(--primary-tint); color: var(--primary); }

/* View tabs, toolbars and tables */
.tabs { gap: 2px; padding: 3px; border-radius: 8px; background: var(--sunken); border-bottom: 0; width: max-content; max-width: 100%; margin-bottom: 12px; }
.tabs button { padding: 0 10px; height: 28px; border-radius: 6px; border: 0; margin: 0; font: 500 13px var(--font); color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }
.toolbar { padding: 8px 12px; font-size: 13px; gap: 8px; }
table { font-size: 14px; }
th { height: 34px; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
td { height: 48px; padding: 0 12px; }
th:first-child, td:first-child { padding-left: 16px; } th:last-child, td:last-child { padding-right: 16px; }
.table-foot { font-size: 13px; padding: 10px 16px; }
.person small { font-size: 13px; }

/* Records (PX.recordHead) and facts */
.rhead { padding: 12px 16px 0; display: grid; gap: 12px; margin-bottom: 12px; }
.rline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rline h1 { margin: 0; }
.rline .acts { margin-left: auto; }
.rline .back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 500; }
.rline .sepbar, .rline .ref { color: var(--muted); font-size: 13px; }
.rline .rsub { color: var(--ink-2); }
.rbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 16px; align-items: center; }
.rbody.one { grid-template-columns: minmax(0, 1fr); }
.rbody .figs { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.track { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 4px; }
.track div { display: grid; gap: 4px; min-width: 0; }
.track i { display: block; height: 4px; border-radius: 99px; background: var(--bar); }
.track .d i, .track .n i { background: var(--primary); }
.track span { font-size: 13px; line-height: 1.2; color: var(--muted); }
.track .n span:first-of-type { color: var(--primary); font-weight: 600; }
.rtabs { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); margin: 0 -16px; padding: 0 16px; }
.rtabs button { border: 0; background: none; padding: 10px 0 8px; font: 500 14px var(--font); color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.rtabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-color: var(--primary); }
.rec-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; }
.facts div { padding: 10px 16px; }
.facts dt { font-size: 13px; font-weight: 500; color: var(--muted); }
.facts dd { font-size: 14px; font-weight: 600; }
.hist { padding: 12px 16px; }
.hist li { padding-bottom: 12px; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
.hist .tile { width: 24px; height: 24px; background: var(--primary-tint); color: var(--primary); }
.hist li:not(:last-child)::before { left: 11px; top: 26px; width: 1px; background: var(--line-soft); }
.hist small { font-size: 13px; }

/* Avatars: six calm tints keyed to the person */
.avatar { width: 32px; height: 32px; font-size: 13px; font-weight: 600; background: var(--a6); color: var(--a6i); }
.avatar.sm { width: 24px; height: 24px; font-size: 13px; }
.k1 { background: var(--a1); color: var(--a1i); } .k2 { background: var(--a2); color: var(--a2i); } .k3 { background: var(--a3); color: var(--a3i); } .k4 { background: var(--a4); color: var(--a4i); } .k5 { background: var(--a5); color: var(--a5i); } .k6 { background: var(--a6); color: var(--a6i); }

/* Overlays */
.sheet, .binar { top: 0; border-left: 0; box-shadow: var(--shadow-2); }
.scrim { inset: 0; }
.s-head, .b-head { min-height: 56px; padding: 0 16px; }
.s-head h2, .b-head h2 { font-size: 18px; font-weight: 700; }
.s-head small { font-size: 13px; }
.s-body { padding: 16px; gap: 16px; }
.s-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.dialog, .pop { border-radius: 12px; }
.pop { top: 44px; }
.pop .row-a[aria-current="true"] { background: var(--primary-tint); color: var(--primary); }
.card { border-radius: 12px; }

/* Boards, calendars, files */
.board-col { border-radius: 12px; background: var(--surface-2); }
.kcard { border-radius: 10px; box-shadow: var(--shadow-1); }
.file-row, .checks li { padding: 10px 16px; }
.file-row small, .checks small, .cal .dow, .cal .day .dn { font-size: 13px; }

/* Dock (presentation control, not part of semaiX) keeps its own type */
.dock, .dock button, .dock select, .dock label { font-family: "Segoe UI", system-ui, sans-serif; }

@media (hover: hover) and (pointer: fine) {
  .sect button:hover, .ptabs button:hover, .rtabs button:hover { color: var(--ink); }
  .btn.primary:not([disabled]):hover { background: var(--primary-hover); border-color: var(--primary-hover); }
}
@media (max-width: 1280px) { .search { flex-basis: 180px; max-width: 180px; } .search kbd { display: none; } }
@media (max-width: 1100px) {
  .home-grid, .rec-grid, .rbody { grid-template-columns: minmax(0, 1fr); }
  .search { flex: 0 0 34px; width: 34px; padding: 0; justify-content: center; border: 0; background: none; }
  .search span { display: none; }
  .ask > span:last-child { display: none; } .ask { padding: 0 5px; }
}
@media (max-width: 720px) {
  :root { --header-h: 56px; }
  .top { height: 56px; min-height: 56px; flex-wrap: nowrap; padding: 0 8px; gap: 4px; }
  .brk, .demo.ph, .sect, .switch-btn .name, .top-right .demo, .vsep { display: none !important; }
  .logo { height: 48px; padding: 4px 6px; } .logo img { height: 40px; }
  .search { order: 0; margin-left: auto; }
  .top-right { order: 0; gap: 2px; }
  .main { padding: 0 12px 140px; }
  .bnav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .bnav[hidden] { display: none; }
  .bnav button { border: 0; background: none; display: grid; justify-items: center; gap: 2px; padding: 4px 2px; font: 500 13px var(--font); color: var(--muted); cursor: pointer; min-width: 0; }
  .bnav button span { max-width: 100%; text-align: center; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .bnav button[aria-current="true"] { color: var(--primary); font-weight: 600; }
  .dock { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .figs { grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .figs > div { scroll-snap-align: start; }
  .task { grid-template-columns: 26px minmax(0, 1fr); } .task .acts { grid-column: 2; }
  .track span { white-space: normal; overflow: visible; line-height: 1.25; }
  .rtabs { margin: 0 -16px; }
}
.banner .grow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.banner .grow > * { margin: 0; }
.banner { padding: 8px 12px; align-items: center; }
#main .avatar.sm, .sheet .avatar.sm, .dialog .avatar.sm, #overlay .avatar.sm { font-size: 13px; }
.board-col > header { font-size: 15px; font-weight: 600; }
.diff { font-size: 14px; }
select.chipf { max-width: 160px; text-overflow: ellipsis; padding-right: 24px; }
@media (max-width: 720px) { .file-row b { white-space: normal; overflow: visible; text-overflow: clip; } }
@media (max-width: 720px) { input, select, textarea, .input input, .input select, textarea.ta, .tsearch input { font-size: 16px; } }
@media (max-width: 720px) { .switch-btn > svg.i, .switch-btn > .chev { display: none; } .switch-btn { padding: 0 4px; gap: 0; } }
@media (max-width: 720px) { .bnav:has(> button:nth-child(6)) { grid-auto-columns: 22%; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; } .bnav > button { scroll-snap-align: start; } }
.search kbd { font-size: 13px; }
/* Grid tracks never grow past their column: content scrolls inside .table-wrap instead (UXR-055, 768 and 1024 px) */
.col { grid-template-columns: minmax(0, 1fr); } .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .col > *, .two > *, .rec-grid > *, .home-grid > * { min-width: 0; }
@media (max-width: 720px) { .two { grid-template-columns: minmax(0, 1fr); } }
.phone-stage { grid-template-columns: minmax(0, 1fr); }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; }
/* Screen transition (option a): the work area fades in while rising 6 px; the tab underline glides */
/* macOS feel (a and b): grow from the clicked spot with a soft spring; the record shrinks toward its row when going back */
:root { --spring: cubic-bezier(.3, 1.25, .5, 1); --spring: linear(0, .045 2.4%, .18 5.6%, .63 15%, .86 22.5%, .97 26%, 1.03 33%, 1.04 39%, 1.02 50%, 1.004 63%, 1); }
.enter { animation: enter .3s var(--spring) backwards; }
@keyframes enter { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.enter-soft { animation: fade .2s cubic-bezier(.23, 1, .32, 1) backwards; }
.leave { position: fixed; z-index: 20; pointer-events: none; }
.leave.go { animation: leave .24s cubic-bezier(.4, 0, 1, 1) forwards; }
@keyframes leave { to { opacity: 0; transform: scale(.94); } }
.sheet, .binar { animation: sheetin .34s var(--spring) backwards; }
@keyframes sheetin { from { transform: translateX(28px); opacity: 0; } }
.dialog { animation: dlgin .3s var(--spring) backwards; }
@keyframes dlgin { from { opacity: 0; transform: translate(-50%, -50%) scale(.96); } }
.scrim { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sect, .ptabs { position: relative; }
.glide { position: absolute; bottom: 0; height: 2px; border-radius: 2px; background: var(--primary); transition: left .2s cubic-bezier(.23, 1, .32, 1), width .2s cubic-bezier(.23, 1, .32, 1); pointer-events: none; }
.gliding button[aria-current="true"] { border-bottom-color: transparent !important; }
@media (prefers-reduced-motion: reduce) { .enter, .enter-soft, .sheet, .binar, .dialog { animation: none; } .glide, .leave { display: none; } }
.ptabs .glide { bottom: -1px; }
#overlay.still .sheet, #overlay.still .binar, #overlay.still .dialog, #overlay.still .scrim { animation: none; }
/* Feel and feedback (Fajar, 15 Oct 2026, a): every tappable thing answers a press; rows show where the pointer is */
html { -webkit-tap-highlight-color: transparent; }
.chipf, .seg button, .ptabs button, .sect button, .rtabs button, .tabs button, .row-a, .mini.go, .task, .icon-btn, .switch-btn, .bnav button { transition: transform .12s cubic-bezier(.23, 1, .32, 1), background-color .12s, color .12s; }
.chipf:active, .seg button:active, .icon-btn:active, .switch-btn:active, .bnav button:active { transform: scale(.96); }
.ptabs button:active, .sect button:active, .rtabs button:active, .tabs button:active { color: var(--primary); }
.row-a:active, .mini.go:active, .task:active { background: var(--primary-tint); }
tbody tr.go:active td, tbody tr[data-act]:active td, tbody tr[tabindex]:active td { background: var(--primary-tint); }
a:active, .link:active { opacity: .7; }
@media (hover: hover) and (pointer: fine) {
  tbody tr:hover td { background: var(--surface-2); }
  tbody tr.go:hover td, tbody tr[data-act]:hover td, tbody tr[tabindex]:hover td { background: var(--primary-tint); cursor: pointer; }
}
/* Notices: spring in, glide out, a thin line shows how long the notice stays */
.toast { animation: toastin .34s var(--spring) backwards; overflow: hidden; }
.toast.out { animation: toastout .18s cubic-bezier(.4, 0, 1, 1) forwards; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 14px) scale(.98); } }
@keyframes toastout { to { opacity: 0; transform: translate(-50%, 8px); } }
.toast-time { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--bg); opacity: .35; transform-origin: left; animation: toasttime 4.2s linear forwards; }
@keyframes toasttime { to { transform: scaleX(0); } }
/* Phone tables stack into rows: title on top, the other columns as label and value */
@media (max-width: 720px) {
  .table-wrap:has(> table.stackable) { overflow: visible; }
  table.stackable thead { display: none; }
  table.stackable, table.stackable tbody { display: block; width: 100%; }
  table.stackable tr { display: flex; flex-direction: column; width: 100%; }
  table.stackable tr { padding: 10px 14px; border-top: 1px solid var(--line); }
  table.stackable tr:first-child { border-top: 0; }
  table.stackable td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; height: auto; min-height: 0; padding: 2px 0; border: 0; text-align: right; white-space: normal; }
  table.stackable td::before { content: attr(data-label); flex: 0 0 auto; max-width: 45%; text-align: left; color: var(--muted); font-size: 13px; font-weight: 400; }
  table.stackable td.tcell { order: -1; display: block; text-align: left; padding-bottom: 4px; }
  table.stackable td.tcell::before { content: none; }
  table.stackable td.tcell b, table.stackable td.tcell strong { font-weight: 600; }
  table.stackable td:empty { display: none; }
}
@media (prefers-reduced-motion: reduce) { .toast, .toast.out, .toast-time { animation: none; } }
/* Phone record header (Fajar, 15 Oct 2026, a): slimmer figures; the stage line is one swipeable row, and only the current stage keeps its note */
@media (max-width: 720px) {
  .rbody .figs > div { padding: 6px 12px; }
  .rhead .track { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(84px, 1fr); overflow-x: auto; scrollbar-width: none; }
  .rhead .track::-webkit-scrollbar { display: none; }
  .rhead .track span { white-space: nowrap; overflow-wrap: normal; }
  .rhead .track > div:not(.n) > span:last-child { display: none; }
}

/* Finance engine stand-in screens (apps/odoo*.js), Builder O, round 5 (Fajar's 1a): the look of Odoo 19 Community, so a prospect sees
   Odoo's own screen: the purple top bar with the app menu and dropdowns, the control panel (New, breadcrumb, search with filters, pager),
   the list view, the form as a white sheet on the grey ground with the arrow status bar, and the chatter beside a record.
   Values: the --oe-* tokens in core.css (Odoo stand-in group); sources in the header of apps/odoo.js. */
.oe { display: flex; flex-direction: column; min-height: 100%; margin: 16px 0; background: var(--oe-ground); color: var(--oe-ink); font: 400 14px/1.5 var(--oe-font); border: 1px solid var(--oe-line); border-radius: 6px; overflow: hidden; box-shadow: var(--oe-shadow); }
.oe :is(h1, h2, h3) { font-family: var(--oe-font); color: var(--oe-head); }
.oe svg.i { width: 15px; height: 15px; }
/* Top bar: 46px, brand colour, white entries at .9, hover on black at .08, dropdowns */
.oe-bar { display: flex; align-items: center; gap: 0; min-height: 46px; padding: 0 8px 0 0; background: var(--oe-bar); color: var(--oe-bar-ink); border-bottom: 1px solid var(--oe-bar-line); flex-wrap: wrap; position: relative; z-index: 3; }
.oe-apps { display: inline-grid; place-items: center; width: 46px; height: 46px; border: 0; background: none; color: var(--oe-bar-ink); cursor: pointer; }
.oe-apps:hover, .oe-dd:hover, .oe-grp.open .oe-dd { background: var(--oe-bar-hover); color: var(--oe-on-brand); }
.oe-apps-i { width: 18px; height: 18px; fill: currentColor; }
.oe-app { font-size: 1.2em; padding: 0 .63em 0 4px; white-space: nowrap; color: var(--oe-on-brand); }
.oe-menu { display: flex; flex-wrap: wrap; flex: 1; min-width: 0; }
.oe-grp { position: relative; }
.oe-dd { height: 46px; padding: 0 .63em; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; }
.oe-dd[data-here] { color: var(--oe-on-brand); }
.oe-drop { display: none; position: absolute; left: 0; top: 100%; min-width: 220px; padding: 4px 0; background: var(--oe-sheet); border: 1px solid var(--oe-line); border-radius: 4px; box-shadow: var(--oe-shadow); z-index: 5; }
.oe-grp.open .oe-drop { display: block; }
.oe-m { display: block; width: 100%; text-align: left; padding: 3px 20px; border: 0; background: none; color: var(--oe-ink); font: inherit; line-height: 1.9; cursor: pointer; white-space: nowrap; }
.oe-m:hover, .oe-m:focus-visible { background: var(--oe-btn2); outline: 0; }
.oe-m[aria-current="page"] { font-weight: 700; }
.oe-bar .demo { margin-left: auto; color: var(--oe-bar-ink); border-color: var(--oe-bar-ink); }
/* Control panel: New and breadcrumb at the left, search in the middle, pager at the right */
.oe-cp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .6fr); align-items: center; gap: 8px 16px; padding: 8px 16px; background: var(--oe-sheet); border-bottom: 1px solid var(--oe-line); }
.oe-cp-l { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-width: 0; }
.oe-cp-r { justify-self: end; }
.oe-crumbs { display: flex; align-items: center; gap: 0; flex-wrap: wrap; min-width: 0; font-size: 18px; line-height: 1.3; }
.oe-crumbs h1, .oe-crt { margin: 0; font-size: 18px; font-weight: 400; color: var(--oe-ink); }
.oe-cr { border: 0; background: none; padding: 0; font: inherit; color: var(--oe-link); cursor: pointer; }
.oe-cr:hover { text-decoration: underline; }
.oe-sl { padding: 0 .5rem; color: var(--oe-muted); }
.oe-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.oe-btns:empty { display: none; }
.oe-pager { color: var(--oe-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.oe-search { position: relative; min-width: 0; }
.oe-sbox { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 32px; padding: 2px 0 2px 8px; background: var(--oe-sheet); border: 1px solid var(--oe-line-strong); border-radius: 4px; }
.oe-sbox:focus-within { border-color: var(--oe-brand); }
.oe-sic { display: inline-flex; color: var(--oe-muted); }
.oe-sbox input { flex: 1; min-width: 80px; height: 26px; border: 0; outline: 0; background: none; color: var(--oe-ink); font: inherit; }
.oe-sbox input::placeholder { color: var(--oe-muted); }
.oe-facet { display: inline-flex; align-items: stretch; max-width: 100%; border-radius: 3px; overflow: hidden; background: var(--oe-btn2); font-size: 13px; line-height: 22px; }
.oe-facet > svg.i { width: 22px; height: 22px; padding: 4px; background: var(--oe-brand); color: var(--oe-on-brand); }
.oe-facet > span { padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oe-x { display: inline-grid; place-items: center; width: 20px; border: 0; background: none; color: var(--oe-muted); cursor: pointer; }
.oe-x:hover { color: var(--oe-ink); }
.oe-x svg.i { width: 13px; height: 13px; }
.oe-stog { align-self: stretch; margin-left: auto; width: 32px; border: 0; border-left: 1px solid var(--oe-line-strong); background: none; color: var(--oe-ink); cursor: pointer; }
.oe-stog:hover, .oe-stog[aria-expanded="true"] { background: var(--oe-btn2); }
.oe-sdrop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 4; min-width: 240px; padding: 8px 0; background: var(--oe-sheet); border: 1px solid var(--oe-line); border-radius: 4px; box-shadow: var(--oe-shadow); }
.oe-sdrop h3 { display: flex; align-items: center; gap: 6px; margin: 0; padding: 4px 20px 6px; font-size: 14px; font-weight: 700; }
.oe-sdrop h3 svg.i { color: var(--oe-brand); }
.oe-sdrop button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 3px 20px; border: 0; background: none; color: var(--oe-ink); font: inherit; line-height: 1.9; text-align: left; cursor: pointer; }
.oe-sdrop button:hover { background: var(--oe-btn2); }
.oe-sdrop button svg.i { color: var(--oe-brand); }
.oe-ck { display: inline-block; width: 15px; }
/* Odoo's buttons: 4px radius, 5px by 10px, primary on the brand colour, secondary on grey */
.oe .btn { height: auto; min-height: 32px; padding: 5px 10px; border-radius: 4px; border: 1px solid var(--oe-btn2); background: var(--oe-btn2); color: var(--oe-btn2-ink); font: 500 14px/1.5 var(--oe-font); }
.oe .btn:hover:not([disabled]) { background: var(--oe-btn2-hover); border-color: var(--oe-btn2-hover); }
.oe .btn.primary { background: var(--oe-brand); border-color: var(--oe-brand); color: var(--oe-on-brand); }
.oe .btn.primary:hover:not([disabled]) { background: var(--oe-brand-hover); border-color: var(--oe-brand-hover); }
.oe .btn:active { transform: none; }
.oe .link { color: var(--oe-link); font-weight: 400; }
/* Alerts inside the engine (refusals and notes), in Odoo's theme colours */
.oe .banner { margin: 0; border-radius: 4px; padding: 8px 16px; background: var(--oe-info-tint); color: var(--oe-ink); border: 1px solid color-mix(in srgb, var(--oe-info) 30%, transparent); }
.oe .banner > svg.i { color: var(--oe-info); }
.oe .banner.bad { background: var(--oe-danger-tint); border-color: color-mix(in srgb, var(--oe-danger) 30%, transparent); }
.oe .banner.bad > svg.i { color: var(--oe-danger); }
.oe .banner.warn { background: var(--oe-warn-tint); border-color: color-mix(in srgb, var(--oe-warn) 30%, transparent); }
.oe .banner.warn > svg.i { color: var(--oe-warn); }
.oe-msg { margin: 12px 16px 0; }
/* List view: on the white view background, compact rows, bold totals, hover on black at .055 */
.oe-body { display: flex; flex-direction: column; gap: 16px; padding: 0 0 16px; background: var(--oe-sheet); flex: 1; }
.oe-body > h2 { margin: 8px 16px -8px; font-size: 16px; font-weight: 500; }
.oe-body > .oe-form { margin: 16px 16px 0; padding: 16px 24px; border: 1px solid var(--oe-line); border-radius: 4px; }
.oe-body > .oe-empty, .oe-body > p { margin: 0 16px; }
.oe .tbl-wrap { border: 0; border-radius: 0; box-shadow: none; background: var(--oe-sheet); }
.oe-list { width: 100%; font-size: 14px; }
.oe .oe-list th { position: static; height: auto; padding: 8px 12px; font-size: 14px; font-weight: 700; color: var(--oe-ink); background: var(--oe-sheet); border-bottom: 1px solid var(--oe-line-strong); white-space: nowrap; }
.oe .oe-list td { height: auto; padding: 6px 12px; background: var(--oe-sheet); color: var(--oe-ink); border-bottom: 1px solid var(--oe-line); }
.oe .oe-list :is(th, td):first-child { position: static; padding-left: 16px; }
.oe .oe-list :is(th, td):last-child { padding-right: 16px; }
.oe .oe-list tbody tr:last-child td { border-bottom: 1px solid var(--oe-line); }
.oe .oe-list tbody tr:hover td, .oe .oe-list tbody tr.go:hover td, .oe .oe-list tbody tr.go:active td { background: var(--oe-sheet); box-shadow: inset 0 0 0 999px var(--oe-row-hover); }
.oe .oe-list tr.oe-tot td { font-weight: 700; border-top: 1px solid var(--oe-line-strong); }
.oe-list .num { text-align: right; font-variant-numeric: tabular-nums; }
.oe-empty { color: var(--oe-muted); }
/* Form view: status bar row, then the white sheet on the grey ground; the chatter beside it when there is room */
.oe-rec { flex: 1; container-type: inline-size; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
.oe-formcol { min-width: 0; display: flex; flex-direction: column; }
.oe-sbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 8px 16px; border-bottom: 1px solid var(--oe-line); background: var(--oe-ground); }
.oe-sheet { width: calc(100% - 32px); max-width: 1140px; margin: 16px auto; padding: 24px 32px 32px; background: var(--oe-sheet); border: 1px solid var(--oe-line); box-shadow: var(--oe-shadow); display: flex; flex-direction: column; gap: 20px; }
.oe-name { margin: 0; font-size: 26px; font-weight: 500; line-height: 1.25; }
.oe-sheet h2 { margin: 0; font-size: 16px; font-weight: 500; }
.oe-sheet .tbl-wrap { border-top: 0; }
.oe-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 48px; margin: 0; }
.oe-form > div { display: grid; grid-template-columns: minmax(120px, 40%) minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 2px 0; }
.oe-form dt { font-weight: 700; color: var(--oe-ink); }
.oe-form dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.oe-form dd .btn { margin-left: 4px; }
.oe .input { height: 30px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--oe-line-strong); border-radius: 0; background: transparent; box-shadow: none; }
.oe .input:focus-within { border-bottom-color: var(--oe-brand); box-shadow: none; outline: 0; }
.oe .input input, .oe .input select { font: inherit; color: var(--oe-ink); }
.oe .input select option { background: var(--oe-sheet); color: var(--oe-ink); }
.oe-form dd .input { display: inline-flex; width: min(100%, 260px); vertical-align: middle; }
/* Status bar: arrow stages cut with a clip-path, 1em arrows, a ring in the view colour, the current stage on the active colour */
.oe-status { display: flex; list-style: none; margin: 0 0 0 auto; padding: 0; font-size: 14px; }
.oe-status li { position: relative; margin-left: calc(-1em + 2px); padding: 1px; background: var(--oe-sheet); clip-path: polygon(0 0, calc(100% - 1em) 0, 100% 50%, calc(100% - 1em) 100%, 0 100%, 1em 50%); }
.oe-status li > span { display: block; padding: 5px 1.4em 5px 1.7em; background: var(--oe-btn2); color: var(--oe-muted); white-space: nowrap; clip-path: inherit; }
.oe-status li:first-child { margin-left: 0; clip-path: polygon(0 0, calc(100% - 1em) 0, 100% 50%, calc(100% - 1em) 100%, 0 100%); }
.oe-status li:first-child > span { padding-left: 1em; border-radius: 2px 0 0 2px; }
.oe-status li:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 1em 50%); }
.oe-status li:last-child > span { padding-right: 1em; }
.oe-status li:only-child { clip-path: none; }
.oe-status li[aria-current="step"] { background: var(--oe-cur-line); z-index: 1; }
.oe-status li[aria-current="step"] > span { background: var(--oe-cur); color: var(--oe-cur-ink); }
/* Chatter: the record's history, newest first, beside the sheet from 1100px of room, under it below that */
.oe-chatter { min-width: 0; padding: 12px 16px 24px; background: var(--oe-sheet); border-top: 1px solid var(--oe-line); }
.oe-chatter ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.oe-day { display: flex; align-items: center; gap: 12px; color: var(--oe-muted); font-size: 13px; }
.oe-day::before, .oe-day::after { content: ""; flex: 1; border-top: 1px solid var(--oe-line); }
.oe-msg-l { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: start; }
.oe-av { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 4px; background: var(--oe-cur); color: var(--oe-cur-ink); font-size: 13px; font-weight: 700; }
.oe-msg-l b { font-weight: 700; }
.oe-msg-l p { margin: 0; }
.oe-track span { color: var(--oe-muted); }
.oe-track b { color: var(--oe-link); }
@container (min-width: 1100px) {
  .oe-rec.has-chat { grid-template-columns: minmax(0, 1fr) 360px; }
  .oe-rec.has-chat .oe-chatter { border-top: 0; border-left: 1px solid var(--oe-line); }
}
.oe .panel { background: var(--oe-sheet); border: 1px solid var(--oe-line); border-radius: 4px; box-shadow: none; margin: 0 16px; }
.oe .sec-head { border-color: var(--oe-line); }
.oe-xml { margin: 0; padding: 12px 16px; overflow: auto; font: 13px/1.5 var(--oe-mono); color: var(--oe-ink); background: var(--oe-ground); }
@media (max-width: 720px) {
  .oe { margin: 8px 0; }
  .oe-app { font-size: 1.05em; }
  .oe-cp { grid-template-columns: minmax(0, 1fr); }
  .oe-cp-r { justify-self: start; }
  .oe-sbar { flex-direction: column; align-items: stretch; }
  .oe-status { margin: 0; overflow-x: auto; }
  .oe-sheet { width: 100%; margin: 0; padding: 16px; border-left: 0; border-right: 0; }
  .oe-form, .oe-form > div { grid-template-columns: minmax(0, 1fr); }
  .oe-form > div { gap: 0; }
}
/* Chat and Calendar sit in the header from 721 px; on a phone they move into the person menu (Design Brief: phone header row). */
#mePop .me-phone { display: none; }
@media (max-width: 720px) { #chatBtn, #calBtn { display: none; } #mePop .me-phone { display: flex; } }
@media (max-width: 380px) { .top { gap: 2px; padding-left: 6px; padding-right: 6px; } .top .top-right { gap: 2px; } }
/* Builder W1, round 5 (UXR-056, work first): page heads on one line (subtitle beside the title, view tabs and search among the actions),
   sign-in panels from the top, and a tighter record header, so the work starts near 250 px at 1440 by 900 */
.ph-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.ph-line .sub { margin: 0; }
.page-head .tabs, .toolbar .tabs { margin-bottom: 0; }
.page-head .acts > .input { width: 280px; }
.auth { place-items: start center; padding-top: 56px; }
@media (min-width: 721px) {
  .rhead { padding-top: 8px; gap: 8px; }
  .rbody .figs > div { padding: 4px 12px; }
  .rtabs button { padding: 7px 0 6px; }
}
@media (max-width: 720px) { .page-head .acts > .input { width: auto; flex: 1 1 100%; } }
/* Builder W2, round 5 (UXR-056, work first): list figures as a strip under the list (.figs.w2b); figures inside a title row (.figs.w2f);
   no double gap under a banner in a column. A record's figures and stage line sit in the record header (decision 1a, 15 Oct 2026). */
.figs.w2b { border-bottom: 0; border-top: 1px solid var(--line); }
.figs.w2f { border: 0; margin-left: auto; grid-auto-columns: max-content; }
.figs.w2f > div { display: flex; align-items: baseline; gap: 6px; padding: 0 14px; }
.figs.w2f > div:last-child { padding-right: 0; }
.figs.w2f .fig { font-size: 15px; }
.rec-grid > .col > .banner, .rec-grid > aside > .banner { margin-bottom: 0; }
@media (max-width: 720px) {
  .figs.w2f { grid-auto-flow: row; grid-auto-columns: auto; margin-left: 0; overflow: visible; width: 100%; }
  .figs.w2f > div { padding: 2px 0; border-left: 0; }
}
