/* =====================================================================================================
   BIM XAY DUNG 360 - giao dien quan ly du an cap tinh cho OpenProject (chen qua nginx sub_filter, xem docker/nginx.conf).
   Chi dung CSS rieng: KHONG sua ma nguon OpenProject, KHONG dung tinh nang giao dien Enterprise.
   Nguyen tac: gon - day du lieu - uu tien bang. Dau trang 44px, menu 30px/muc, chu 13px, bang dong 28px ke o ro,
   bo goc nho (6px), vien manh thay bong do, khoang cach theo luoi 4/8/12px.
   ===================================================================================================== */
:root body, html:root {
  --xd-navy: #0b3b66;
  --xd-navy-2: #0e4a80;
  --xd-blue: #1565c0;
  --xd-sky: #e9f1fb;
  --xd-amber: #f2a51a;
  --xd-red: #c62828;
  --xd-bg: #f3f5f8;
  --xd-line: #e2e7ee;
  --xd-line-2: #cfd7e2;
  --xd-head: #f0f3f7;
  --xd-text: #1f2937;
  --xd-muted: #6b7686;
  --xd-r: 6px;
  --xd-font: "Segoe UI", "Be Vietnam Pro", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* bien giao dien cua OpenProject */
  --body-font-family: var(--xd-font);
  --fontStack-sansSerif: var(--xd-font);
  --fontStack-sansSerifDisplay: var(--xd-font);
  --fontStack-system: var(--xd-font);
  --body-font-size: 13px;
  --header-height: 44px;
  --header-bg-color: var(--xd-navy);
  --header-item-font-color: #fff;
  --header-item-font-hover-color: #fff;
  --header-item-bg-hover-color: rgba(255, 255, 255, .12);
  --header-border-bottom-color: transparent;
  --header-border-bottom-width: 0;
  --main-menu-width: 224px;
  --main-menu-bg-color: #fff;
  --main-menu-font-color: #334155;
  --main-menu-bg-hover-background: #f2f5f9;
  --main-menu-hover-font-color: var(--xd-navy);
  --main-menu-bg-selected-background: var(--xd-sky);
  --main-menu-selected-font-color: var(--xd-navy);
  --main-menu-sidebar-font-color: #334155;
  --main-menu-sidebar-h3-color: var(--xd-muted);
  --main-menu-border-color: var(--xd-line);
  --main-menu-border-width: 1px;
  --main-menu-item-height: 30px;
  --main-menu-font-size: 13px;
  --accent-color: var(--xd-blue);
  --content-link-color: var(--xd-blue);
  --primary-button-color: var(--xd-blue);
  --button-primary-bgColor-rest: var(--xd-blue);
  --button-primary-bgColor-hover: #0f56a8;
  --button-primary-bgColor-active: var(--xd-navy);
  --button-primary-borderColor-rest: transparent;
  --button-primary-borderColor-hover: transparent;
  --fgColor-accent: var(--xd-blue);
  --bgColor-accent-emphasis: var(--xd-blue);
  --borderRadius-small: 4px;
  --borderRadius-medium: 6px;
  --borderRadius-large: 8px;
  --control-medium-size: 30px;
  --control-small-size: 26px;
}

body { font-family: var(--xd-font); color: var(--xd-text); font-size: 13px; -webkit-font-smoothing: antialiased; }
a { color: var(--xd-blue); }

/* ================================================================== DAU TRANG (44px) */
.op-app-header {
  background: var(--xd-navy) !important; border-bottom: 2px solid var(--xd-amber) !important; box-shadow: none !important;
  height: var(--header-height) !important;
}
.op-app-header a, .op-app-header button, .op-app-header .op-app-header--primer-button { color: #fff; }
.op-app-header .Button--invisible:hover, .op-app-header .op-app-menu--item-action:hover { background: rgba(255, 255, 255, .12) !important; border-radius: var(--xd-r); }
.op-app-header .Button-visual svg, .op-app-header .octicon { fill: currentColor; }
.op-app-header .Button { height: 30px !important; min-width: 30px; }

/* thuong hieu */
.op-logo { display: flex; align-items: center; }
.op-logo .op-logo--link {
  background: none !important; width: auto !important; min-width: 0 !important; height: 32px !important; margin: 0 6px 0 4px; padding: 0 4px;
  display: inline-flex !important; align-items: center; gap: 8px; text-decoration: none !important; font-size: 0 !important; color: transparent !important;
}
.op-logo .op-logo--link::before {
  content: "QN"; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border-radius: 6px;
  background: var(--xd-amber); color: var(--xd-navy); font: 800 10.5px/1 var(--xd-font); letter-spacing: -.3px;
}
.op-logo .op-logo--link::after { content: "BIM Xây dựng\A Quảng Ngãi"; color: #fff; font: 700 12.5px/1.15 var(--xd-font); letter-spacing: .1px; white-space: pre; }   /* 2 dong: cot dau thanh tieu de OpenProject co dinh ~254 px, 1 dong tran de len o tim kiem */
.op-logo .op-logo--link > * { display: none !important; }

/* tim kiem */
.op-app-header .top-menu-search--input, .op-app-header global-search input, .op-app-header .ng-select-container {
  background: rgba(255, 255, 255, .1) !important; border: 1px solid rgba(255, 255, 255, .2) !important; color: #fff !important;
  border-radius: var(--xd-r) !important; min-height: 30px !important; height: 30px !important;
}
.op-app-header global-search input::placeholder, .op-app-header .ng-placeholder { color: rgba(255, 255, 255, .7) !important; }
.op-app-header .ng-select-focused .ng-select-container, .op-app-header global-search input:focus { background: #fff !important; color: var(--xd-text) !important; }
#op-app-header--quick-add-menu-button { background: var(--xd-amber) !important; color: var(--xd-navy) !important; border: 0 !important; border-radius: var(--xd-r) !important; }
#op-app-header--quick-add-menu-button svg { fill: var(--xd-navy) !important; }
.op-app-header .op-avatar { width: 28px !important; height: 28px !important; font-size: 11px !important; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }

.op-xd360-back {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; margin-right: 4px; align-self: center; box-sizing: border-box;
  color: #fff !important; text-decoration: none !important; font-weight: 600; font-size: 12.5px; white-space: nowrap;
  border-radius: var(--xd-r); border: 1px solid rgba(255, 255, 255, .25);
}
.op-xd360-back:hover { background: rgba(255, 255, 255, .12); }
@media (max-width: 900px) { .op-xd360-back span { display: none; } }
@media (max-width: 1359px) { .op-logo .op-logo--link::after { display: none; } }   /* < 1360 px: o tim kiem lui sang trai (x ~ rong - 1166) -> de len ten */

/* ================================================================== THANH BEN (menu 30px) */
#main-menu, #menu-sidebar, .main-menu { background: #fff !important; }
#main-menu { border-right: 1px solid var(--xd-line) !important; }
#main-menu .main-menu--top-container, #main-menu .main-menu-item { min-height: 0; }
#main-menu .main-item-wrapper, #main-menu .main-menu-item > a, #main-menu .main-menu--parent-node,
#main-menu ul.main-menu--children > li > a, #main-menu .op-sidemenu--item-action {
  border-radius: var(--xd-r); margin: 0 6px; min-height: 30px; font-size: 13px;
}
#main-menu a.main-item-wrapper, #main-menu .main-item-wrapper > a, #main-menu .main-menu-item > a, #main-menu ul.main-menu--children a,
#main-menu .op-sidemenu--item-action { color: #334155 !important; font-weight: 500; border-left: 0 !important; }
#main-menu .main-item-wrapper:hover, #main-menu .main-menu-item > a:hover, #main-menu ul.main-menu--children a:hover,
#main-menu .op-sidemenu--item-action:hover { background: #f2f5f9 !important; }
#main-menu .selected, #main-menu a.selected, #main-menu .main-item-wrapper.selected, #main-menu .main-item-wrapper:has(> a.selected),
#main-menu .op-sidemenu--item-action.selected, #main-menu .op-sidemenu--item-action--selected {
  background: var(--xd-sky) !important; color: var(--xd-navy) !important; font-weight: 600; box-shadow: inset 3px 0 0 var(--xd-navy);
}
#main-menu .selected svg, #main-menu .selected .icon { color: var(--xd-navy) !important; fill: var(--xd-navy) !important; }
#main-menu .main-menu--children-menu-header { border-bottom: 1px solid var(--xd-line); padding: 2px 0 4px; margin-bottom: 4px; }
#main-menu .main-menu--parent-node { font-weight: 700; color: var(--xd-navy) !important; }
#main-menu hr, #main-menu .main-menu--projects-divider { border-color: var(--xd-line) !important; margin: 4px 0 !important; }
#main-menu .op-sidemenu--title, #main-menu .op-sidemenu--section-title, #main-menu h3 {
  color: var(--xd-muted) !important; font-size: 10.5px !important; letter-spacing: .6px; text-transform: uppercase; font-weight: 700; margin-top: 8px !important;
}
#main-menu svg.octicon, #main-menu .Button-visual svg { width: 15px; height: 15px; }

/* ================================================================== NOI DUNG */
#content-wrapper, #content-body, .content-wrapper { background: var(--xd-bg) !important; }
#content-body { padding: 10px 16px 16px !important; }
.PageHeader { border-bottom: 0 !important; margin-bottom: 8px !important; padding-bottom: 0 !important; }
.PageHeader-contextBar { min-height: 0 !important; margin-bottom: 2px !important; }
.PageHeader-titleBar { min-height: 0 !important; }
.PageHeader-title, .PageHeader .PageHeader-title, h2.op-page-header--title {
  font-size: 17px !important; line-height: 1.3 !important; font-weight: 700 !important; color: var(--xd-navy) !important; letter-spacing: -.1px;
}
.Breadcrumb, .Breadcrumb a, nav[aria-label="Breadcrumb"] a { font-size: 11.5px !important; color: var(--xd-muted) !important; }
.PageHeader-navigation, .PageHeader .tabnav { margin-top: 4px !important; }
.UnderlineNav, .tabnav { min-height: 0 !important; }
.UnderlineNav-item, .tabnav-tab { padding: 6px 10px !important; font-size: 13px !important; }
.SubHeader, .toolbar-container, .op-work-package-list-header { padding-top: 0 !important; margin-bottom: 8px !important; gap: 6px; }
.toolbar { margin-bottom: 8px !important; }

/* khoi / the: vien mong, khong bong nang */
.widget-box, .Box, .op-widget-box, .grid--area.-widgeted, .op-project-overview--widget, .form--section, fieldset.form--fieldset, .attributes-group {
  background: #fff !important; border: 1px solid var(--xd-line) !important; border-radius: var(--xd-r) !important; box-shadow: none !important;
}
.widget-box { padding: 0 !important; margin-bottom: 12px !important; }
.op-widget-box--header, .widget-box--header {
  padding: 8px 12px !important; min-height: 0 !important; border-bottom: 1px solid var(--xd-line); background: #fafbfc; border-radius: var(--xd-r) var(--xd-r) 0 0;
}
.op-widget-box--header .editable-toolbar-title--fixed, .widget-box--header-title, .op-widget-box--header-title h3 {
  font-size: 13.5px !important; font-weight: 700 !important; color: var(--xd-navy) !important; margin: 0 !important;
}
.op-widget-box--body, .widget-box--body { padding: 10px 12px !important; }
.widget-boxes { gap: 12px !important; }
.grid--container { grid-gap: 12px !important; gap: 12px !important; }
.grid--widget-header { padding: 8px 12px !important; }
.blankslate { padding: 16px !important; }
.blankslate .blankslate-image, .blankslate .octicon { margin-bottom: 4px !important; }

/* ================================================================== BANG (28px/dong, ke o) */
.generic-table--container, .generic-table--results-container, .wp-table--container, .work-packages-split-view--tabletimeline-side {
  background: #fff; border: 1px solid var(--xd-line) !important; border-radius: var(--xd-r) !important; box-shadow: none !important;
}
table.generic-table, .wp-table--table, table.work-package-table { border-collapse: separate !important; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.generic-table thead th, .wp-table--table thead th {
  background: var(--xd-head) !important; color: #1f2937 !important; font-weight: 700 !important; text-transform: none !important;
  font-size: 12.5px !important; letter-spacing: 0 !important; height: 30px !important; padding: 0 8px !important;
  position: sticky; top: 0; z-index: 3; border-bottom: 1px solid var(--xd-line-2) !important;
}
.generic-table thead th *, .wp-table--table thead th * { text-transform: none !important; }
.generic-table--sort-header-outer { background: transparent !important; height: auto !important; }
.generic-table thead th a, .generic-table thead th span { color: #1f2937 !important; }
.generic-table th, .generic-table td, .wp-table--table td, .wp-table--table th { border-right: 1px solid var(--xd-line) !important; border-bottom: 1px solid var(--xd-line) !important; }
.generic-table td, .wp-table--table td { height: 28px !important; padding: 2px 8px !important; line-height: 1.35; }
.generic-table tbody tr:nth-child(even) td, .wp-table--table tbody tr:nth-child(even) td { background: #fafbfc; }
.generic-table tbody tr:hover td, .wp-table--table tbody tr:hover td { background: #edf4fd !important; }
.wp-table--row.-checked td, .generic-table tr.-checked td { background: #dceafb !important; }
.generic-table td.format-float, .generic-table td.format-int, .generic-table td.cf_6, .generic-table th.cf_6 { text-align: right; }
.generic-table--footer, .generic-table--results-container + .generic-table--footer { padding: 6px 8px !important; }
.op-pagination, .pagination { padding: 6px 0 !important; font-size: 12px; }

/* danh sach du an: cot ten co dinh, dong gon */
body.controller-projects.action-index table.generic-table th.name, body.controller-projects.action-index table.generic-table td.name {
  position: sticky; left: 0; z-index: 2; background: #fff; box-shadow: 1px 0 0 var(--xd-line-2);
}
body.controller-projects.action-index table.generic-table thead th.name { z-index: 4; background: var(--xd-head) !important; }
body.controller-projects.action-index table.generic-table tbody tr:nth-child(even) td.name { background: #fafbfc; }
body.controller-projects.action-index table.generic-table td.name a, .projects-table--name-text { font-weight: 600 !important; color: var(--xd-navy) !important; }
body.controller-projects.action-index .op-project-row-component--favorite,
.generic-table .Button--iconOnly.Button--medium { width: 24px !important; height: 24px !important; min-height: 0 !important; }
body.controller-projects.action-index table.generic-table th.favorited, body.controller-projects.action-index table.generic-table td.favorited { width: 34px !important; max-width: 34px; }
.project-status--bulb { width: 9px !important; height: 9px !important; }
.project-long-text-container { max-height: 2.7em; overflow: hidden; }

/* ================================================================== NUT, O NHAP */
.Button, .button { border-radius: var(--xd-r) !important; font-weight: 600; }
.Button--medium { height: 30px !important; padding: 0 10px !important; font-size: 13px !important; }
.Button--small { height: 26px !important; font-size: 12px !important; }
.button { padding: 5px 10px !important; font-size: 13px !important; }
.Button--primary, .button.-primary, .button.-highlight { background: var(--xd-blue) !important; border-color: var(--xd-blue) !important; color: #fff !important; box-shadow: none !important; }
.Button--primary:hover, .button.-primary:hover, .button.-highlight:hover { background: #0f56a8 !important; }
.FormControl-input, .FormControl-select, .form--text-field-container input, .form--select, input.form--text-field, .ng-select-container { border-radius: var(--xd-r) !important; }
.FormControl-input.FormControl-medium, .FormControl-select.FormControl-medium { height: 30px !important; }
.FormControl-input:focus, .form--text-field:focus, .ng-select-focused .ng-select-container { border-color: var(--xd-blue) !important; box-shadow: 0 0 0 2px rgba(21, 101, 192, .15) !important; }
.Label, .Counter { border-radius: 999px !important; }
.Overlay, .op-modal, .spot-modal { border-radius: 8px !important; box-shadow: 0 12px 36px rgba(15, 23, 42, .2) !important; }
.op-toast { border-radius: var(--xd-r) !important; }
.SegmentedControl, .SegmentedControl-item { border-radius: var(--xd-r) !important; }

/* chi tiet cong viec: nhom thuoc tinh gon */
.attributes-group { padding: 0 !important; margin-bottom: 10px !important; }
.attributes-group--header { border-bottom: 1px solid var(--xd-line) !important; padding: 6px 10px !important; margin: 0 !important; background: #fafbfc; }
.attributes-group--header-text { text-transform: none !important; font-size: 13px !important; font-weight: 700 !important; color: var(--xd-navy) !important; letter-spacing: 0 !important; }
.attributes-key-value { padding: 0 10px; }
.attributes-key-value--key, .attributes-key-value--value-container { padding-top: 3px !important; padding-bottom: 3px !important; min-height: 26px; }
.attributes-key-value--key { color: var(--xd-muted) !important; font-size: 12.5px; }
.work-packages--subject-type-row { margin-bottom: 4px !important; }

/* ================================================================== TRANG CHU: bang dieu hanh */
body.xd360-home page-header, body.xd360-home .PageHeader { display: none !important; }
body.xd360-home .widget-boxes > #homescreen-blocks-welcome-box,
body.xd360-home .widget-boxes > #homescreen-blocks-new-features-box,
body.xd360-home .widget-boxes > #homescreen-blocks-users-box,
body.xd360-home .widget-boxes > #homescreen-blocks-my-account-box,
body.xd360-home .widget-boxes > #homescreen-blocks-projects-box,
body.xd360-home .widget-boxes > [id^="homescreen-blocks-community"],
body.xd360-home .widget-boxes > [id^="homescreen-blocks-administration"],
body.xd360-home .widget-boxes > [id^="homescreen-blocks-upsell"] { display: none !important; }
body.xd360-home .widget-boxes .widget-box { flex-basis: calc(50% - 6px) !important; }

.xd-dash-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.xd-dash-title h1 { margin: 0; font: 700 17px/1.3 var(--xd-font); color: var(--xd-navy); }
.xd-dash-title span { color: var(--xd-muted); font-size: 12px; }
.xd-dash-title .xd-dash-links { margin-left: auto; display: flex; gap: 6px; }
.xd-dash-links a {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid var(--xd-line-2); border-radius: var(--xd-r);
  background: #fff; color: var(--xd-navy) !important; font-weight: 600; font-size: 12.5px; text-decoration: none !important;
}
.xd-dash-links a:hover { border-color: var(--xd-blue); }
.xd-dash-links a.-primary { background: var(--xd-blue); border-color: var(--xd-blue); color: #fff !important; }
.xd-dash-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; margin-bottom: 12px; }
@media (max-width: 1200px) { .xd-dash-grid { grid-template-columns: 1fr; } }
.xd-panel { background: #fff; border: 1px solid var(--xd-line); border-radius: var(--xd-r); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.xd-panel > header { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--xd-line); background: #fafbfc; }
.xd-panel > header b { font-size: 13.5px; color: var(--xd-navy); }
.xd-panel > header span { color: var(--xd-muted); font-size: 12px; }
.xd-panel > header a { margin-left: auto; font-size: 12px; font-weight: 600; text-decoration: none; }
.xd-panel .xd-scroll { overflow: auto; max-height: 420px; }
.xd-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.xd-tbl th { position: sticky; top: 0; z-index: 1; background: var(--xd-head); text-align: left; font-weight: 700; color: #1f2937; height: 28px; padding: 0 8px;
  border-bottom: 1px solid var(--xd-line-2); border-right: 1px solid var(--xd-line); white-space: nowrap; }
.xd-tbl td { height: 27px; padding: 2px 8px; border-bottom: 1px solid var(--xd-line); border-right: 1px solid var(--xd-line); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.xd-tbl tr:nth-child(even) td { background: #fafbfc; }
.xd-tbl tr:hover td { background: #edf4fd; }
.xd-tbl .n { text-align: right; }
.xd-tbl a { color: var(--xd-navy); font-weight: 600; text-decoration: none; }
.xd-tbl a:hover { text-decoration: underline; }
.xd-tbl .late { color: var(--xd-red); font-weight: 700; }
.xd-tbl .muted, .xd-muted { color: var(--xd-muted); }
.xd-empty { padding: 14px 12px; color: var(--xd-muted); font-size: 12.5px; }
.xd-st { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 12px; }
.xd-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, #94a3b8); }
.xd-bar { display: inline-block; width: 54px; height: 6px; border-radius: 3px; background: #e5eaf0; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.xd-bar i { display: block; height: 100%; background: #16a34a; }

/* ================================================================== DAI CHI SO (mot hang, mong) */
.op-xd360-kpi {
  display: flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--xd-line); border-radius: var(--xd-r); margin: 0 0 12px; overflow: hidden;
}
.op-xd360-card {
  --c: var(--xd-navy); flex: 1 1 130px; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 7px 12px; min-height: 52px;
  border-right: 1px solid var(--xd-line); box-shadow: inset 0 3px 0 var(--c); text-decoration: none !important; color: inherit !important;
}
.op-xd360-card:last-child { border-right: 0; }
a.op-xd360-card:hover { background: #f7f9fc; }
.op-xd360-card span { color: var(--xd-muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.op-xd360-card b { color: var(--c); font-size: 19px; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; }
.op-xd360-card b small { font-size: 11px; font-weight: 600; color: var(--xd-muted); margin-left: 3px; }

/* ================================================================== TRANG DANG NHAP */
body.action-login #content-wrapper, body.action-login #content, body.action-login #content-body, body.action-login #wrapper {
  background: linear-gradient(135deg, #0a3358, #0b3b66 55%, #12609e) !important;
}
body.action-login #content-body { min-height: calc(100vh - var(--header-height)); display: flex; align-items: center; justify-content: center; padding: 24px 16px !important; box-sizing: border-box; }
body.action-login #menu-toggle--expand-button { display: none !important; }
body.action-login #login-form {
  background: #fff !important; border: 0 !important; border-top: 4px solid var(--xd-amber) !important; border-radius: 8px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3) !important; padding: 24px 28px 20px !important; width: 100%; max-width: 380px; margin: 0 auto !important; box-sizing: border-box;
}
body.action-login #login-form > h1, body.action-login #login-form > hr { display: none; }
.xd360-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.xd360-login-brand .op-xd360-badge {
  width: 40px; height: 40px; flex: none; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: var(--xd-amber); color: var(--xd-navy); font: 800 14px/1 var(--xd-font);
}
.xd360-login-brand h2 { margin: 0; font: 700 18px/1.2 var(--xd-font); color: var(--xd-navy); }
.xd360-login-brand p { margin: 2px 0 0; color: var(--xd-muted); font-size: 12px; }
.xd360-sso {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 36px; border-radius: var(--xd-r); border: 0; cursor: pointer;
  background: var(--xd-navy); color: #fff; font: 600 13.5px var(--xd-font);
}
.xd360-sso:hover { background: var(--xd-navy-2); }
.xd360-sso[disabled] { opacity: .7; cursor: wait; }
.xd360-or { display: flex; align-items: center; gap: 10px; color: var(--xd-muted); font-size: 11.5px; margin: 12px 0 4px; }
.xd360-or::before, .xd360-or::after { content: ""; flex: 1; height: 1px; background: var(--xd-line); }
.xd360-sso-msg { color: var(--xd-red); font-size: 12px; margin-top: 6px; text-align: center; }
body.action-login #login-form .Button--primary { width: 100%; justify-content: center; }
body.action-login #login-form .flex-justify-between { flex-direction: column; align-items: stretch !important; gap: 8px; }
body.action-login #login-form .flex-justify-between > div:last-child { text-align: center; font-size: 12px; }

/* thanh cuon mong */
* { scrollbar-width: thin; scrollbar-color: #c3ccd8 transparent; }
.xd-dash-grid > .xd-panel:only-child { grid-column: 1 / -1; }
.xd-dash .xd-panel .xd-scroll { max-height: 360px; }
#xd-proj .xd-scroll { max-height: 420px; }
.xd-dash-title { flex-wrap: wrap; row-gap: 6px; }
.xd-dash-title h1, .xd-dash-links a { white-space: nowrap; }
.xd-dash-title span { flex: 1 1 200px; }
.op-xd360-card { flex: 1 1 120px; }
/* an cac muc chi co o ban tra phi (upsell) khoi menu cho gon */
#main-menu li:not(:has(li)):has(.upsell-colored), #op-app-header--modules-menu-list li:not(:has(li)):has(.upsell-colored) { display: none !important; }
/* bang cong viec + Gantt: dong 30px (dung chung bien voi dong thoi gian de Gantt khop) */
:root body, html:root { --table-timeline--row-height: 30px; }
.wp-table--row .op-avatar, .wp-table--row .op-principal--avatar { width: 20px !important; height: 20px !important; font-size: 9px !important; line-height: 20px !important; }
.wp-table--cell-td { padding-top: 0 !important; padding-bottom: 0 !important; }
.wp-table--cell-td .inline-edit--display-field { padding-top: 0 !important; padding-bottom: 0 !important; min-height: 0 !important; }
.toolbar-container .title-container { min-width: 220px; }
.editable-toolbar-title--input { font-size: 17px !important; font-weight: 700 !important; color: var(--xd-navy) !important; height: 32px !important; }
.wp-table--row .op-avatar { min-width: 20px !important; max-width: 20px !important; border-radius: 50% !important; padding: 0 !important; overflow: hidden; }
.generic-table thead th .generic-table--sort-header-outer, .generic-table thead th .generic-table--sort-header { padding: 0 !important; min-height: 0 !important; line-height: 30px !important; }
.generic-table thead th .generic-table--action-menu-button, .generic-table thead th .Button { height: 24px !important; }
.generic-table--empty-header { height: 30px !important; min-height: 0 !important; }

/* ================================================================== TONG QUAN DU AN: ho so du an DTXD */
.xd-ov { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; margin-bottom: 12px; }
@media (max-width: 1100px) { .xd-ov { grid-template-columns: 1fr; } }
.xd-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); margin: 0; font-size: 12.5px; }
.xd-kv dt, .xd-kv dd { margin: 0; padding: 5px 10px; border-bottom: 1px solid var(--xd-line); min-height: 26px; box-sizing: border-box; }
.xd-kv dt { color: var(--xd-muted); background: #fafbfc; border-right: 1px solid var(--xd-line); white-space: nowrap; }
.xd-kv dd { color: var(--xd-text); font-weight: 600; border-right: 1px solid var(--xd-line); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { .xd-kv { grid-template-columns: max-content minmax(0, 1fr); } }
.xd-phase { list-style: none; margin: 0; padding: 6px 12px; }
.xd-phase li { display: grid; grid-template-columns: 1fr 120px 48px; align-items: center; gap: 8px; padding: 4px 0; font-size: 12.5px; border-bottom: 1px dashed var(--xd-line); }
.xd-phase li:last-child { border-bottom: 0; }
.xd-phase li b { text-align: right; font-variant-numeric: tabular-nums; }
.xd-phase li.-cur span:first-child { color: var(--xd-navy); font-weight: 700; }
.xd-phase li.-cur span:first-child::after { content: " · đang thực hiện"; color: var(--xd-amber); font-weight: 600; font-size: 11.5px; }
.xd-phase li.-done span:first-child { color: #15803d; }
.xd-phase .xd-bar { width: 100%; margin: 0; }
.xd-ov .op-xd360-kpi { margin: 0; border: 0; border-top: 1px solid var(--xd-line); border-radius: 0; }
.xd-ov .op-xd360-card { flex-basis: 33%; min-height: 46px; padding: 5px 10px; border-bottom: 1px solid var(--xd-line); }
.xd-ov .op-xd360-card b { font-size: 16px; }
/* khoi trong: thu gon */
.op-grid-page .blankslate { padding: 10px !important; }
.op-grid-page .blankslate .blankslate-icon, .op-grid-page .blankslate svg.blankslate-icon { display: none; }
.op-grid-page .blankslate-heading { font-size: 13px !important; margin: 0 0 2px !important; }
.xd-panel > header b { white-space: nowrap; }
.xd-panel > header span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.xd-panel > header a { white-space: nowrap; }

/* ================================================================== BANG NHAP LIEU KIEU EXCEL (xd-sheet.js) */
.xs-toggle { margin: 0 0 8px; }
.xs-root { background: #fff; border: 1px solid var(--xd-line); border-radius: var(--xd-r); display: flex; flex-direction: column; margin-bottom: 12px; position: relative; }
.xs-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--xd-line); background: #fafbfc; flex-wrap: wrap; }
.xs-bar b { color: var(--xd-navy); font-size: 13.5px; margin-right: 6px; }
.xs-bar input, .xs-bar select { height: 28px; border: 1px solid var(--xd-line-2); border-radius: var(--xd-r); padding: 0 8px; font: inherit; font-size: 12.5px; background: #fff; }
.xs-bar .xs-q { width: 200px; }
.xs-sp { flex: 1; }
.xs-btn { height: 28px; padding: 0 10px; border: 1px solid var(--xd-line-2); border-radius: var(--xd-r); background: #fff; color: var(--xd-navy); font: 600 12.5px var(--xd-font); cursor: pointer; white-space: nowrap; }
.xs-btn:hover { border-color: var(--xd-blue); }
.xs-btn.-primary { background: var(--xd-blue); border-color: var(--xd-blue); color: #fff; }
.xs-btn.-primary:hover { background: #0f56a8; }
.xs-btn[disabled] { opacity: .6; cursor: wait; }
.xs-colmenu { position: absolute; right: 8px; top: 40px; z-index: 20; background: #fff; border: 1px solid var(--xd-line-2); border-radius: var(--xd-r);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .15); padding: 6px 10px; display: grid; gap: 3px; max-height: 60vh; overflow: auto; font-size: 12.5px; }
.xs-colmenu[hidden] { display: none; }
.xs-colmenu label { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.xs-wrap { overflow: auto; max-height: calc(100vh - 260px); min-height: 200px; outline: none; }
.xs-grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12.5px; font-variant-numeric: tabular-nums; user-select: none; }
.xs-grid th, .xs-grid td { border-right: 1px solid var(--xd-line); border-bottom: 1px solid var(--xd-line); padding: 0 6px; height: 27px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; background: #fff; box-sizing: border-box; }
.xs-grid thead th { position: sticky; top: 0; z-index: 3; background: var(--xd-head); font-weight: 700; color: #1f2937; text-align: left; cursor: pointer; height: 28px; }
.xs-grid thead tr.xs-fr th { top: 28px; background: #f8fafc; cursor: default; padding: 2px 3px; }
.xs-grid thead tr.xs-fr input { width: 100%; height: 22px; box-sizing: border-box; border: 1px solid var(--xd-line); border-radius: 4px; padding: 0 5px; font: inherit; font-size: 11.5px; }
.xs-grid th.xs-ro { color: var(--xd-muted); font-style: italic; }
.xs-grid .xs-fz { position: sticky; z-index: 2; }
.xs-grid thead .xs-fz { z-index: 4; }
.xs-grid .xs-rn { left: 0; width: 34px; min-width: 34px; max-width: 34px; text-align: center; color: #94a3b8; background: #f3f5f8 !important; font-size: 11px; }
.xs-grid td.xs-num { text-align: right; }
.xs-grid td.xs-ro { background: #fafbfc; color: #475569; }
.xs-grid tbody tr:hover td { background: #f3f8fe; }
.xs-grid td.xs-sel { background: #dceafb !important; }
.xs-grid td.xs-act { outline: 2px solid var(--xd-blue); outline-offset: -2px; background: #fff !important; }
.xs-grid td.xs-err { background: #fde8e8 !important; }
.xs-grid td.xs-saving { background: #fff7d6 !important; }
.xs-grid td a { color: var(--xd-navy); font-weight: 600; text-decoration: none; }
.xs-grid td a:hover { text-decoration: underline; }
.xs-grid tr.xs-gr td { background: #eaf0f7 !important; font-weight: 600; color: var(--xd-navy); }
.xs-grid tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--xd-head) !important; border-top: 1px solid var(--xd-line-2); }
.xs-grid tfoot td.xs-fz { z-index: 3; }
.xs-rs { position: absolute; right: 0; top: 0; bottom: 0; width: 6px; cursor: col-resize; }
.xs-ed { width: 100%; height: 25px; border: 0; outline: none; padding: 0; margin: 0; font: inherit; background: #fff; }
.xs-form-btn { border: 0; background: none; color: var(--xd-muted); cursor: pointer; padding: 0 4px 0 0; font-size: 12px; }
.xs-form-btn:hover { color: var(--xd-blue); }
.xs-late { color: var(--xd-red); font-weight: 700; }
.xs-foot { padding: 5px 10px; border-top: 1px solid var(--xd-line); font-size: 11.5px; color: var(--xd-muted); }
/* che do bang tinh: an danh sach goc cua OpenProject */
body.xs-sheet-on #content-body .generic-table--results-container,
body.xs-sheet-on #content-body .generic-table--footer,
body.xs-sheet-on #content-body .op-pagination,
body.xs-sheet-on #content-body .SubHeader { display: none !important; }

/* bieu mau */
.xs-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 12px; overflow: auto; }
.xs-dlg { background: #fff; border-radius: 8px; border-top: 4px solid var(--xd-navy); width: 100%; max-width: 760px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); font-size: 13px; }
.xs-dlg header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--xd-line); }
.xs-dlg header b { font-size: 15px; color: var(--xd-navy); }
.xs-dlg header span { color: var(--xd-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xs-dlg header button { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--xd-muted); }
.xs-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 12px 14px; max-height: 66vh; overflow: auto; }
.xs-fgrid label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.xs-fgrid label.-wide { grid-column: 1 / -1; }
.xs-fgrid label > span { font-size: 12px; font-weight: 600; color: #475569; }
.xs-fgrid input, .xs-fgrid select, .xs-fgrid textarea { height: 30px; border: 1px solid var(--xd-line-2); border-radius: var(--xd-r); padding: 0 8px; font: inherit; box-sizing: border-box; width: 100%; }
.xs-fgrid textarea { height: auto; padding: 6px 8px; resize: vertical; }
.xs-fgrid input:focus, .xs-fgrid select:focus, .xs-fgrid textarea:focus { outline: none; border-color: var(--xd-blue); box-shadow: 0 0 0 2px rgba(21, 101, 192, .15); }
.xs-fgrid .xs-chk { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; color: var(--xd-navy); }
.xs-fgrid .xs-chk input { width: auto; height: auto; }
.xs-msg { padding: 0 14px; color: var(--xd-red); font-size: 12.5px; min-height: 16px; }
.xs-dlg footer { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--xd-line); background: #fafbfc; border-radius: 0 0 8px 8px; }
@media (max-width: 640px) { .xs-fgrid { grid-template-columns: 1fr; } }
.xs-toast { position: fixed; right: 16px; bottom: 16px; z-index: 1100; background: #0f172a; color: #fff; padding: 8px 14px; border-radius: var(--xd-r); font-size: 13px;
  opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; max-width: 420px; }
.xs-toast.-show { opacity: 1; transform: none; }
.xs-toast.-err { background: var(--xd-red); }

/* ================================================================== VI TRI GIS, HINH ANH, TAI LIEU (trang Tong quan) */
.xd-media { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; margin-bottom: 12px; }
.xd-media .xd-doc { grid-column: 1 / -1; }
@media (max-width: 1100px) { .xd-media { grid-template-columns: 1fr; } }
.xd-panel > header .xs-btn { margin-left: 6px; height: 26px; }
.xd-panel > header a + a { margin-left: 10px; }
.xd-minimap { position: relative; height: 220px; overflow: hidden; background: #e5e9ee; cursor: pointer; }
.xd-tiles { position: absolute; left: 50%; top: 50%; width: 768px; height: 768px; margin: -50px 0 0 -50px; }
.xd-tiles img { position: absolute; width: 256px; height: 256px; }
.xd-pin { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -18px 0 0 -9px; background: var(--xd-red); border: 2px solid #fff;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.xd-mapsw { position: absolute; right: 8px; top: 8px; height: 24px; padding: 0 8px; border: 1px solid var(--xd-line-2); border-radius: 4px; background: #fff; font: 600 11.5px var(--xd-font); cursor: pointer; }
.xd-kv.-two { grid-template-columns: max-content minmax(0, 1fr); }
.xd-gisform { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--xd-line); align-items: center; }
.xd-gisform input { height: 28px; border: 1px solid var(--xd-line-2); border-radius: var(--xd-r); padding: 0 8px; font: inherit; font-size: 12.5px; }
.xd-gisform input[name=ll] { flex: 1 1 240px; }
.xd-gisform input[name=ha] { width: 110px; }
.xd-msg { font-size: 12px; color: var(--xd-muted); padding: 0 10px; }
.xd-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; padding: 10px; max-height: 360px; overflow: auto; }
.xd-gal figure { margin: 0; position: relative; border: 1px solid var(--xd-line); border-radius: var(--xd-r); overflow: hidden; background: #f3f5f8; }
.xd-gal figure.-avatar { border-color: var(--xd-amber); box-shadow: 0 0 0 2px var(--xd-amber); }
.xd-gal img { display: block; width: 100%; height: 96px; object-fit: cover; cursor: zoom-in; }
.xd-gal figcaption { font-size: 11px; padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #475569; }
.xd-gal button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--xd-amber); cursor: pointer; font-size: 13px; }
.xd-lightbox { position: fixed; inset: 0; z-index: 1200; background: rgba(0, 0, 0, .88); display: flex; align-items: center; justify-content: center; }
.xd-lightbox img { max-width: 92vw; max-height: 88vh; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.xd-lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 28px; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; }
.xd-lightbox [data-p] { left: 16px; top: 50%; }
.xd-lightbox [data-n] { right: 16px; top: 50%; }
.xd-lightbox [data-c] { right: 16px; top: 16px; }
.xs-bar select { width: auto !important; max-width: 220px; }
.xs-bar .xs-q { width: 200px !important; flex: 0 0 auto; }

/* ================================================================== BAN DO TUONG TAC (xd-lib.js mapPicker) */
.xm-map { position: relative; overflow: hidden; background: #e5e9ee; touch-action: none; user-select: none; cursor: grab; }
.xm-map.-picking { cursor: crosshair; }
.xm-map:active { cursor: grabbing; }
.xm-map.-picking:active { cursor: crosshair; }
.xm-tiles { position: absolute; inset: 0; }
.xm-tiles img { position: absolute; left: 0; top: 0; width: 256px; height: 256px; pointer-events: none; }
.xm-svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.xm-poly { fill: rgba(198, 40, 40, .18); stroke: #c62828; stroke-width: 2; }
.xm-poly.-draft { fill: rgba(21, 101, 192, .15); stroke: var(--xd-blue); stroke-dasharray: 5 4; }
.xm-v { fill: #fff; stroke: var(--xd-blue); stroke-width: 2; }
.xm-pin { fill: #c62828; stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }
.xm-ctl { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; }
.xm-ctl button, .xm-tools button { min-width: 28px; height: 28px; border: 1px solid var(--xd-line-2); border-radius: 5px; background: #fff; cursor: pointer; font: 600 13px var(--xd-font); color: var(--xd-navy); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.xm-tools { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; flex-wrap: wrap; max-width: calc(100% - 60px); }
.xm-tools button { padding: 0 8px; font-size: 12px; }
.xm-tools button.-on { background: var(--xd-blue); color: #fff; border-color: var(--xd-blue); }
.xm-tip { position: absolute; left: 8px; bottom: 8px; background: rgba(15, 23, 42, .75); color: #fff; font-size: 11.5px; padding: 3px 8px; border-radius: 4px; pointer-events: none; }
.xm-tip:empty { display: none; }
.xd-pickmap { height: 280px; }
.xs-mapbox { height: 60vh; min-height: 360px; }
.xs-mapinfo { font-size: 12px; }
.xs-modal.-top { z-index: 1050; }
.xs-dlg.-wide { max-width: 1100px; }
.xs-rep { max-height: 62vh; overflow: auto; padding: 0; }
.xs-rep .xd-tbl td { max-width: 380px; }
.xs-bar .xs-year { width: auto !important; }
.xs-bar .xs-cdt { max-width: 240px !important; }

/* ke hoach von theo nam */
.xd-media .xd-cap { grid-column: 1 / -1; }
.xd-captbl tr.-cur td { background: #fffbeb; }
.xd-cin { width: 100%; min-width: 90px; height: 24px; border: 1px solid transparent; border-radius: 4px; padding: 0 6px; font: inherit; text-align: right; background: transparent; box-sizing: border-box; }
.xd-captbl td:nth-child(6) .xd-cin { text-align: left; }
.xd-cin:hover { border-color: var(--xd-line-2); background: #fff; }
.xd-cin:focus { outline: none; border-color: var(--xd-blue); background: #fff; box-shadow: 0 0 0 2px rgba(21, 101, 192, .15); }
.xd-cin.-saving { background: #fff7d6; }
.xd-cin.-err { background: #fde8e8; }
.xd-captbl td { padding: 1px 6px !important; }

/* anh / tai lieu: tai ve, xoa */
.xd-fig-act { position: absolute; top: 4px; right: 4px; display: flex; gap: 3px; }
.xd-fig-act button, .xd-fig-act a { width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--xd-navy); cursor: pointer; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.xd-fig-act [data-av] { color: var(--xd-amber); }
.xd-fig-act [data-del]:hover { background: #fde8e8; }
.xd-gal button { position: static; }
.xd-gal figcaption label { display: flex; align-items: center; gap: 4px; cursor: pointer; overflow: hidden; }
.xd-act { white-space: nowrap; }
.xd-act a, .xd-act button { border: 0; background: none; cursor: pointer; font-size: 13px; padding: 0 4px; text-decoration: none; }
.xd-act button:hover { color: var(--xd-red); }
.xd-lb-dl { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: #fff; color: var(--xd-navy) !important; padding: 7px 14px; border-radius: 6px; font-weight: 600; text-decoration: none !important; }
.xd-lb-name { position: absolute; left: 16px; top: 22px; color: #fff; font-size: 13px; }
.xs-bar .xs-year { min-width: 96px; }
.xs-bar .xs-cdt { min-width: 180px; }

/* dat ten anh / tai lieu */
.xd-nm-bulk { display: flex; gap: 6px; padding: 10px 14px 0; }
.xd-nm-bulk input { flex: 1; height: 30px; border: 1px solid var(--xd-line-2); border-radius: var(--xd-r); padding: 0 8px; font: inherit; }
.xd-nm-list { padding: 10px 14px; max-height: 60vh; overflow: auto; display: grid; gap: 8px; }
.xd-nm-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; padding-bottom: 8px; border-bottom: 1px dashed var(--xd-line); }
.xd-nm-row img { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; border: 1px solid var(--xd-line); }
.xd-nm-ext { width: 64px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--xd-sky); color: var(--xd-navy); font-weight: 800; font-size: 12px; border-radius: 4px; }
.xd-nm-row label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: #475569; }
.xd-nm-row input { height: 30px; border: 1px solid var(--xd-line-2); border-radius: var(--xd-r); padding: 0 8px; font: inherit; font-weight: 400; color: var(--xd-text); min-width: 0; }
.xd-nm-in { display: flex; align-items: center; gap: 4px; }
.xd-nm-in input { flex: 1; }
.xd-nm-in em { font-style: normal; color: var(--xd-muted); font-weight: 400; }
@media (max-width: 640px) { .xd-nm-row { grid-template-columns: 48px 1fr; } .xd-nm-row label:last-child { grid-column: 1 / -1; } }
.xd-gal figcaption b { font-weight: 600; color: var(--xd-text); overflow: hidden; text-overflow: ellipsis; }
.xd-gal figcaption small { display: block; color: var(--xd-muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xd-gal img { height: 92px; }

.xd-apply { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--xd-line); background: #fffbeb; flex-wrap: wrap; }
.xd-apply .xd-msg { padding: 0; flex: 1 1 240px; }

/* chon mau quy trinh */
.xd-tpl-list { display: grid; gap: 8px; padding: 12px 14px; max-height: 60vh; overflow: auto; }
.xd-tpl { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--xd-line-2); border-radius: var(--xd-r); cursor: pointer; }
.xd-tpl:has(input:checked) { border-color: var(--xd-blue); background: var(--xd-sky); box-shadow: inset 3px 0 0 var(--xd-blue); }
.xd-tpl b { color: var(--xd-navy); font-size: 13.5px; }
.xd-tpl p { margin: 3px 0 0; font-size: 12px; color: #475569; line-height: 1.45; }
.xd-tpl input { margin-top: 3px; }
.xd-tpl-date { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 0 14px 12px; font-size: 12.5px; }
.xd-tpl-date input { height: 30px; border: 1px solid var(--xd-line-2); border-radius: var(--xd-r); padding: 0 8px; font: inherit; margin-left: 6px; }

.xd-tpl-bim { display: flex; gap: 8px; align-items: flex-start; margin: 0 14px 12px; padding: 10px 12px; border: 1px dashed #0f766e; border-radius: var(--xd-r); background: #f0fdfa; font-size: 12.5px; cursor: pointer; }
.xd-tpl-bim b { color: #0f766e; white-space: nowrap; }
.xd-tpl-bim:has(input:disabled) { opacity: .5; cursor: not-allowed; }

/* ================================================================== HO SO CONG VIEC DTXD (xd-docs.js) */
.xd-wp { margin: 8px 0 14px; border: 1px solid var(--xd-line); border-radius: var(--xd-r); background: #fff; }
.xd-wp > header { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--xd-line); background: #fafbfc; border-radius: var(--xd-r) var(--xd-r) 0 0; }
.xd-wp > header b { color: var(--xd-navy); font-size: 13.5px; }
.xd-wp > header span { color: var(--xd-muted); font-size: 12px; flex: 1; }
.xd-wp-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.xd-wp-g { padding: 6px 12px 8px; border-right: 1px solid var(--xd-line); border-bottom: 1px solid var(--xd-line); }
.xd-wp-g h5 { margin: 2px 0 6px; font-size: 11.5px; letter-spacing: .4px; text-transform: uppercase; color: var(--xd-muted); font-weight: 700; }
.xd-wp-dl { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 3px 8px; margin: 0; font-size: 12.5px; align-items: center; }
.xd-wp-dl dt { color: var(--xd-muted); }
.xd-wp-dl dd { margin: 0; min-width: 0; font-weight: 600; color: var(--xd-text); word-break: break-word; }
.xd-wp-dl input, .xd-wp-dl select, .xd-wp-dl textarea { width: 100%; box-sizing: border-box; height: 26px; border: 1px solid transparent; border-radius: 4px; padding: 0 6px;
  font: inherit; font-weight: 500; background: #f7f9fc; color: var(--xd-text); }
.xd-wp-dl textarea { height: auto; padding: 4px 6px; resize: vertical; }
.xd-wp-dl input:hover, .xd-wp-dl select:hover, .xd-wp-dl textarea:hover { border-color: var(--xd-line-2); }
.xd-wp-dl input:focus, .xd-wp-dl select:focus, .xd-wp-dl textarea:focus { outline: none; border-color: var(--xd-blue); background: #fff; box-shadow: 0 0 0 2px rgba(21, 101, 192, .15); }
.xd-wp-dl .-saving { background: #fff7d6 !important; } .xd-wp-dl .-err { background: #fde8e8 !important; }
.xd-wp .xd-msg { padding: 4px 12px 6px; min-height: 0; }
.xd-hidden-group { display: none !important; }
.xd-wp-menu { position: relative; display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.xd-dropdown { position: absolute; right: 0; top: calc(100% + 4px); z-index: 50; min-width: 240px; background: #fff; border: 1px solid var(--xd-line-2); border-radius: var(--xd-r);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .18); padding: 4px; display: flex; flex-direction: column; }
.xd-dropdown[hidden] { display: none; }
.xd-dropdown button { text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 4px; font: 500 13px var(--xd-font); color: var(--xd-text); cursor: pointer; white-space: nowrap; }
.xd-dropdown button:hover { background: var(--xd-sky); color: var(--xd-navy); }
.xd-dropdown hr { border: 0; border-top: 1px solid var(--xd-line); margin: 4px 0; }
.xd-ov-docs .xd-msg { padding: 0; font-size: 11.5px; }

/* nam xem so lieu, tien do KH/TT */
.xd-yearsel { height: 28px; border: 1px solid var(--xd-line-2); border-radius: var(--xd-r); padding: 0 6px; font: 600 12.5px var(--xd-font); color: var(--xd-navy); background: #fff; }
.xd-ycard .xd-yearsel { margin-top: 2px; height: 26px; }
.xd-prog { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--xd-muted); }
.xd-prog b { color: #15803d; }
.xd-prog.-late b { color: var(--xd-red); }

/* ================================================================== THEO DOI (xd-track.js) */
.xd-trk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
@media (max-width: 1100px) { .xd-trk { grid-template-columns: 1fr; } }
.xd-trk .xd-panel > header .xd-st { margin-left: auto; }
.xd-trk .xd-panel > header .xs-btn { margin-left: 6px; }
.xd-trk .xd-panel > header .xd-chk { margin-left: auto; font-size: 12px; color: var(--xd-muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.xd-prog-kpi { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--xd-line); }
.xd-prog-kpi > div { padding: 6px 10px; border-right: 1px solid var(--xd-line); }
.xd-prog-kpi > div:last-child { border-right: 0; }
.xd-prog-kpi span { display: block; color: var(--xd-muted); font-size: 11.5px; }
.xd-prog-kpi b { font-size: 17px; color: var(--xd-navy); font-variant-numeric: tabular-nums; }
.xd-scurve { width: 100%; height: 150px; display: block; padding: 4px 6px 0; box-sizing: border-box; }
.xd-scurve .g { stroke: #e5eaf0; stroke-width: 1; }
.xd-scurve text { font: 10px var(--xd-font); fill: #94a3b8; }
.xd-scurve .plan { fill: none; stroke: var(--xd-blue); stroke-width: 2; vector-effect: non-scaling-stroke; }
.xd-scurve .today { stroke: var(--xd-amber); stroke-dasharray: 4 3; stroke-width: 1.5; }
.xd-scurve .pp { fill: var(--xd-blue); } .xd-scurve .aa { fill: #16a34a; stroke: #fff; stroke-width: 2; }
.xd-legend { display: flex; gap: 14px; align-items: center; padding: 2px 12px 6px; font-size: 11.5px; color: var(--xd-muted); }
.xd-legend i { display: inline-block; width: 14px; height: 3px; background: var(--xd-blue); margin-right: 4px; vertical-align: middle; }
.xd-legend i.aa { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; }
.xd-trk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px 12px 10px; border-top: 1px solid var(--xd-line); font-size: 12.5px; }
.xd-trk-two h5 { margin: 0 0 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--xd-muted); }
.xd-trk-two > div > div { padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xd-trk-two a { color: var(--xd-navy); text-decoration: none; }
.xd-trk .op-xd360-kpi { margin: 0; border: 0; border-bottom: 1px solid var(--xd-line); border-radius: 0; }
.xd-trk .op-xd360-card { flex-basis: 30%; min-height: 44px; padding: 5px 10px; border-bottom: 1px solid var(--xd-line); }
.xd-trk .op-xd360-card b { font-size: 16px; }
.xd-tbl tr.-late td { background: #fff5f5; }

/* noi dung du an (muc tieu, quy mo, ket qua, vuong mac) */
.xd-trk .xd-trk-sum { grid-column: 1 / -1; }
.xd-sum-grid { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .xd-sum-grid { grid-template-columns: 1fr; } }
.xd-sum-f { padding: 8px 12px; border-right: 1px solid var(--xd-line); border-bottom: 1px solid var(--xd-line); display: flex; flex-direction: column; gap: 4px; }
.xd-sum-h { display: flex; align-items: center; gap: 8px; }
.xd-sum-h b { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--xd-muted); }
.xd-sum-h .xs-btn { margin-left: auto; height: 24px; font-size: 11.5px; }
.xd-sum-f textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--xd-line); border-radius: 5px; padding: 6px 8px; font: 12.5px/1.5 var(--xd-font); resize: vertical; background: #fbfcfe; color: var(--xd-text); }
.xd-sum-f textarea:focus { outline: none; border-color: var(--xd-blue); background: #fff; box-shadow: 0 0 0 2px rgba(21, 101, 192, .15); }
.xd-sum-f textarea.-saving { background: #fff7d6; }
.xd-sum-f textarea[readonly] { background: #f7f8fa; }

.xs-long { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; }

/* ================================================================== BANG: XUONG DONG, MAT DO (giong Excel) */
.xs-grid td.xs-wrap { white-space: pre-wrap; word-break: break-word; overflow: visible; text-overflow: clip; height: auto; vertical-align: top; line-height: 1.45; padding-top: 4px; padding-bottom: 4px; }
.xs-root.-wrap .xs-grid thead tr:first-child th { white-space: normal; height: auto; min-height: 28px; line-height: 1.25; padding-top: 4px; padding-bottom: 4px; vertical-align: bottom; }
.xs-root.-wrap .xs-grid td:not(.xs-wrap) { vertical-align: top; padding-top: 4px; }
.xs-grid td.xs-wrap .xd-st, .xs-grid td.xs-wrap .xd-bar { vertical-align: middle; }
.xs-root[data-dens="gon"] .xs-grid { font-size: 12px; }
.xs-root[data-dens="gon"] .xs-grid td { height: 23px; padding: 0 5px; }
.xs-root[data-dens="gon"] .xs-grid td.xs-wrap { padding: 2px 5px; }
.xs-root[data-dens="thoang"] .xs-grid { font-size: 13.5px; }
.xs-root[data-dens="thoang"] .xs-grid td { height: 34px; padding: 0 9px; }
.xs-root[data-dens="thoang"] .xs-grid td.xs-wrap { padding: 7px 9px; line-height: 1.55; }
.xs-btn.-on { background: var(--xd-sky); border-color: var(--xd-blue); color: var(--xd-navy); box-shadow: inset 0 0 0 1px var(--xd-blue); }
.xs-bar .xs-dens { width: auto !important; }
.xs-colmenu { min-width: 280px; }
.xs-colhead, .xs-colrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.xs-colhead { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--xd-muted); border-bottom: 1px solid var(--xd-line); padding-bottom: 3px; }
.xs-colrow label { flex: 1; }
.xs-colfoot { display: flex; gap: 6px; border-top: 1px solid var(--xd-line); padding-top: 6px; margin-top: 2px; }
.xs-colfoot .xs-btn { height: 26px; font-size: 11.5px; }
.xs-rs:hover { background: rgba(21, 101, 192, .35); }

/* =====================================================================================================
   LOP TOI GIAN 2026 - tap trung du lieu (ghi de cac lop tren). Cong nghe CSS moi:
   View Transitions (chuyen trang muot), Container Queries (khoi tu sap theo be rong), content-visibility (chi ve phan dang nhin thay),
   :has(), scrollbar-gutter, text-wrap: balance, color-mix(), prefers-reduced-motion.
   ===================================================================================================== */
:root body, html:root {
  --xd-bg: #f6f7f9;
  --xd-line: #e8ebf0;
  --xd-line-2: #dbe0e7;
  --xd-head: #f8f9fb;
  --xd-text: #1d2433;
  --xd-muted: #6b7484;
  --xd-r: 8px;
  --xd-font: "Segoe UI Variable Text", "Segoe UI", "Be Vietnam Pro", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --xd-ease: cubic-bezier(.2, .7, .2, 1);
}
html { scrollbar-gutter: stable; }
body { font-feature-settings: "tnum" 1, "cv11" 1; text-rendering: optimizeLegibility; letter-spacing: -.005em; }
::selection { background: color-mix(in srgb, var(--xd-blue) 22%, transparent); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--xd-blue) 70%, white); outline-offset: 1px; }
h1, h2, .PageHeader-title, .xd-dash-title h1 { text-wrap: balance; }

/* chuyen trang muot (cung nguon) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 140ms; animation-timing-function: var(--xd-ease); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* dau trang: phang, mong */
.op-app-header { border-bottom: 1px solid rgba(255, 255, 255, .08) !important; background: #0d2f52 !important; }
.op-logo .op-logo--link::before { border-radius: 7px; box-shadow: none; }

/* thanh ben: nhe, khong vien manh */
#main-menu { border-right: 1px solid var(--xd-line) !important; }
#main-menu .selected, #main-menu a.selected, #main-menu .main-item-wrapper.selected, #main-menu .main-item-wrapper:has(> a.selected),
#main-menu .op-sidemenu--item-action.selected, #main-menu .op-sidemenu--item-action--selected {
  background: color-mix(in srgb, var(--xd-blue) 9%, white) !important; box-shadow: inset 2px 0 0 var(--xd-blue);
}

/* khoi: vien manh, tieu de khong nen */
.xd-panel, .xs-root, .xd-wp, .widget-box, .op-xd360-kpi { border-color: var(--xd-line) !important; border-radius: var(--xd-r) !important; box-shadow: none !important; }
.xd-panel > header, .xd-wp > header, .xs-bar, .op-widget-box--header, .widget-box--header { background: transparent !important; border-bottom-color: var(--xd-line) !important; }
.xd-panel > header b, .xd-wp > header b, .xs-bar b { font-weight: 600; letter-spacing: -.01em; color: var(--xd-text); }
.xd-panel, .xs-root, .xd-wp { transition: border-color .15s var(--xd-ease); }
.xd-panel:hover { border-color: var(--xd-line-2) !important; }

/* THE CHI SO: cham mau + con so (bo vach mau dam) */
.op-xd360-kpi { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: #fff; }
.op-xd360-card { box-shadow: none !important; border-right: 1px solid var(--xd-line); border-bottom: 1px solid var(--xd-line); padding: 9px 14px !important; min-height: 0 !important; gap: 2px; transition: background .15s var(--xd-ease); }
.op-xd360-card span { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 11.5px; color: var(--xd-muted); }
.op-xd360-card span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.op-xd360-card b { font-size: 20px !important; font-weight: 650; letter-spacing: -.02em; color: var(--xd-text); }
.op-xd360-card[style*="#c62828"] b, .op-xd360-card[style*="#b91c1c"] b, .op-xd360-card[style*="#ea580c"] b { color: var(--c); }
a.op-xd360-card:hover { background: var(--xd-head); }
.xd-ov .op-xd360-kpi, .xd-trk .op-xd360-kpi { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.xd-ov .op-xd360-card b, .xd-trk .op-xd360-card b { font-size: 16px !important; }

/* BANG: nhe, chu so deu, hang hover ro */
.xd-tbl th, .xs-grid thead th, .generic-table thead th { background: var(--xd-head) !important; font-weight: 600 !important; color: #3a4354 !important; }
.xd-tbl tr:nth-child(even) td, .xs-grid tbody tr:nth-child(even) td { background: #fbfcfd; }
.xd-tbl tr:hover td, .xs-grid tbody tr:hover td:not(.xs-sel):not(.xs-act) { background: color-mix(in srgb, var(--xd-blue) 5%, white); }
.xd-tbl td, .xs-grid td { border-color: #eef1f5 !important; }
.xd-tbl, .xs-grid { font-variant-numeric: tabular-nums; }
.xd-st { font-weight: 500 !important; }
.xs-grid td.xs-sel { background: color-mix(in srgb, var(--xd-blue) 12%, white) !important; }

/* nut, o nhap: phang */
.xs-btn, .Button, .button { transition: background .15s var(--xd-ease), border-color .15s var(--xd-ease); }
.xs-btn { border-color: var(--xd-line-2); font-weight: 500; }
.xs-btn.-primary { font-weight: 600; }

/* HIEU NANG: chi ve khoi khi gan khung nhin (trang dai nhieu bang) */
.xd-dash-grid > .xd-panel, .xd-trk-ov > .xd-panel:not(.xd-trk-sum), .xd-media > .xd-panel { content-visibility: auto; contain-intrinsic-size: auto 380px; }
.xs-grid { contain: layout paint; }
.xs-root.-virt .xs-grid tbody td { white-space: nowrap; }
.xs-grid tr.xs-spc td { padding: 0 !important; border: 0 !important; background: transparent !important; height: 0; }

/* CONTAINER QUERIES: khoi tu sap theo be rong thuc (khong phu thuoc man hinh) */
.xd-panel { container-type: inline-size; }
@container (max-width: 560px) {
  .xd-prog-kpi { grid-template-columns: 1fr 1fr !important; }
  .xd-trk-two { grid-template-columns: 1fr !important; }
  .xd-kv { grid-template-columns: max-content minmax(0, 1fr) !important; }
  .xd-sum-grid { grid-template-columns: 1fr !important; }
}

/* KHUNG CHO (skeleton) khi dang tai */
.xd-skel { margin: 0 0 12px; }
.xd-skel-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--xd-line); border: 1px solid var(--xd-line); border-radius: var(--xd-r); overflow: hidden; }
.xd-skel-kpi i, .xd-skel-grid b { display: block; height: 54px; background: linear-gradient(90deg, #f3f5f8 0%, #fafbfc 40%, #f3f5f8 80%) 0 0 / 200% 100%; animation: xd-shimmer 1.2s linear infinite; }
.xd-skel-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; margin-top: 12px; }
.xd-skel-grid b { height: 300px; border: 1px solid var(--xd-line); border-radius: var(--xd-r); }
@keyframes xd-shimmer { to { background-position: -200% 0; } }

/* cuon mong, mau trung tinh */
* { scrollbar-color: #cdd3dc transparent; }
.xd-dash-title .xd-yearsel, .xd-ycard .xd-yearsel { width: auto !important; max-width: 190px; flex: none; }
.xd-dash-title { align-items: center !important; }
.op-xd360-card span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================================================================== DANH MUC DU AN: GON, TAP TRUNG BANG (v27) */
body.controller-projects.action-index .information-section,
body.controller-projects.action-index .project-list-page > p.information-section { display: none !important; }   /* "… dự án sử dụng dung lượng đĩa …" */
body.controller-projects.action-index .PageHeader { margin-bottom: 6px !important; }
body.controller-projects.action-index .PageHeader-title { font-size: 16px !important; }
body.controller-projects.action-index .op-xd360-kpi { margin-bottom: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
body.controller-projects.action-index .op-xd360-card { padding: 6px 12px !important; }
body.controller-projects.action-index .op-xd360-card b { font-size: 16px !important; }
body.controller-projects.action-index .op-xd360-card span { font-size: 11px; }
.xs-root { margin-bottom: 8px; }
.xs-bar { gap: 6px; padding: 6px 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 6; background: #fff !important; border-radius: var(--xd-r) var(--xd-r) 0 0; }
.xs-search { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--xd-line-2); border-radius: 999px; background: var(--xd-head); min-width: 240px; flex: 0 1 300px; }
.xs-search:focus-within { border-color: var(--xd-blue); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--xd-blue) 15%, transparent); }
.xs-search span { color: var(--xd-muted); font-size: 15px; }
.xs-bar .xs-search input.xs-q { border: 0 !important; background: transparent !important; height: 28px; padding: 0 !important; width: 100% !important; outline: none; box-shadow: none !important; }
.xs-fltbtn { display: inline-flex; align-items: center; gap: 6px; }
.xs-badge { background: var(--xd-blue); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 18px; cursor: pointer; }
.xs-badge:hover { background: var(--xd-red); }
.xs-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.xs-chip { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--xd-line-2); background: #fff; color: #3a4354; font: 500 12px var(--xd-font); cursor: pointer; white-space: nowrap; transition: all .12s var(--xd-ease); }
.xs-chip:hover { border-color: var(--xd-blue); color: var(--xd-navy); }
.xs-chip.-on { background: var(--xd-navy); border-color: var(--xd-navy); color: #fff; }
.xs-count { color: var(--xd-muted); font-size: 12px; white-space: nowrap; margin-right: 4px; }
.xs-count b { color: var(--xd-text); font-weight: 650; }
.xs-bar select { height: 30px !important; max-width: 190px; width: auto !important; border-radius: 6px !important; }
.xs-more { position: relative; }
.xs-icon { width: 32px; padding: 0 !important; font-size: 16px; line-height: 1; }
.xs-more .xd-dropdown { min-width: 250px; }
.xs-more .xd-dropdown button.-on { color: var(--xd-blue); font-weight: 600; }
.xs-dd-dens { display: flex; align-items: center; gap: 4px; padding: 5px 10px; font-size: 12px; color: var(--xd-muted); }
.xs-dd-dens span { flex: 1; }
.xs-dd-dens button { padding: 3px 8px !important; border: 1px solid var(--xd-line-2) !important; border-radius: 5px; font-size: 12px !important; }
.xs-dd-dens button.-on { background: var(--xd-navy) !important; color: #fff !important; border-color: var(--xd-navy) !important; }
.xs-foot:empty { display: none; }
.xs-wrap { max-height: calc(100vh - 210px); }
.xs-keys { display: grid; gap: 6px; padding: 12px 16px 16px; font-size: 13px; }
.xs-keys div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dashed var(--xd-line); padding-bottom: 5px; }
.xs-keys kbd { font: 600 12px var(--xd-font); background: var(--xd-head); border: 1px solid var(--xd-line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 7px; }
@media (max-width: 900px) { .xs-chips { order: 9; width: 100%; } .xs-search { flex: 1 1 200px; } }
body.xs-sheet-on .xd-ycard { display: none !important; }   /* nam da co tren thanh cong cu bang */

/* ===== v31: thanh cong cu 1 hang, the tong quan dang dai (thu gon duoc), che do mo rong toan man hinh ===== */
@media (min-width: 901px) {
  .xs-bar { flex-wrap: nowrap; }
  .xs-search { flex: 0 4 260px; min-width: 140px; }
  .xs-chips { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 92%, transparent); }
  .xs-chips::-webkit-scrollbar { display: none; }
  .xs-bar select { flex: 0 1 auto; min-width: 0 !important; }
  .xs-bar .xs-year { min-width: 88px !important; } .xs-bar .xs-cdt { max-width: 200px !important; min-width: 110px !important; } .xs-bar .xs-group { max-width: 120px !important; }
}
.xs-chip { height: 24px; padding: 0 9px; font-size: 11.5px; }
.xs-bar .xs-btn, .xs-bar select { height: 28px !important; }
.xs-bar .xs-btn { white-space: nowrap; }
.xs-icon.-on { background: var(--xd-sky) !important; color: var(--xd-navy) !important; border-color: color-mix(in srgb, var(--xd-blue) 35%, transparent) !important; }
/* the tong quan: 1 dai mong, cuon ngang khi hep */
body.controller-projects.action-index .op-xd360-kpi { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); overflow-x: auto; scrollbar-width: thin; }
body.controller-projects.action-index .op-xd360-card { padding: 5px 10px !important; border-bottom: 0 !important; white-space: nowrap; }
body.controller-projects.action-index .op-xd360-card span { overflow: hidden; text-overflow: ellipsis; }
body.controller-projects.action-index .op-xd360-card b { font-size: 15px !important; }
body.xs-sheet-on.xs-kpi-off .op-xd360-kpi, body.xs-sheet-on.xs-kpi-off .xd-skel { display: none !important; }
/* che do mo rong: bang phu toan man hinh, Esc de thu lai */
html:has(body.xs-max), body.xs-max { overflow: hidden !important; }
.xs-root.-max { position: fixed; inset: 0; z-index: 950; margin: 0; border-radius: 0 !important; border: 0; height: 100dvh; view-transition-name: xs-sheet; }
.xs-root.-max .xs-bar { border-radius: 0; padding: 6px 12px; }
.xs-root.-max .xs-wrap { max-height: none; flex: 1 1 auto; min-height: 0; }
.xs-root.-max .xs-colmenu { top: 44px; }
::view-transition-group(xs-sheet) { animation-duration: .22s; }

/* ===== v34: bang lap day man hinh, thu hep khoang trong ===== */
body.xs-sheet-on .xs-wrap { max-height: none; }                      /* chieu cao do JS tinh = phan con lai cua man hinh */
body.xs-sheet-on .xs-root { margin-bottom: 0; }
body.xs-sheet-on.controller-projects.action-index #content-body { padding-top: 6px !important; padding-bottom: 0 !important; }
body.xs-sheet-on.controller-projects.action-index .PageHeader { margin: 0 0 4px !important; padding: 0 !important; display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; min-height: 0 !important; }
body.xs-sheet-on.controller-projects.action-index .PageHeader-titleBar { flex: 1 1 auto; }
body.xs-sheet-on.controller-projects.action-index .PageHeader-contextBar { margin: 0 !important; min-height: 0 !important; }
body.xs-sheet-on.controller-projects.action-index .PageHeader-breadcrumbs { display: none !important; }
body.xs-sheet-on.controller-projects.action-index .PageHeader-titleBar { margin: 0 !important; min-height: 0 !important; }
body.xs-sheet-on.controller-projects.action-index .PageHeader-title { font-size: 15px !important; line-height: 28px !important; }
body.xs-sheet-on.controller-projects.action-index .PageHeader-actions .Button { height: 28px; }
/* dai the tong quan: chia deu chieu rong, khong thanh cuon */
body.controller-projects.action-index .op-xd360-kpi { grid-auto-columns: minmax(0, 1fr) !important; overflow: hidden !important; margin-bottom: 6px !important; }
body.controller-projects.action-index .op-xd360-card { min-width: 0; padding: 4px 10px !important; }
body.controller-projects.action-index .op-xd360-card span { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px !important; }
body.controller-projects.action-index .op-xd360-card b { font-size: 14px !important; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { body.controller-projects.action-index .op-xd360-kpi { grid-auto-columns: minmax(104px, 1fr) !important; overflow-x: auto !important; scrollbar-width: none; } }

/* ===== v36: thoi gian thuc hien — bo chon moc Ngay / Thang / Quy / Nam ===== */
.xd-tgp { position: fixed; z-index: 1200; width: 272px; background: #fff; border: 1px solid var(--xd-line-2); border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); padding: 10px; font: 13px var(--xd-font); color: var(--xd-text); outline: none; }
.xd-tgp-t { font-weight: 600; font-size: 12px; color: var(--xd-muted); margin: 0 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xd-tgp-seg { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--xd-head); border-radius: 7px; padding: 2px; gap: 2px; margin-bottom: 10px; }
.xd-tgp-seg button { border: 0; background: none; border-radius: 5px; padding: 5px 0; font: 500 12.5px var(--xd-font); color: #3a4354; cursor: pointer; }
.xd-tgp-seg button.-on { background: #fff; color: var(--xd-navy); font-weight: 650; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.xd-tgp-b { display: grid; gap: 8px; }
.xd-tgp-y { display: flex; align-items: center; gap: 4px; }
.xd-tgp-y span { flex: 1; color: var(--xd-muted); font-size: 12px; }
.xd-tgp-y input { width: 76px; height: 30px; text-align: center; border: 1px solid var(--xd-line-2); border-radius: 6px; font: 600 14px var(--xd-font); }
.xd-tgp-y button { width: 28px; height: 30px; border: 1px solid var(--xd-line-2); background: #fff; border-radius: 6px; cursor: pointer; font-size: 15px; }
.xd-tgp-grid { display: grid; gap: 4px; }
.xd-tgp-grid.-m { grid-template-columns: repeat(4, 1fr); }
.xd-tgp-grid.-q { grid-template-columns: repeat(2, 1fr); }
.xd-tgp-grid button { border: 1px solid var(--xd-line-2); background: #fff; border-radius: 6px; padding: 6px 0; font: 500 12.5px var(--xd-font); cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.xd-tgp-grid button small { font-size: 10.5px; color: var(--xd-muted); }
.xd-tgp-grid button:hover { border-color: var(--xd-blue); }
.xd-tgp-grid button.-on { background: var(--xd-navy); border-color: var(--xd-navy); color: #fff; }
.xd-tgp-grid button.-on small { color: #cbd5e1; }
.xd-tgp-d { height: 32px; border: 1px solid var(--xd-line-2); border-radius: 6px; padding: 0 8px; font: 14px var(--xd-font); }
.xd-tgp-v { min-height: 18px; margin: 8px 2px 0; font-size: 12px; color: var(--xd-navy); }
.xd-tgp-v.-err { color: var(--xd-red); }
.xd-tgp footer { display: flex; gap: 6px; margin-top: 8px; border-top: 1px solid var(--xd-line); padding-top: 8px; }
.xd-tgp footer span { flex: 1; }
.xd-tgp footer button { border: 1px solid var(--xd-line-2); background: #fff; border-radius: 6px; padding: 4px 10px; font: 500 12.5px var(--xd-font); cursor: pointer; }
.xd-tgp footer button.-primary { background: var(--xd-blue); border-color: var(--xd-blue); color: #fff; }
.xd-tgp footer [data-a="clear"] { color: var(--xd-red); }
.xs-tgin { display: flex; gap: 4px; }
.xs-tgin input { flex: 1; min-width: 0; }
.xs-tgin .xs-btn { padding: 0 8px; }
.xs-tginfo { font-size: 12.5px; color: var(--xd-navy); padding: 0 2px; min-height: 0; }
.xs-tginfo:empty { display: none; }
.xs-tginfo.-err { color: var(--xd-red); }
.xs-bad { color: var(--xd-red); text-decoration: underline wavy; text-underline-offset: 3px; }
.xs-colnote { font-size: 11.5px; color: var(--xd-muted); padding: 6px 10px; border-bottom: 1px solid var(--xd-line); line-height: 1.45; max-width: 300px; }
.xs-dd-view { font-size: 11.5px; color: var(--xd-muted); padding: 4px 10px 6px; border-bottom: 1px solid var(--xd-line); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.xs-opv-ok { color: #15803d !important; font-weight: 600; } .xs-opv-body { padding: 12px 16px; font-size: 13px; line-height: 1.55; } .xs-opv-body p { margin: 0 0 8px; }
/* v42: di chuyen cot */
.xs-grid thead tr:first-child th[data-sort]:not(.xs-fz) { cursor: grab; }
body.xs-coldrag, body.xs-coldrag * { cursor: grabbing !important; user-select: none !important; }
.xs-grid th.xs-dragging { opacity: .45; background: var(--xd-sky) !important; }
.xs-dropmark { position: absolute; width: 3px; background: var(--xd-blue); border-radius: 2px; z-index: 30; pointer-events: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--xd-blue) 25%, transparent); }
.xs-colrow { display: flex; align-items: center; gap: 4px; }
.xs-colrow label { flex: 1; min-width: 0; }
.xs-mvb { display: inline-flex; gap: 2px; width: 46px; flex: 0 0 46px; }
.xs-mvb button { width: 22px; height: 20px; padding: 0; border: 1px solid var(--xd-line-2); background: #fff; border-radius: 4px; font-size: 11px; line-height: 1; cursor: pointer; color: #3a4354; }
.xs-mvb button:hover { border-color: var(--xd-blue); color: var(--xd-navy); background: var(--xd-sky); }
.xd-ov-edit { margin-left: auto; height: 26px !important; padding: 0 10px !important; font-size: 12.5px !important; }
.xd-ov-nc { margin-left: auto; height: 26px !important; padding: 0 10px !important; font-size: 12.5px !important; display: inline-flex !important; align-items: center; text-decoration: none !important; }
.xd-ov-edit + .xd-ov-nc { margin-left: 6px; }
/* v44: cong thong tin nganh Xay dung Quang Ngai (thay lien ket tro giup OpenProject) */
section.homescreen--links.xd-portals { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; padding: 8px 0; }
.xd-portal { display: flex !important; align-items: center; gap: 10px; padding: 10px 12px !important; border: 1px solid var(--xd-line); border-radius: var(--xd-r); background: #fff; color: var(--xd-navy) !important; text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.xd-portal:hover { border-color: var(--xd-blue); box-shadow: 0 2px 10px rgba(15, 23, 42, .08); }
.xd-portal svg { flex: 0 0 auto; color: var(--xd-blue); }
.xd-portal span { display: flex; flex-direction: column; min-width: 0; }
.xd-portal b { font-size: 13.5px; font-weight: 650; }
.xd-portal small { font-size: 11.5px; color: var(--xd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xd-help-head { padding: 8px 12px 4px; font-size: 11.5px; font-weight: 600; color: var(--xd-muted); text-transform: uppercase; letter-spacing: .02em; }
.xd-help-sub { display: block; font-size: 11.5px; color: var(--xd-muted); font-weight: 400; }
/* v45: menu Cong cu BIM tren trang BCF / trinh xem 3D */
.xd-bimtools { position: relative; }
.xd-bt-btn { white-space: nowrap; }
.xd-bt-dd { right: 0; left: auto; min-width: 330px; z-index: 60; }
.xd-bt-dd button { display: flex !important; gap: 10px; align-items: flex-start; white-space: normal !important; padding: 8px 10px !important; width: 100%; }
.xd-bt-dd .xd-bt-ic { font-size: 18px; line-height: 1.2; }
.xd-bt-dd b { display: block; font-size: 13px; color: var(--xd-navy); }
.xd-bt-dd small { display: block; font-size: 11.5px; color: var(--xd-muted); font-weight: 400; }
/* v50: nut mo tep dinh kem (ONLYOFFICE / trinh xem CAD) */
.xd-ofx { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 8px; border: 1px solid var(--xd-line-2); border-radius: 99px; font-size: 11.5px; font-weight: 600;
  color: var(--xd-navy) !important; background: #fff; text-decoration: none !important; white-space: nowrap; vertical-align: middle; line-height: 18px; }
.xd-ofx:hover { border-color: var(--xd-blue); background: var(--xd-sky); }

/* Ho so CDE (xd-cde.js): so yeu cau cho xem xet tren menu du an */
.xd-cde-bd { margin-left: auto; min-width: 18px; padding: 0 6px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }

/* ================================================================== BANG CONG VIEC - HIEN DAI (17/10/2026)
   Dong thoang 40px (bien chung voi Gantt -> dong thoi gian van khop), chi ke ngang, tieu de cot nho gon,
   ID "#77", Loai = the mau, Trang thai = nhan bo tron (cham mau goc OpenProject + nen theo NHOM nghia),
   Do uu tien = cham + chu, dong chon / di chuot co vach nhan trai. Chi ap cho bang cong viec (.work-package-table). */
:root body, html:root { --table-timeline--row-height: 40px; }
.work-packages-split-view--tabletimeline-side, .work-packages-tabletimeline--table-side, .wp-table--container {
  border-radius: 10px !important; border-color: #e5e9f0 !important; box-shadow: 0 1px 2px rgba(16, 24, 40, .04) !important;
}
table.work-package-table { font-size: 13.5px !important; color: #1f2937; }
table.work-package-table thead th {
  background: #f8fafc !important; height: 36px !important; border-right: 0 !important; border-bottom: 1px solid #e5e9f0 !important;
  font-size: 11.5px !important; font-weight: 600 !important; letter-spacing: .02em !important; padding: 0 10px !important;
}
table.work-package-table thead th a, table.work-package-table thead th span, table.work-package-table thead th .sort { color: #64748b !important; text-transform: uppercase !important; }
table.work-package-table thead th a.sort.asc, table.work-package-table thead th a.sort.desc { color: var(--xd-navy) !important; }
table.work-package-table thead th .generic-table--sort-header-outer, table.work-package-table thead th .generic-table--sort-header,
table.work-package-table .generic-table--empty-header { line-height: 36px !important; height: 36px !important; }
table.work-package-table td.wp-table--cell-td { height: 40px !important; padding: 0 10px !important; border-right: 0 !important; border-bottom: 1px solid #eef1f5 !important; vertical-align: middle; }
table.work-package-table tbody tr:nth-child(even) td { background: #fff; }
table.work-package-table tbody tr.wp--row { transition: background-color .12s; }
table.work-package-table tbody tr.wp--row:hover td { background: #f6f9fd !important; }
table.work-package-table tbody tr.wp--row:hover td:first-child, table.work-package-table tbody tr.wp--row.-checked td:first-child { box-shadow: inset 3px 0 0 var(--xd-blue); }
table.work-package-table tbody tr.wp--row.-checked td { background: #eef4ff !important; }
table.work-package-table .wp-table--drag-and-drop-handle { opacity: 0; transition: opacity .12s; color: #94a3b8; }
table.work-package-table tr.wp--row:hover .wp-table--drag-and-drop-handle { opacity: 1; }

/* ID + chu de */
table.work-package-table td.id a { color: #64748b !important; font-weight: 500; font-size: 12.5px; text-decoration: none !important; }
table.work-package-table td.id a::before { content: "#"; opacity: .55; margin-right: 1px; }
table.work-package-table tr.wp--row:hover td.id a { color: var(--xd-blue) !important; }
table.work-package-table td.subject .inline-edit--display-field { font-weight: 500; color: #111827; }
table.work-package-table tr.wp--row:hover td.subject .inline-edit--display-field { color: var(--xd-navy); }
table.work-package-table .wp-table--hierarchy-indicator, table.work-package-table .wp-table--leaf-indicator { color: #94a3b8; }

/* Loai: the mau (mau chu cua loai -> nen nhat cung mau) */
table.work-package-table td.type .inline-edit--display-field {
  display: inline-flex !important; align-items: center; height: 22px; padding: 0 8px !important; border-radius: 6px;
  font-size: 11px !important; font-weight: 700 !important; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
  background: color-mix(in srgb, currentColor 10%, #fff); border: 1px solid color-mix(in srgb, currentColor 22%, #fff);
}

/* Trang thai: nhan bo tron; cham = mau goc OpenProject; nen theo nhom nghia (theo ten trang thai) */
table.work-package-table td.status .inline-edit--display-field {
  display: inline-flex !important; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px !important; border-radius: 999px;
  font-size: 12px !important; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  background: #f1f5f9; color: #334155 !important; border: 1px solid #e2e8f0;
}
table.work-package-table td.status .inline-edit--display-field::before { width: 8px !important; height: 8px !important; min-width: 8px; border-radius: 50% !important; margin: 0 !important; border: 0 !important; }
table.work-package-table td.status [title="Mới"] { background: #eef6ff; border-color: #cfe3fb; color: #1d4f91 !important; }
table.work-package-table td.status :is([title^="Đang"], [title="Đã đề nghị nghiệm thu"], [title="Đã gửi Kho bạc"], [title="Đã báo cáo cấp có thẩm quyền"]) { background: #fff7e8; border-color: #fbe1b0; color: #8a5300 !important; }
table.work-package-table td.status :is([title="Chờ thẩm định / phê duyệt"], [title="Đã phê duyệt KQLCNT"]) { background: #f3efff; border-color: #ddd3fb; color: #5b3cc4 !important; }
table.work-package-table td.status :is([title="Yêu cầu chỉnh sửa"], [title="Tạm dừng"]) { background: #fff1ec; border-color: #fbd3c3; color: #a2411b !important; }
table.work-package-table td.status :is([title="Đã phê duyệt"], [title="Đã nghiệm thu"], [title="Đã giải ngân"], [title="Đã thanh lý hợp đồng"], [title="Hoàn thành"], [title="Đã xử lý"], [title="Đã báo cáo kết quả"]) { background: #ecfbf3; border-color: #c4ecd6; color: #13703f !important; }
table.work-package-table td.status [title="Không phê duyệt"] { background: #fdeeee; border-color: #f6caca; color: #a61b1b !important; }
table.work-package-table td.status :is([title="Đã đóng"], [title="Hủy bỏ"]) { background: #f4f5f7; border-color: #e3e6ea; color: #6b7280 !important; }
table.work-package-table td.status [title="Hủy bỏ"] { text-decoration: line-through; text-decoration-color: rgba(107, 114, 128, .5); }

/* Do uu tien: cham + chu nho; cao / quan trong noi bat */
table.work-package-table td.priority .inline-edit--display-field { display: inline-flex !important; align-items: center; gap: 6px; font-size: 12.5px !important; color: #475569 !important; }
table.work-package-table td.priority .inline-edit--display-field::before { width: 8px !important; height: 8px !important; min-width: 8px; border-radius: 2px !important; margin: 0 !important; }
table.work-package-table td.priority [title="cao" i] { color: #b45309 !important; font-weight: 600; }
table.work-package-table td.priority [title="quan trọng" i] { color: #b91c1c !important; font-weight: 700; }

/* Nguoi thuc hien / ngay / so */
table.work-package-table td.-contains-avatar .op-avatar, table.work-package-table .op-principal--avatar { width: 24px !important; height: 24px !important; min-width: 24px !important; max-width: 24px !important; line-height: 24px !important; font-size: 10px !important; box-shadow: 0 0 0 2px #fff; }
table.work-package-table td.-contains-avatar .op-principal--name { font-size: 13px; color: #334155; }
table.work-package-table td.-contains-avatar .custom-option.-empty, table.work-package-table .inline-edit--display-field.-placeholder { color: #cbd5e1 !important; }
table.work-package-table :is(td.startDate, td.dueDate, td.date, td.createdAt, td.updatedAt) .inline-edit--display-field { color: #475569 !important; font-size: 12.5px !important; font-variant-numeric: tabular-nums; }
table.work-package-table :is(td.estimatedTime, td.remainingTime, td.spentTime, td.percentageDone) { text-align: right; font-variant-numeric: tabular-nums; }

/* Dong nhom (group by) + dong tong */
table.work-package-table tr.-group-header td, table.work-package-table .wp-table--group-header td { background: #f8fafc !important; height: 36px !important; border-bottom: 1px solid #e5e9f0 !important; }
table.work-package-table .wp-table--group-header .group--value, table.work-package-table tr.-group-header .group--value { font-weight: 700; color: var(--xd-navy); }
table.work-package-table .wp-table--group-header .count { background: #e8eef6; color: #334155; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; }
table.work-package-table tr.wp-table--sums-row td, table.work-package-table tr.sum td { background: #f8fafc !important; font-weight: 700; border-top: 1px solid #e5e9f0 !important; }

/* Dong "+ Tao goi cong viec moi" + chan bang */
table.work-package-table .wp-inline-create-button-row td { height: 40px !important; border-bottom: 0 !important; }
table.work-package-table .wp-inline-create--add-link { color: var(--xd-blue) !important; font-weight: 600; font-size: 13px; }
table.work-package-table .wp-inline-create-button-row:hover td { background: #f6f9fd !important; }

/* thanh cong cu + tieu de truy van */
body.controller-work_packages .editable-toolbar-title--input { font-size: 20px !important; letter-spacing: -.01em; }
body.controller-work_packages .toolbar-item .button, body.controller-work_packages .toolbar-item .Button { border-radius: 8px !important; }

/* trinh xem 3D OpenProject: nut "🗺 WebGIS" (xd-cde.js) - bat / tat mo hinh CDE tren ban do WebGIS */
.xd-wg3d { position: relative; }
.xd-wg3d-pn { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; width: 380px; max-height: 60vh; overflow: auto; background: #fff; border: 1px solid #e5e9f0; border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 23, 42, .16); padding: 6px; font-size: 13px; }
.xd-wg3d-h { font-weight: 700; color: var(--xd-navy); padding: 6px 8px 8px; border-bottom: 1px solid #eef1f5; margin-bottom: 4px; }
.xd-wg3d-r { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.xd-wg3d-r:hover { background: #f6f9fd; }
.xd-wg3d-r.cur { box-shadow: inset 3px 0 0 var(--xd-blue); background: #f3f7ff; }
.xd-wg3d-r.busy { opacity: .55; cursor: progress; }
.xd-wg3d-r label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.xd-wg3d-r label b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.xd-wg3d-r label span { color: #64748b; font-size: 12px; flex: none; }
.xd-wg3d-r a { flex: none; font-weight: 600; font-size: 12px; color: var(--xd-blue); text-decoration: none; }
.xd-wg3d-m { color: #64748b; font-size: 12px; padding: 6px 8px; }
/* trang Mô hình IFC: mot cua vao qua Hồ sơ CDE */
.xd-ifc-cde { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #eff6ff; border: 1px solid #bfdbfe; color: #0b3b66; font-size: 13.5px; line-height: 1.5; }
.xd-ifc-cde a { font-weight: 600; }
/* trang cong viec: ho so CDE dau ra (BIM – CDE) */
.xd-dv { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: #f0f9ff; border: 1px solid #bae6fd; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.xd-dv-ct { padding: 1px 8px; border-radius: 12px; background: #fff; border: 1px solid #cbd5e1; text-decoration: none; font-family: ui-monospace, monospace; font-size: 12px; }
.xd-dv-tt { font-family: system-ui; font-weight: 700; color: #fff; border-radius: 6px; padding: 0 5px; background: #64748b; }
.xd-tt-S { background: #2563eb; } .xd-tt-P { background: #16a34a; } .xd-tt-W { background: #94a3b8; }
.xd-dv-mut { color: #64748b; } .xd-dv-sua { margin-left: auto; font-weight: 600; }

/* ================================================================== KHONG QUANG CAO / BAN QUYEN ENTERPRISE (giu thong bao giay phep nguon mo: xd-brand.js) */
.op-enterprise-banner-container, .op-enterprise-banner, .upsell-colored, .upsell-colored-text, .op-enterprise-banner--upsell-buttons,
#main-menu li:has(> a.enterprise-menu-item), #main-menu a.enterprise-menu-item, #content-body a.menu-block[href*="/admin/enterprise"] { display: none !important; }
.xd-ee-note { margin: 24px auto; max-width: 560px; padding: 16px 20px; border: 1px dashed #cbd5e1; border-radius: 12px; color: #64748b; text-align: center; background: #f8fafc; }

/* CDE / Khong gian BIM nhung trong khung OpenProject (xd-cde.js ?xd=cde | ?xd=bim) */
main#content-wrapper.xd-nhung-vung { position: relative; padding: 0 !important; overflow: hidden; }
main#content-wrapper.xd-nhung-vung > iframe.xd-nhung { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #f4f6fb; }

/* ===================================================================== VO MOT CUA (xd-shell.js): Viec cua toi + Tim nhanh Ctrl+K */
button.op-xd360-back { border: 0; background: transparent; cursor: pointer; font: inherit; }
.xd-tim-btn span { display: none; }
.xd-tim-btn kbd { font: 600 10px/1 var(--xd-font); padding: 3px 5px; border-radius: 4px; background: rgba(255,255,255,.14); color: rgba(255,255,255,.85); margin-left: 4px; }
.xd-viec-btn { position: relative; }
.xd-viec-btn .xd-so { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--xd-amber); color: #1f2937; font: 700 11px/18px var(--xd-font); text-align: center; margin-left: 4px; }
.xd-viec-btn .xd-so.-qua { background: var(--xd-red); color: #fff; }
@media (max-width: 1100px) { .xd-tim-btn kbd { display: none; } }
.xd-ngan, .xd-tim { position: fixed; inset: 0; z-index: 3000; font: 13px/1.45 var(--xd-font); color: var(--xd-text); }
.xd-ngan-nen { position: absolute; inset: 0; background: rgba(15, 25, 45, .32); }
.xd-ngan aside { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; box-shadow: var(--xd-shadow, 0 12px 40px rgba(15,30,60,.22)); display: flex; flex-direction: column; animation: xdVao .16s ease-out; }
@keyframes xdVao { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.xd-ngan header { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--xd-line); }
.xd-ngan header b { font-size: 15px; }
.xd-ngan header span { color: var(--xd-muted); flex: 1; font-size: 12px; }
.xd-ngan header button { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: var(--xd-muted); padding: 2px 6px; border-radius: 4px; }
.xd-ngan header button:hover { background: var(--xd-head); color: var(--xd-text); }
.xd-ngan-than { overflow: auto; flex: 1; padding: 4px 0 16px; }
.xd-ngan h4 { margin: 12px 16px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--xd-muted); }
.xd-ngan h4 i { font-style: normal; background: var(--xd-head); border-radius: 8px; padding: 0 6px; margin-left: 4px; }
a.xd-viec { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 8px 16px; color: var(--xd-text) !important; text-decoration: none !important; border-left: 3px solid transparent; }
a.xd-viec:hover { background: var(--xd-sky); border-left-color: var(--xd-blue); }
a.xd-viec b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.xd-viec span:not(.xd-han) { grid-column: 1; color: var(--xd-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xd-han { grid-row: 1; grid-column: 2; font-size: 11px; color: var(--xd-muted); white-space: nowrap; }
.xd-han.-qua { color: var(--xd-red); font-weight: 600; }
.xd-trong { padding: 24px 16px; color: var(--xd-muted); text-align: center; }
.xd-tim-hop { position: absolute; left: 50%; top: 12vh; transform: translateX(-50%); width: min(640px, calc(100vw - 32px)); background: #fff; border-radius: 10px; box-shadow: var(--xd-shadow, 0 12px 40px rgba(15,30,60,.22)); overflow: hidden; animation: xdNoi .12s ease-out; }
@keyframes xdNoi { from { transform: translate(-50%, -6px); opacity: .5; } to { transform: translateX(-50%); opacity: 1; } }
.xd-tim-hop label { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--xd-line); color: var(--xd-muted); margin: 0; }
.xd-tim-hop input { flex: 1; border: 0 !important; outline: 0 !important; box-shadow: none !important; font: 15px var(--xd-font); padding: 14px 0; background: transparent; }
.xd-tim-kq { max-height: 52vh; overflow: auto; padding: 6px; }
a.xd-kq { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--xd-text) !important; text-decoration: none !important; }
a.xd-kq.-chon, a.xd-kq:hover { background: var(--xd-sky); }
a.xd-kq b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
a.xd-kq span { color: var(--xd-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xd-loai { font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 6px; border-radius: 4px; background: var(--xd-head); color: var(--xd-muted); flex: none; width: 74px; text-align: center; }
.xd-loai.-du_an { background: #e8f0fe; color: var(--xd-blue); }
.xd-loai.-cong_viec { background: #fff4e0; color: #8a5a00; }
.xd-loai.-ho_so { background: #e6f4ea; color: var(--xd-green, #2e7d32); }
.xd-tim-hop footer { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--xd-line); color: var(--xd-muted); font-size: 11px; background: var(--xd-head); }
.xd-tim-hop kbd { font: 600 10px var(--xd-font); border: 1px solid var(--xd-line-2); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; background: #fff; margin-right: 3px; }
main#content-wrapper.xd-nhung-vung > iframe.xd-nhung[hidden] { display: none; }

/* ===================================================================== TRANG CHU THEO VAI TRO «Hôm nay của bạn» (xd-shell.js) */
.xd-homnay { margin: 0 0 16px; padding: 16px 18px; background: #fff; border: 1px solid var(--xd-line); border-radius: 10px; font-family: var(--xd-font); color: var(--xd-text); }
.xd-homnay > header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.xd-homnay > header > div { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.xd-homnay h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--xd-navy); }
.xd-vai { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: var(--xd-sky); color: var(--xd-navy); padding: 3px 8px; border-radius: 10px; }
.xd-vai.-cq { background: #fff4e0; color: #8a5a00; }
.xd-da-chinh { font-size: 12px; color: var(--xd-muted); }
.xd-mo-viec { border: 1px solid var(--xd-line-2); background: #fff; border-radius: 6px; padding: 6px 12px; cursor: pointer; font: 600 12px var(--xd-font); color: var(--xd-blue); white-space: nowrap; }
.xd-mo-viec:hover { background: var(--xd-sky); }
.xd-o4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.xd-o { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--xd-line); border-left: 4px solid var(--xd-line-2); border-radius: 8px; background: #fff; cursor: pointer; font-family: var(--xd-font); text-align: left; }
.xd-o:hover { background: var(--xd-sky); }
.xd-o b { font-size: 24px; line-height: 1.1; color: var(--xd-muted); }
.xd-o span { font-size: 12px; color: var(--xd-muted); }
.xd-o i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--xd-red); }
.xd-o.-co { border-left-color: var(--xd-blue); } .xd-o.-co b { color: var(--xd-navy); }
.xd-o.-qua { border-left-color: var(--xd-red); } .xd-o.-qua b { color: var(--xd-red); }
.xd-hn-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.xd-hn-2 h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--xd-muted); }
.xd-hn-ds a.xd-viec { padding: 7px 10px; border-radius: 6px; }
.xd-hn-ds .xd-trong { padding: 14px; text-align: left; }
.xd-hn-lt { display: flex; flex-direction: column; gap: 4px; }
a.xd-lt { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: var(--xd-text) !important; text-decoration: none !important; font-weight: 600; }
a.xd-lt:hover { background: var(--xd-sky); color: var(--xd-navy) !important; }
a.xd-lt i { font-style: normal; width: 22px; text-align: center; }
.xd-hn-lt h4:not(:first-child) { margin-top: 10px; }
.xd-da-ds { display: flex; flex-wrap: wrap; gap: 6px; }
.xd-da-ds a { font-size: 12px; padding: 3px 9px; border: 1px solid var(--xd-line); border-radius: 12px; color: var(--xd-text) !important; text-decoration: none !important; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xd-da-ds a:hover { border-color: var(--xd-blue); color: var(--xd-blue) !important; }
@media (max-width: 900px) { .xd-o4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .xd-hn-2 { grid-template-columns: 1fr; } }
