/* ERP Anitime bản mới, round 1. Look and measures of ERP2 as measured on 11/11/2026 (dac-ta/THIET-KE-ERP2-SO-DO-THAT.md).
   No inline style anywhere (strict CSP): every look lives here. Phone rules (≤ 760px) at the end; the sign-in page has its own block.
   The control row and the list (search, table, groups, pager, selection) are in list.css; the company record in record.css. */
@import url("list.css?v=d9d2182bb0c9");
@import url("record.css?v=d9d2182bb0c9");
@import url("units.css?v=d9d2182bb0c9");
@import url("fields.css?v=d9d2182bb0c9");
/* the look of the modules, one file each */
@import url("config.css?v=d9d2182bb0c9");
@import url("discuss.css?v=d9d2182bb0c9");
@import url("desk.css?v=d9d2182bb0c9");
@import url("sales.css?v=d9d2182bb0c9");
@import url("inventory.css?v=d9d2182bb0c9");
@import url("mail.css?v=d9d2182bb0c9");
@import url("attendance.css?v=d9d2182bb0c9");
@import url("work.css?v=d9d2182bb0c9");
@import url("zalo.css?v=d9d2182bb0c9");
@import url("marketing.css?v=d9d2182bb0c9");
@import url("devices.css?v=d9d2182bb0c9");
@import url("files.css?v=d9d2182bb0c9");
@import url("summary.css?v=d9d2182bb0c9");
@import url("archive.css?v=d9d2182bb0c9");
@import url("company-accounts.css?v=d9d2182bb0c9");
@font-face { font-family: Manrope; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/manrope-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --navy: #002d4c; --navy-hover: #16445f; --gold: #cf9b32; --gold-hover: #bc8926; --gold-soft: #f5e7c6; --gold-disabled: #e0c17c; --gold-text: #f0ce83;
  --text: #212529; --head: #000; --muted: rgba(73, 80, 87, .76); --side-text: #52687b; --link-row: #143c55; --section: #495057;
  --panel: #f5f7f9; --work: #f5f7fa; --side: #edf2f6; --strip: #f8f9fa; --line: #dee2e6; --card-line: #d6e0e8; --row-line: #edf1f4;
  --input-line: #d8dadd; --gray-btn: #dee2e6; --hover: #f3f7fa; --changed: #fff4d6;
  --tag-radius: 0; --red: #dc3545; --green: #28a745; --note-bg: #d1ecf1; --note-text: #09414a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; height: 100%; font: 400 14px/1.5 Manrope, Arial, sans-serif; color: var(--text); background: var(--panel); -webkit-font-smoothing: antialiased; }
#app { height: 100%; display: flex; flex-direction: column; }
::selection { background: var(--gold-soft); color: var(--navy); }
h1, h2, h3 { color: var(--head); font-weight: 500; margin: 0; }
p { margin: 0 0 16px; }
a { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.o-navbar :focus-visible { outline-color: var(--gold-text); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.pre { white-space: pre-line; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.error { color: var(--red); margin: 8px 0; } .error:empty { display: none; }
.qr { display: block; background: #fff; padding: 8px; border: 1px solid var(--line); margin-bottom: 16px; }
.recovery-codes { columns: 2; font-family: ui-monospace, monospace; font-size: 16px; padding-left: 1.6rem; }

/* ---------------------------------------------------------------- buttons (33px, 4px corners, weight 500) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 5px 10px; border: 1px solid transparent; border-radius: 4px;
  background: transparent; color: var(--text); font-size: 14px; line-height: 21px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.btn-primary:active { background: var(--gold-soft); border-color: var(--gold); }
.btn-primary:disabled { background: var(--gold-disabled); border-color: var(--gold-disabled); }
.btn-secondary { background: var(--gray-btn); border-color: var(--gray-btn); color: var(--text); }
.btn-secondary:hover { background: #ced4da; border-color: #ced4da; }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-outline:hover .o-icon.back { filter: brightness(0) invert(1); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn:disabled { cursor: default; opacity: .65; }
.btn[aria-busy] { cursor: progress; }
.o-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.o-row-button { padding: 0; border: 0; color: #001e33; }
.o-row-button:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- icons (drawn, no icon font) */
.o-icon { display: inline-block; width: 16px; height: 16px; flex: none; background: center / contain no-repeat; }
.o-icon.search { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='5' fill='none' stroke='%23495057' stroke-width='1.6'/%3E%3Cpath d='M10.2 10.2 15 15' stroke='%23495057' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.o-icon.caret { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23495057' stroke-width='1.6'/%3E%3C/svg%3E"); }
.o-icon.filter { width: 12px; height: 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 3h12L9.5 8.5V13l-3-1.5v-3z' fill='%23495057'/%3E%3C/svg%3E"); }
.o-icon.back { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M14 8H3M7 3.5 2.5 8 7 12.5' fill='none' stroke='%23002d4c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.o-icon.save { width: 18px; height: 18px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 12.5h7.5a3 3 0 0 0 .3-6 4.5 4.5 0 0 0-8.6 1.2A2.4 2.4 0 0 0 4.5 12.5z' fill='none' stroke='%23002d4c' stroke-width='1.3'/%3E%3Cpath d='M8 11V7.2M6.3 8.8 8 7.1l1.7 1.7' fill='none' stroke='%23002d4c' stroke-width='1.3'/%3E%3C/svg%3E"); }
.o-icon.discard { width: 18px; height: 18px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5.5 3.5 2.5 6.5l3 3' fill='none' stroke='%236c757d' stroke-width='1.4'/%3E%3Cpath d='M3 6.5h7a3.3 3.3 0 0 1 0 6.6H7' fill='none' stroke='%236c757d' stroke-width='1.4'/%3E%3C/svg%3E"); }

/* ---------------------------------------------------------------- inputs (ERP2 form inputs: a line under them) */
.o-input { width: 100%; min-width: 0; padding: 1px 0 2px; border: 0; border-bottom: 1px solid var(--input-line); border-radius: 0; background: transparent;
  color: var(--text); line-height: 21px; }
.o-input:hover { border-bottom-color: #adb5bd; }
.o-input:focus { outline: none; border-bottom-color: var(--navy); }
.o-input:disabled { color: var(--text); border-bottom-color: transparent; -webkit-text-fill-color: var(--text); opacity: 1; }
/* a one-line box of a row that is read only or disabled shows as text that wraps (widgets.ts readMirror): a long number is never cut */
.o-ro-text { display: none; padding: 1px 0 2px; border-bottom: 1px solid transparent; line-height: 21px; min-height: 24px; white-space: pre-wrap; overflow-wrap: anywhere; }
.o-input.o-ro:is(:disabled, [readonly]) { display: none; }
.o-input.o-ro:is(:disabled, [readonly]) + .o-ro-text { display: block; }
/* an amount of money (money-field.ts): figures on the right, the currency after the box */
.o-money { display: flex; align-items: baseline; gap: 6px; }
.o-money-input { text-align: right; font-variant-numeric: tabular-nums; }
.o-money-unit { flex: none; color: var(--muted); }
select.o-input:disabled { appearance: none; }
textarea.o-input { resize: vertical; min-height: 63px; border: 1px solid var(--input-line); border-radius: 4px; padding: 4px 8px; }
.o-input.code { letter-spacing: .3em; max-width: 220px; font-size: 18px; }
.o-check { appearance: none; width: 14px; height: 14px; margin: 0; flex: none; border: 1px solid #a3acb4; border-radius: 3.5px; background: #fff center / 12px no-repeat;
  vertical-align: middle; cursor: pointer; }
.o-check:checked { background-color: var(--navy); border-color: var(--navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2 6.6 11 12.5 5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E"); }
.o-check:disabled { cursor: default; opacity: .55; }
.o-radios { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.o-radio { display: inline-flex; align-items: center; gap: 6px; }
.o-radio input { accent-color: var(--navy); margin: 0; }
.password { display: flex; }
.o-value .password .o-input { flex: 1; }
.o-value .eye { display: grid; place-items: center; width: 32px; border: 0; border-bottom: 1px solid var(--input-line); background: none; color: #6c8192; }
.eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.eye[aria-pressed=true] { color: var(--navy); }

/* ---------------------------------------------------------------- top bar (46px, navy, gold line) */
.o-navbar { position: relative; z-index: 30; flex: none; height: 46px; padding: 10px 0; display: flex; align-items: center; justify-content: space-between;
  background: var(--navy); border-bottom: 2px solid var(--gold); color: #fff; }
.o-navbar-left, .o-navbar-tray { display: flex; align-items: center; height: 26px; min-width: 0; }
.o-navbar-apps { display: flex; align-items: center; height: 26px; padding: 0 8px 0 16px; border: 0; background: none; color: #fff; }
.o-apps-icon { width: 16.8px; height: 16.8px; fill: currentColor; }
.o-navbar-app { padding: 0 16px 0 8px; color: var(--gold-text); font-size: 16.8px; font-weight: 400; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-navbar-company { padding: 0 8px; color: rgba(255, 255, 255, .9); line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-navbar-user { display: flex; align-items: center; height: 26px; padding: 0 16px 0 8px; border: 0; background: none; }
/* a narrow screen: the icons of the tray (mail, discussion, the avatar) keep their size; only the company name / unit switch and
   the name of the open app give way, cut with an ellipsis */
.o-navbar-tray > * { flex: none; }
.o-navbar-tray > .o-unit-switch, .o-navbar-tray > .o-navbar-company { flex: 0 1 auto; min-width: 0; }
.o-navbar-apps:hover, .o-navbar-apps[aria-expanded=true], .o-navbar-user:hover, .o-navbar-user[aria-expanded=true] { background: var(--navy-hover); }
a.o-navbar-app { text-decoration: none; } a.o-navbar-app[href]:hover { color: #fff; }
/* the menu of the open app (module-menu.ts): first-level entries after the app name, white on navy, the current one marked gold */
.o-navbar-left { flex: 1 1 0; }
/* the tray keeps one width in every app (the Owner, 17/11/2026: pressed Discussion, got Attendance): an app with a long menu used to
   squeeze the name in the tray, so the icons before it stood 56px further right in that app only; now the menu gives way instead
   (cut at the edge, the whole list stays under the app name) and the name is capped once, the same in every app */
.o-navbar-tray { flex: none; }
@media (min-width: 761px) { .o-navbar-tray > .o-unit-switch, .o-navbar-tray > .o-navbar-company { max-width: 28vw; } }
.o-menu-sections { display: flex; align-items: center; height: 26px; min-width: 0; overflow: hidden; }
.o-menu-entry { display: flex; align-items: center; gap: 6px; flex: none; height: 44px; margin: -9px 0; padding: 0 10px;
  border: 0; background: none; color: rgba(255, 255, 255, .9); font: inherit; font-weight: 400; line-height: 26px; text-decoration: none; white-space: nowrap; }
.o-menu-entry:hover, .o-menu-entry[aria-expanded=true] { background: var(--navy-hover); color: #fff; }
.o-menu-entry.active { color: #fff; font-weight: 500; box-shadow: inset 0 -3px 0 var(--gold); }
button.o-menu-entry::after { content: ''; margin-left: 2px; border-top: 4px solid; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.o-menu-drop { top: 44px; left: 0; max-height: calc(100vh - 60px); overflow: auto; }
.o-menu-drop .o-dropdown-item.active { background: var(--gold-soft); font-weight: 500; }
.o-dropdown-header { padding: 8px 16px 4px; color: rgba(73, 80, 87, .76); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.o-menu-child { padding-left: 28px; }
.o-menu-badge { min-width: 16px; padding: 1px 5px; border-radius: var(--tag-radius); background: var(--red); color: #fff; font-size: 10px; font-weight: 600; line-height: 14px; text-align: center; }
.o-dropdown-item .o-menu-badge { margin-left: auto; }
.o-menu-burger { display: none; align-items: center; height: 26px; padding: 0 8px; border: 0; background: none; color: #fff; }
.o-menu-burger:hover, .o-menu-burger[aria-expanded=true] { background: var(--navy-hover); }
/* phone only (see the media block at the end): the screen name, the drawer head and its scrim */
.o-navbar-screen, .o-drawer-head, .o-drawer-scrim { display: none; }

/* ---------------------------------------------------------------- drop-down menus */
.o-dropdown { position: absolute; z-index: 40; min-width: 200px; padding: 8px 0; background: #fff; border: 1px solid rgba(0, 0, 0, .15); border-radius: 4px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .15); color: var(--text); }
.o-dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 16px; border: 0; background: none; color: var(--text);
  text-align: left; text-decoration: none; font-weight: 400; line-height: 21px; white-space: nowrap; }
.o-dropdown-item:hover, .o-dropdown-item:focus-visible { background: #e9ecef; outline: none; }
.o-dropdown-item[aria-checked=true]::before { content: '✓'; width: 12px; margin-left: -14px; }
.o-dropdown-divider { margin: 8px 0; border: 0; border-top: 1px solid var(--line); }
.o-apps-menu { top: 44px; left: 8px; max-height: calc(100vh - 60px); overflow: auto; }
.o-apps-menu img { width: 28px; height: 28px; border-radius: 4px; }
/* ▦: one column of the applications, each with its picture (no round box: Chủ 21/11/2026 "bỏ ô bo tròn"); the screens of a menu show only while
   the box finds by name (o-apps-finding). A phone has no box: the plain list */
.o-apps-find, .o-apps-entries { display: none; }
@media (min-width: 761px) {
  .o-apps-menu { width: 300px; padding: 8px 0; }
  .o-apps-find { display: block; width: calc(100% - 16px); margin: 4px 8px 8px; }
  .o-apps-card { min-width: 0; }
  .o-apps-card .o-app { padding: 6px 16px; }
  .o-apps-finding .o-apps-entries { display: block; padding-bottom: 4px; }
  .o-apps-entry { display: block; padding: 3px 16px 3px 54px; color: rgba(73, 80, 87, .92); font-size: 13px; line-height: 20px; text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .o-apps-entry:hover, .o-apps-entry:focus-visible { background: #e9ecef; color: var(--text); outline: none; }
  .o-apps-entry[hidden], .o-apps-card[hidden] { display: none; }
}
.o-app-noicon { display: inline-block; width: 28px; height: 28px; vertical-align: middle; }
.o-app { padding: 6px 16px; }
.o-user-menu { top: 44px; right: 8px; }
.o-menu-wrap { position: relative; }
.o-menu-wrap .o-dropdown { top: 100%; left: 0; margin-top: 2px; }
.o-dropdown-item.danger { color: var(--red); }
.o-gear { gap: 6px; }
.o-kebab { height: 33px; padding: 0 8px; border: 0; border-radius: 4px; background: none; color: var(--text); font-size: 18px; line-height: 1; }
.o-kebab:hover, .o-kebab[aria-expanded=true] { background: var(--gray-btn); }

/* ---------------------------------------------------------------- main area and the Cấu hình frame */
.o-main { flex: 1; min-height: 0; overflow: auto; outline: none; background: var(--work); }
.o-config { display: grid; grid-template-columns: 245px minmax(0, 1fr); height: 100%; }
.o-config-sidebar { padding: 22px 14px; background: var(--side); border-right: 1px solid var(--card-line); overflow: auto; }
.o-config-fold > summary { list-style: none; }
.o-config-fold > summary::-webkit-details-marker { display: none; }
.o-config-sidebar h2 { font-size: 22px; line-height: 26.4px; margin-bottom: 8px; }
.o-config-sidebar p { color: var(--side-text); margin-bottom: 16px; }
.o-config-module { display: flex; justify-content: flex-start; width: 100%; margin-bottom: 4px; background: #fff; border-color: #fff; text-align: left; white-space: normal; }
.o-config-module:hover { background: #e9ecef; border-color: #e9ecef; }
.o-config-module.selected { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.o-config-main { min-width: 0; overflow: auto; background: var(--work); }
.o-screen { height: 100%; display: flex; flex-direction: column; }
.o-workspace { padding: 24px; }
.o-workspace-crumbs { color: var(--muted); }
.o-workspace h1 { font-size: 26px; line-height: 31.2px; margin-bottom: 14px; }
.o-workspace-lead { margin: 0; }
.o-config-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; align-items: start; }
.o-config-column { display: grid; gap: 20px; min-width: 0; }
.o-config-card { background: #fff; border: 1px solid var(--card-line); border-radius: 8px; padding: 18px; }
.o-config-card h2 { font-size: 17px; line-height: 20.4px; margin-bottom: 14px; }
.o-config-link { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-top: 1px solid var(--row-line); color: var(--link-row); text-decoration: none; }
.o-config-link:hover { background: var(--hover); }
.o-status { padding: 24px; margin: 0; }
.not-built { margin: 16px; max-width: 640px; }

/* ---------------------------------------------------------------- record: status strip, sheet (6px), groups, tabs */
.o-form-sheet-bg { padding-bottom: 24px; }
.o-statusbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 49px; padding: 8px 0; background: var(--strip); }
.o-statusbar-buttons { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 16px; }
.o-statusbar-state { margin-right: 16px; }
.o-sheet { position: relative; margin: 16px max(16px, calc((100% - 1140px) / 2)) 0; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
/* Odoo's ribbon "Đã lưu trữ" across the top right corner of an archived record */
.o-ribbon { position: absolute; top: 0; right: 0; width: 112px; height: 112px; overflow: hidden; pointer-events: none; border-top-right-radius: 6px; }
.o-ribbon > span { position: absolute; top: 26px; right: -38px; width: 160px; padding: 4px 0; background: var(--red); color: #fff; text-align: center;
  font-size: 13px; font-weight: 500; line-height: 19px; transform: rotate(45deg); box-shadow: 0 2px 4px rgba(0, 0, 0, .15); }
.o-sheet-pill { margin-bottom: 16px; }
.o-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.o-sheet-head > div { min-width: 0; flex: 1; }
.o-title { display: block; width: 100%; margin: 0 0 16px; font-size: 27px; line-height: 32.6px; font-weight: 500; color: var(--head); overflow-wrap: anywhere; }
.o-title-input { padding: 0 0 1px; border: 0; border-bottom: 1px solid transparent; background: transparent; font-family: inherit; resize: none; overflow: hidden; }
.o-title-input:hover { border-bottom-color: var(--input-line); } .o-title-input:focus { outline: none; border-bottom-color: var(--navy); }
.o-title-input::placeholder { color: #adb5bd; }
.o-sheet-head .o-title { margin-bottom: 4px; }
.o-subtitle { color: var(--muted); }
.o-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-bottom: 16px; }
.o-col { min-width: 0; }
.o-col > :last-child { margin-bottom: 0; }
.o-group { display: grid; gap: 8px; margin-bottom: 16px; }
.o-row { display: grid; grid-template-columns: 127px minmax(0, 1fr); gap: 16px; align-items: start; }
.o-row > .o-label { padding-top: 1px; }
.o-label { font-weight: 500; color: var(--muted); }
.o-value { min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.o-hint { display: block; color: var(--muted); font-size: 13px; }
.o-separator { margin: 24px 0 16px; padding-bottom: 4px; font-size: 13px; line-height: 19.5px; font-weight: 700; text-transform: uppercase; color: var(--section);
  border-bottom: 1px solid #e6e6e6; }
.o-group > .o-separator { margin: 0 0 8px; }
.o-group.titled { margin-top: 24px; }
/* one set of distances in a sheet: 8 between rows, 16 from a section title to its content, 24 between sections.
   The two columns start on the same line, and nothing adds space at the top or the foot of a sheet, a tab or a dialog. */
.o-col > :first-child, .o-sheet > :first-child, .o-tab-pane > :first-child, .o-dialog-body > :first-child { margin-top: 0; }
.o-sheet > :last-child, .o-tab-pane > :last-child { margin-bottom: 0; }
.o-note { margin: 0 0 16px; padding: 8px 16px; border-radius: 4px; background: var(--note-bg); color: var(--note-text); }
/* warning of ERP2 (alert-warning): a locked module above its screen, modules open past the time to lock them again */
.o-note.warn { background: #fff3cd; color: #856404; }
.o-lock-band { margin: 0 0 8px; }
.o-lock-overdue, .o-lock-scope { margin: 4px 0 0; padding-left: 20px; }
.o-inline { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.o-copy { display: flex; gap: 8px; align-items: center; }
.o-label-inline { font-weight: 500; color: var(--muted); }
.o-notebook { margin-top: 8px; }
.o-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.o-tab { margin-bottom: -1px; padding: 8px 16px; border: 1px solid transparent; border-top-width: 3px; border-radius: 0; background: none; color: var(--section); font-weight: 500; }
.o-tab:hover { color: var(--navy); }
.o-tab[aria-selected=true] { color: var(--navy); font-weight: 600; background: #fff; border-color: var(--gold) var(--line) #fff; }
.o-details { margin: 0 0 16px; }
.o-details > summary { padding: 4px 0; margin-bottom: 8px; cursor: pointer; color: var(--navy); font-weight: 500; }
.o-tree { list-style: none; margin: 0; padding: 0; }
.o-tree .o-tree { padding-left: 20px; }
.o-tree-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.o-tree-row a { text-decoration: none; color: var(--text); } .o-tree-row a:hover { color: var(--navy); text-decoration: underline; }
.o-count { min-width: 22px; padding: 0 6px; border-radius: var(--tag-radius); background: var(--gray-btn); font-size: 12px; line-height: 20px; text-align: center; }
.o-timeline { list-style: none; margin: 0; padding: 0; }
.o-timeline li { display: grid; grid-template-columns: 110px 140px minmax(0, 1fr); gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--row-line); }
.o-sessions { list-style: none; margin: 0; padding: 0; }
.o-sessions li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 41px; padding: 4px 0; border-bottom: 1px solid var(--line); }
/* tables inside a sheet: heading 37px, rows 38px, first cell 16px in */
.o-sheet .o-list td { height: 38px; padding-top: 7.75px; padding-bottom: 7.75px; }
.o-sheet .o-list th:first-child, .o-sheet .o-list td:first-child { padding-left: 16px; }
.o-sheet .o-table-wrap { border-top: 1px solid var(--line); margin-bottom: 16px; }
.o-sheet > .o-table-wrap:last-child, .o-tab-pane > .o-table-wrap:last-child { margin-bottom: 0; }
.o-grants td { white-space: normal; max-width: none; }
.o-grants th.op, .o-grants td.op { width: 52px; text-align: center; }
.o-grants .o-group-cell { font-weight: 500; color: var(--head); }
/* an account: the rights held from the tiers below are faint ticks; the rows of the account itself are solid */
.o-grants input.o-inherited { opacity: .4; }
.o-inherited-note { margin-top: 2px; }
.o-inherited-legend { margin: 8px 12px; }
.o-grants .o-scope-cell { width: 150px; }
.o-cell-select { min-width: 140px; height: 21px; padding: 0; border-bottom-color: transparent; }
.o-grants tr:hover .o-cell-select:not(:disabled) { border-bottom-color: var(--input-line); }
.o-grants tr.ungranted td:not(.o-group-cell) { color: var(--muted); }
.o-grants tr.changed td { background: var(--changed); }

/* ---------------------------------------------------------------- dialog: 460px, 6px corners, buttons on the left */
.o-dialog { width: min(460px, calc(100vw - 32px)); max-height: 90vh; padding: 0; border: 1px solid rgba(0, 0, 0, .176); border-radius: 6px; color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.o-dialog.wide { width: min(760px, calc(100vw - 32px)); }
.o-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.o-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 24px 12px; }
.o-dialog-head h2 { font-size: 18.2px; line-height: 27.3px; }
.o-close { padding: 0 4px; border: 0; background: none; color: var(--section); font-size: 22px; line-height: 27px; }
.o-close:hover { color: var(--head); }
.o-dialog-body { padding: 12px 24px; }
.o-dialog-body > :last-child, .o-dialog-body > div > :last-child, .o-dialog-body > div > :has(+ .error:empty:last-child) { margin-bottom: 0; }
.o-dialog-body > div:first-child > :first-child { margin-top: 0; }
.o-dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; padding: 23.5px; border-top: 1px solid var(--line); }
.o-dialog .o-row { grid-template-columns: 127px minmax(0, 1fr); }
/* the box of a file (widgets.ts openDialog `file`; the Owner, 27/11/2026: "cái màn hình này rất nhỏ", "thiết kế k đọc được"): one
   size for every viewer of an attached file (Hộp thư, Thảo luận, Lưu trữ, Thanh toán, ảnh) and of a print (widgets.ts printDialog);
   the sheet for the customer (contract-month.ts) takes the same size. Nearly the whole window, no inner margin, the file takes the
   height left by the title and the buttons. A phone (either way round) keeps the wide box as it was.
   `.o-d-fileview-text`: the box holds only a sentence (cannot be shown), as high as the sentence. */
@media screen and (min-width: 761px) and (min-height: 520px) {
  .o-dialog.o-dialog-file, .o-dialog.o-sales-hm-print { width: min(1400px, calc(100vw - 32px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .o-dialog.o-dialog-file[open] { display: flex; flex-direction: column; }
  .o-dialog.o-dialog-file .o-dialog-head { flex: none; padding: 12px 16px 8px; }
  .o-dialog.o-dialog-file .o-dialog-body { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; padding: 0; }
  .o-dialog.o-dialog-file .o-dialog-foot { flex: none; padding: 10px 16px; }
  .o-dialog.o-dialog-file .o-fileview:not(.o-d-fileview-text) { display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 0 1 auto; width: 100%; height: 100vh; height: 100dvh; min-height: 0; background: #f4f4f4; }
  .o-dialog.o-dialog-file .o-fileview.o-d-fileview-text { padding: 12px 16px; }
  .o-dialog.o-dialog-file .o-fileview > iframe, .o-dialog.o-dialog-file .o-fileview > .o-pdf-pages { flex: 1 1 0; width: 100%; height: auto; max-height: none; min-height: 0; border: 0; }
  .o-dialog.o-dialog-file .o-fileview > img { flex: 0 1 auto; max-width: 100%; max-height: 100%; min-height: 0; margin: 0; border: 0; object-fit: contain; }
  /* the photo viewer: the arrows and the link under the picture keep their own height */
  .o-dialog.o-dialog-file .o-fileview > .o-work-viewer-nav { flex: none; align-self: stretch; margin: 0; padding: 8px 16px 0; }
  .o-dialog.o-dialog-file .o-fileview > .o-file-full { flex: none; margin: 6px 0; }
  .no-dialog dialog.o-dialog-file.o-dialog-poly { top: 12px; }
}

#toasts { position: fixed; right: 16px; top: 62px; z-index: 60; display: grid; gap: 8px; }
.toast { background: #fff; color: var(--text); padding: 10px 16px; border-left: 4px solid var(--green); border-radius: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); max-width: 360px; }
.toast.error { border-left-color: var(--red); }

/* ---------------------------------------------------------------- sign-in page (measured on ERP2, keep as it is) */
.auth-shell { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(390px, 1fr); background: #fff; color: var(--navy); }
.auth-art { position: relative; min-height: 720px; overflow: hidden; background: #b9c6cb; border-right: 2px solid var(--gold); }
.auth-picture { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.auth-quote { position: absolute; left: 7%; right: 6%; margin: 0; color: #fff; text-shadow: 0 1px 3px #002d4c40; }
.auth-quote p { margin: 0 0 12px; line-height: 1.24; font-weight: 400; } .auth-quote strong { font-weight: 400; color: #f0c674; }
.auth-quote cite { display: block; font-size: 14px; line-height: 1.3; font-style: normal; color: #e6ebef; }
.auth-quote.keller { top: 7%; max-width: 360px; font-size: clamp(20px, 1.65vw, 29px); }
.auth-quote.jobs { bottom: 3%; font-size: clamp(17px, 1.25vw, 23px); }
.auth-quote.jobs::before { content: ''; display: block; width: 48px; border-top: 2px solid var(--gold); margin-bottom: 18px; }
.auth-panel { position: relative; display: flex; align-items: center; justify-content: center; padding: 72px 48px 96px; background: #fff; }
.auth-content { width: 100%; max-width: 370px; font-size: 14px; }
.auth-logo { display: block; width: 290px; max-width: 82%; height: auto; margin: 0 auto 64px; }
.auth-heading { margin-bottom: 28px; }
.auth-heading h1 { font-size: 34px; line-height: 1.25; font-weight: 700; letter-spacing: -.5px; margin: 0 0 9px; color: var(--navy); }
.auth-heading p { color: #748494; margin: 0; font-size: 15px; }
.auth-content h3 { color: var(--navy); margin: 18px 0 8px; font-size: 16px; }
.auth-content .form { display: grid; gap: 0; }
.auth-content .field { display: grid; gap: 8px; min-width: 0; margin-bottom: 23px; }
.auth-content .field > label { font-size: 15px; font-weight: 600; color: #14394f; }
.auth-content .input { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid #dbe2e9; border-radius: 5px; background: #fafbfd; font-size: 15px; line-height: 22.5px; color: #212529; }
.auth-content .input::placeholder { color: #94a0ac; }
.auth-content .input:focus { border-color: #b48428; background: #fff; }
.auth-content .input.code { letter-spacing: .3em; }
.auth-content .password .input { border-radius: 5px 0 0 5px; }
.auth-content .eye { display: grid; place-items: center; width: 41px; margin-left: -1px; border: 1px solid #dbe2e9; border-left: 0; border-radius: 0 6px 6px 0; background: #fafbfd; color: #6c8192; }
.auth-content .btn { gap: 6px; min-height: 38px; padding: 6px 14px; border-color: #8ea2b3; background: #fff; color: #14394f; font-weight: 600; }
.auth-content .btn.primary, .auth-content .btn-primary { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 700; }
.auth-content .btn.primary:hover, .auth-content .btn-primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.auth-content .btn.primary:disabled { background: var(--gold-disabled); border-color: var(--gold-disabled); opacity: 1; }
.auth-content .btn.wide { width: 100%; min-height: 49px; margin-top: 3px; padding: 6px 12px; font-size: 15px; line-height: 22.5px; }
.auth-content .error { color: #b42318; margin: 6px 0; }
.auth-content .notice { background: var(--gold-soft); border-left: 3px solid var(--gold); padding: 8px 12px; margin: 8px 0; color: var(--navy); }
.auth-content .muted { color: #52687b; }
.auth-content .o-buttons { margin: 16px 0 0; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 23px; }
.auth-content .link { border: 0; background: none; padding: 0; font-size: 13px; color: #536e84; text-decoration: none; }
.auth-login { margin: 0; }
.auth-footer { position: absolute; bottom: 25px; left: 25px; right: 25px; text-align: right; font-size: 11px; color: #748494; }

/* ---------------------------------------------------------------- wide screens: the Cấu hình column cannot be folded */
@media (min-width: 761px) { .o-config-fold > summary { pointer-events: none; } }

/* ---------------------------------------------------------------- sign-in page on a phone */
@media (max-width: 900px) {
  .auth-shell { display: flex; flex-direction: column; }
  .auth-art { min-height: 0; height: 94vw; max-height: 850px; border-right: 0; border-bottom: 2px solid var(--gold); background: #193c50; }
  .auth-quote.keller { top: 6%; font-size: clamp(12px, 3.6vw, 22px); max-width: 48%; }
  .auth-quote.jobs { bottom: 5%; font-size: clamp(12px, 2.9vw, 18px); }
  .auth-quote p { margin-bottom: 6px; } .auth-quote cite { font-size: 10px; } .auth-quote.jobs::before { width: 26px; margin-bottom: 10px; }
  .auth-panel { flex: 1; padding: 24px 32px 48px; } .auth-content { max-width: 390px; }
  .auth-logo { width: 180px; margin-bottom: 18px; } .auth-heading { margin-bottom: 18px; }
  .auth-heading h1 { font-size: 24px; margin-bottom: 6px; } .auth-heading p { font-size: 13px; }
  /* 16px: a phone enlarges the whole page when a box with smaller letters is tapped, and the page then no longer fits the screen */
  .auth-content .input { min-height: 44px; font-size: 16px; } .auth-content .btn.wide { min-height: 44px; } .auth-footer { bottom: 17px; }
}

/* ---------------------------------------------------------------- phone (≤ 760px) */
@media (max-width: 760px) {
  .o-input, .input, select, textarea, .o-search-input { font-size: 16px; }
  /* every box a person types in, in every application: a phone enlarges the whole page when a box with letters smaller than 16px
     is tapped and leaves it enlarged (the Owner, 16/11/2026: "phải thu nhỏ lại mới vừa") */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]), select, textarea { font-size: 16px !important; }
  /* a phone has no room for both names: the name of the open app is shown whole, the company name leaves the bar (as ERP2 on a
     phone); the unit switch, which is an action, stays and shrinks first */
  .o-navbar-company { display: none; }
  .o-unit-switch { max-width: 40vw; }
  /* the name of the open app is shown whole while it fits; a long one ("Vận hành / Dự án") is cut with "…" instead of pushing the
     bar wider than the screen (the page then scrolled sideways) */
  .o-navbar-app { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  /* the icons on the right never give room (they were squeezed 4px narrower than their content and stuck out of the screen):
     the name on the left gives it */
  .o-navbar-tray { flex: none; }
  .o-navbar-left { min-width: 0; }
  /* bar: [grid] [☰] [name of the open screen] … [tray] [avatar]; the app grid gives way to the drawer. The screen name is white, 15px,
     wraps to two lines rather than being cut; the app name (gold) shows only while no menu entry matches the address */
  /* Chủ 13/11/2026: two buttons on the phone too, as first designed — the outer one (grid) goes to the apps, the inner one (☰)
     opens the entries of the open app */
  .o-navbar-apps { padding: 0 6px 0 12px; }
  .o-menu-sections { display: none; }
  .o-menu-burger { display: flex; padding: 0 8px 0 6px; }
  .o-apps-menu { left: 0; right: 0; max-width: none; }
  .o-apps-menu .o-app { padding: 10px 16px; }
  .o-navbar-screen:not(:empty) { display: block; flex: 0 1 auto; min-width: 0; padding: 0 8px; color: #fff; font-size: 15px; font-weight: 400;
    line-height: 15px; white-space: normal; overflow-wrap: anywhere; }
  .o-navbar-screen:not(:empty) + .o-navbar-app { display: none; }
  .o-menu-burger ~ .o-navbar-app { padding-left: 4px; }
  /* left drawer: 100% high, square, over a 25% black scrim */
  .o-menu-all { position: fixed; top: 0; bottom: 0; left: 0 !important; z-index: 45; display: flex; flex-direction: column; width: min(360px, 80vw);
    max-height: none; padding: 0; overflow: hidden; border: 0; border-radius: 0; }
  .o-menu-all:not([hidden]) ~ .o-drawer-scrim { display: block; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 44; background: rgba(0, 0, 0, .25); }
  .o-drawer-head { display: flex; flex: none; align-items: center; justify-content: space-between; height: 46px; padding: 0 8px 0 12px;
    background: #f8f9fa; border-bottom: 1px solid var(--line); }
  .o-drawer-close { width: 40px; height: 34px; margin-left: auto; border: 0; background: none; color: var(--text); font-size: 18px; line-height: 1; }
  .o-drawer-close:hover { background: #e9ecef; }
  .o-drawer-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
  .o-drawer-app { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 15px; font-weight: 500; }
  .o-drawer-app img, .o-drawer-apps img { width: 28px; height: 28px; border-radius: 4px; }
  .o-drawer-menu .o-dropdown-item, .o-drawer-apps .o-dropdown-item { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 500; white-space: normal; }
  .o-drawer-menu .o-dropdown-header { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 500;
    text-transform: none; letter-spacing: 0; white-space: normal; }
  .o-drawer-menu .o-menu-child { padding: 8px 16px 8px 32px; border-top: 0; font-weight: 400; }
  .o-drawer-apps .o-app { padding: 10px 16px; }
  .o-drawer-apps .o-app:first-child { border-top: 0; }
  .o-drawer-apps .active { background: var(--gold-soft); }
  .o-main { overflow: auto; }
  .o-config { display: block; height: auto; }
  .o-config-sidebar { padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--card-line); overflow: visible; }
  .o-config-fold > summary { display: flex; align-items: baseline; gap: 12px; cursor: pointer; }
  .o-config-fold > summary::after { content: '▾'; margin-left: auto; color: var(--side-text); }
  .o-config-fold[open] > summary::after { content: '▴'; }
  .o-config-sidebar h2 { font-size: 18px; margin: 0; } .o-config-sidebar p { margin: 0; }
  .o-config-modules { margin-top: 12px; }
  .o-config-main, .o-content { overflow: visible; }
  .o-screen, .o-view { height: auto; display: block; }
  .o-workspace { padding: 16px; }
  .o-config-groups { grid-template-columns: minmax(0, 1fr); }
  .o-control-panel { flex-wrap: wrap; gap: 8px 12px; }
  .o-cp-left { flex-wrap: wrap; gap: 8px 12px; }
  .o-search { order: 3; flex: 1 1 100%; }
  .o-control-panel.form .o-cp-right { margin-left: 0; flex-wrap: wrap; }
  .o-columns { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .o-col + .o-col > .o-separator:first-child, .o-col + .o-col > .o-group.titled:first-child { margin-top: 16px; }
  .o-row, .o-dialog .o-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .o-sheet { margin: 12px 8px 0; padding: 16px; }
  .o-sheet-head .o-avatar.lg { width: 56px; height: 56px; font-size: 26px; }
  .o-title { font-size: 17px; line-height: 23px; }
  /* an empty status strip takes no room on a phone */
  .o-statusbar { min-height: 0; padding: 6px 12px; flex-wrap: wrap; gap: 8px; }
  /* the buttons and the steps keep 12px from both edges and wrap, so the last step is never cut at the edge */
  .o-statusbar-buttons { margin: 0; } .o-statusbar-state { margin-right: 0; }
  .o-statusbar > :last-child:not(:first-child) { margin-left: auto; }
  .o-statusbar ol, .o-statusbar ul { flex-wrap: wrap; row-gap: 4px; }
  .o-timeline li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .o-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; max-height: 100dvh; margin: auto 0 0; border-radius: 6px 6px 0 0; }
  .recovery-codes { columns: 1; }
}

/* ---------------------------------------------------------------- older browsers (compat.ts)
   iOS < 15.4 has no <dialog>: compat.ts gives it showModal()/close(); these rules give it the look the browser would. */
.no-dialog dialog:not([open]) { display: none; }
.no-dialog dialog.o-dialog-poly { display: block; position: fixed; left: 0; right: 0; top: 8vh; z-index: 1301; margin: 0 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; }
.o-dialog-shade { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1300; background: rgba(0, 0, 0, .5); }
@media (max-width: 767px) { .no-dialog dialog.o-dialog-poly { top: auto; bottom: 0; max-height: 100vh; } }

/* ---------------------------------------------------------------- the bar of five apps (app-bar.ts; Màn chính một cửa vào, migration 0880)
   A computer: a column on the left beside the screen, "Tất cả" at its end. A phone (≤ 760px): the bar at the bottom of the page, under
   the screen (the screen scrolls, the bar stays), "Tất cả" left to the grid button of the top bar. Square frame, round icons. */
.o-shell { flex: 1; min-height: 0; display: flex; }
.o-shell > .o-main { flex: 1; min-width: 0; }
.o-appbar { flex: 0 0 76px; display: flex; flex-direction: column; gap: 2px; padding: 8px 0; overflow-y: auto; background: #fff; border-right: 1px solid var(--line); }
.o-appbar-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border: 0; background: transparent; color: var(--side-text);
  font: inherit; font-size: 11px; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; border-left: 3px solid transparent; }
.o-appbar-item:hover { background: var(--hover); color: var(--navy); }
.o-appbar-item.active { color: var(--navy); font-weight: 700; border-left-color: var(--gold); background: var(--side); }
.o-appbar-icon { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; }
.o-appbar-icon img { display: block; width: 28px; height: 28px; }
.o-appbar-text { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-appbar-all { margin-top: auto; }
/* "Tất cả": nine dots drawn by borders (no icon font, no inline style) */
.o-appbar-dots { width: 16px; height: 16px; background: radial-gradient(circle, var(--side-text) 1.6px, transparent 1.8px) 0 0 / 6px 6px; }
@media (max-width: 760px) {
  .o-shell { flex-direction: column; }
  .o-appbar { order: 2; flex: 0 0 auto; flex-direction: row; gap: 0; padding: 0 0 env(safe-area-inset-bottom); overflow: hidden;
    border-right: 0; border-top: 1px solid var(--line); }
  .o-appbar-item { flex: 1 1 0; min-width: 0; padding: 6px 1px 5px; border-left: 0; border-top: 3px solid transparent; font-size: 11px; }
  .o-appbar-item.active { border-top-color: var(--gold); }
  .o-appbar-icon, .o-appbar-icon img { width: 26px; height: 26px; }
  .o-appbar-all { display: none; }
}

/* Xem như người dùng (1253): dải trên cùng khi phiên đang xem như người khác */
.o-view-as { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px;
  padding: 6px 16px; background: #b42318; color: #fff; font-weight: 600; font-size: 14px; }
.o-view-as .btn { background: #fff; color: #b42318; border-color: #fff; }
