/* =========================================================================
   OMNICENTER — UI mockup kit ("Giao diện minh họa" của 9 sản phẩm OMNI)
   Responsive theo kích thước khung chứa (container query), nên cùng một
   mockup hiển thị đúng ở hero, product showcase, trang chi tiết và mobile.
   ========================================================================= */
.ui { container: ui / inline-size; background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; text-align: left; font-size: 13px; }
.ui__bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--white); }
.ui__dots { display: inline-flex; gap: 6px; margin-right: 6px; }
.ui__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.ui__pi { width: 24px; height: 24px; border-radius: 7px; font-size: 13px; }
.ui__bar b { color: var(--navy); font-size: 14px; }
.ui__bar .tag-demo { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--off); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }
.ui__wrap { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 440px; }
.ui__wrap--chat { grid-template-columns: 240px minmax(0, 1fr) 220px; }
.ui__wrap--full { grid-template-columns: minmax(0, 1fr); }
.ui__side { background: var(--off); border-right: 1px solid var(--line); padding: 14px 10px; display: grid; gap: 2px; align-content: start; }
.ui__main { padding: 18px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.u-nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--muted); font-weight: 500; }
.u-nav .ic { font-size: 16px; }
.u-nav.is-active { background: var(--white); color: var(--primary); box-shadow: var(--shadow-sm); font-weight: 600; }
.u-nav--add { color: var(--primary); font-weight: 600; margin-top: 6px; border: 1px dashed var(--input-border); justify-content: center; }
.u-nav .u-dot { margin-left: auto; }

.u-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.u-kpi { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--off); }
.u-kpi span { display: block; font-size: 11.5px; color: var(--muted); }
.u-kpi strong { display: block; font-size: 19px; color: var(--navy); margin-top: 2px; }
.u-kpi em { font-style: normal; font-size: 11.5px; font-weight: 600; }
.u-kpi em.up { color: var(--lime-ink); }
.u-kpi em.dn { color: var(--primary); }
.u-split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; }
.u-split--wide { grid-template-columns: 1.2fr 1fr; }
.u-split > * { min-width: 0; }
.u-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--white); min-width: 0; }
.u-card__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.u-card__h b { color: var(--navy); font-size: 13.5px; }
.u-card__h .ic { color: var(--primary); font-size: 16px; }
.u-scroll { overflow-x: auto; }
.u-table { width: 100%; border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.u-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.u-table td { padding: 9px 8px; border-bottom: 1px dashed var(--line); color: var(--text); }
.u-table tr:last-child td { border-bottom: 0; }
.u-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.u-chip--run { background: var(--lime-50); color: var(--lime-ink); }
.u-chip--wait { background: var(--bright-50); color: var(--primary); }
.u-chip--done { background: var(--off); color: var(--muted); border: 1px solid var(--line); }
.u-chip--tag { background: var(--primary-50); color: var(--primary); border-radius: 6px; }
.u-line { display: block; height: 8px; border-radius: 4px; background: var(--line); margin: 6px 0; }
.u-line--dark { background: #C9D6EA; height: 10px; }
.u-line--prog { background: var(--bright); height: 5px; }
.u-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--navy); background: var(--white); white-space: nowrap; }
.u-btn--pri { background: var(--primary); border-color: var(--primary); color: var(--white); }
.u-btns { display: flex; gap: 6px; }
.u-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.u-av { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--grad-main); color: var(--white); font-size: 11px; font-weight: 700; }
.u-av--sm { width: 24px; height: 24px; font-size: 9.5px; }
.u-av--lg { width: 46px; height: 46px; font-size: 14px; }
.u-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bright); flex: none; }
.u-dot--run { background: var(--lime); }
.u-dot--wait { background: var(--bright); }
.u-dot--done { background: var(--input-border); }
.u-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--off); border: 1px dashed var(--input-border); }
.u-note .ic { color: var(--primary); font-size: 16px; flex: none; }

/* Ads */
.u-sugg { padding: 12px; border-radius: 10px; background: var(--off); border: 1px solid var(--line); display: grid; gap: 8px; }
.u-sugg + .u-sugg { margin-top: 10px; }
.u-sugg p b { display: block; color: var(--navy); font-size: 13px; }
.u-sugg p span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.u-sugg .u-chip { justify-self: start; }

/* SEO */
.u-doc .u-h { display: inline-block; margin-top: 10px; font-size: 10px; font-weight: 700; color: var(--primary); background: var(--primary-50); padding: 1px 6px; border-radius: 4px; }
.u-rings { display: flex; justify-content: space-between; gap: 8px; }
.u-ring { --v: 80; position: relative; isolation: isolate; width: 74px; height: 74px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 600; color: var(--muted); background: conic-gradient(var(--primary) calc(var(--v) * 1%), var(--line) 0); }
.u-ring::before { content: ''; position: absolute; inset: 7px; z-index: -1; border-radius: 50%; background: var(--white); }
.u-ring b { font-size: 19px; color: var(--navy); line-height: 1; }
.u-checks { margin-top: 14px; display: grid; gap: 7px; }
.u-checks li { display: flex; gap: 8px; font-size: 12.5px; }
.u-checks li::before { content: '✓'; flex: none; width: 16px; height: 16px; border-radius: 5px; background: var(--lime-50); color: var(--lime-ink); font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.u-checks li.is-warn::before { content: '!'; background: var(--bright-50); color: var(--primary); }

/* Chat */
.ui__side--list { padding: 8px; gap: 4px; }
.u-conv { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; }
.u-conv.is-active { background: var(--white); box-shadow: var(--shadow-sm); }
.u-conv > div { flex: 1; min-width: 0; line-height: 1.35; }
.u-conv b { color: var(--navy); font-size: 12.5px; margin-right: 6px; }
.u-conv .u-chip { font-size: 10px; padding: 1px 6px; }
.u-conv > div > span:last-child { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-conv .u-dot { margin-top: 6px; }
.u-chat { grid-template-rows: 1fr auto; align-content: stretch; background: linear-gradient(180deg, var(--white), var(--off)); }
.u-thread { display: flex; flex-direction: column; gap: 10px; }
.u-msg { max-width: 78%; padding: 10px 13px; border-radius: 14px 14px 14px 4px; background: var(--white); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.u-msg--bot { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--primary); border-color: var(--primary); color: var(--white); }
.u-msg--bot small { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; color: var(--lime); margin-bottom: 4px; }
.u-sys { align-self: center; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); background: var(--white); border: 1px dashed var(--input-border); border-radius: 999px; padding: 5px 12px; }
.u-input { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.u-input .u-line { flex: 1; }
.ui__side--profile { border-right: 0; border-left: 1px solid var(--line); justify-items: center; text-align: center; padding: 22px 16px; gap: 4px; }
.ui__side--profile > b { color: var(--navy); font-size: 14px; margin-top: 8px; }
.ui__side--profile > span { color: var(--muted); font-size: 12px; }
.u-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 10px; }
.ui__side--profile dl { margin: 14px 0 0; width: 100%; text-align: left; display: grid; gap: 2px; }
.ui__side--profile dt { font-size: 11px; color: var(--muted); margin-top: 8px; }
.ui__side--profile dd { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--navy); }

/* Media */
.u-prompt { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 12px; border: 1.5px solid var(--primary); box-shadow: 0 0 0 4px rgba(6, 69, 192, .08); }
.u-prompt > .ic { color: var(--primary); font-size: 18px; flex: none; }
.u-prompt > span:not(.u-btn) { flex: 1; min-width: 0; font-size: 12.5px; }
.u-assets { display: grid; grid-template-columns: .7fr 1fr 1.5fr .85fr; gap: 10px; align-items: end; }
.u-asset { position: relative; border-radius: 10px; color: var(--white); padding: 10px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.u-asset b { font-size: 13px; }
.u-asset span:last-child { font-size: 11px; opacity: .85; }
.u-asset__play { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: flex; align-items: center; justify-content: center; font-size: 14px; backdrop-filter: blur(4px); }
.u-asset--a { aspect-ratio: 9 / 16; background: var(--grad-tech); }
.u-asset--b { aspect-ratio: 1; background: var(--grad-main); }
.u-asset--c { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #082B70, #078BEE); }
.u-asset--d { aspect-ratio: 4 / 5; background: var(--grad-accent); }
.u-tl { display: grid; gap: 8px; }
.u-tl__row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }
.u-tl__row div { position: relative; height: 16px; border-radius: 5px; background: var(--off); }
.u-tl__row i { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; background: var(--primary); }
.u-tl__row:nth-child(2) i { background: var(--bright); }
.u-tl__row:nth-child(3) i { background: var(--navy); }
.u-tl__row:nth-child(4) i { background: var(--lime); }

/* Work */
.u-kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.u-col { background: var(--off); border-radius: 12px; padding: 10px; display: grid; gap: 8px; align-content: start; }
.u-col__h { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--navy); padding: 2px 4px; }
.u-col__h span { color: var(--muted); font-weight: 600; }
.u-task { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.u-task b { display: block; font-size: 12.5px; color: var(--navy); line-height: 1.4; }
.u-task > div { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.u-task .u-av { width: 24px; height: 24px; font-size: 9.5px; }
.u-prog { display: grid; grid-template-columns: 90px 1fr 40px; align-items: center; gap: 10px; font-size: 12.5px; padding: 5px 0; }
.u-prog > div { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.u-prog i { display: block; height: 100%; border-radius: 4px; background: var(--grad-main); }
.u-prog > b { text-align: right; color: var(--navy); font-size: 12px; }
.u-prog--task { grid-template-columns: minmax(0, 1fr) 120px 36px; padding: 8px 0; border-top: 1px dashed var(--line); }
.u-prog--task span b { display: block; color: var(--navy); font-size: 12.5px; }
.u-prog--task span { color: var(--muted); font-size: 11.5px; min-width: 0; }

/* ERP */
.u-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; height: 170px; align-items: end; padding: 0 6px; }
.u-bars > div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.u-bars i { width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: var(--grad-main); }
.u-bars > div:nth-child(2) i { background: linear-gradient(180deg, var(--lime), #8BD400); }
.u-bars span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* MISA */
.u-paper { position: relative; padding: 22px 20px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 10px 30px -12px rgba(8, 43, 112, .25); transform: rotate(-1.2deg); }
.u-paper > b { display: block; text-align: center; font-size: 11px; letter-spacing: .08em; color: var(--navy); margin-bottom: 10px; }
.u-hl { padding: 2px 6px; margin: 8px -6px; border-radius: 6px; background: rgba(7, 139, 238, .1); outline: 1.5px dashed var(--bright); }
.u-hl--b { background: rgba(168, 240, 0, .18); outline-color: #8BD400; }
.u-paper__tbl { margin: 12px 0; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.u-fields { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 12.5px; }
.u-fields dt { color: var(--muted); }
.u-fields dd { margin: 0; font-weight: 600; color: var(--navy); text-align: right; }
.u-fields--row dd { text-align: left; font-weight: 500; color: var(--text); }

/* Agent */
.u-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.u-flow > i { width: 18px; height: 2px; background: var(--input-border); flex: none; position: relative; }
.u-flow > i::after { content: ''; position: absolute; right: -1px; top: -3px; border-left: 5px solid var(--input-border); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.u-node { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--off); font-size: 12px; font-weight: 600; color: var(--navy); }
.u-node .ic { color: var(--primary); font-size: 15px; }
.u-node--ai { background: var(--primary); border-color: var(--primary); color: var(--white); }
.u-node--ai .ic { color: var(--lime); }
.u-node--human { background: var(--lime-50); border-color: rgba(168, 240, 0, .7); }
.u-node--human .ic { color: var(--lime-ink); }
.u-log { display: grid; gap: 8px; }
.u-log li { display: flex; gap: 12px; font-size: 12.5px; }
.u-log time { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }

/* Office */
.ui__main--office { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.u-rooms { display: grid; gap: 10px; }
.u-room { border-radius: 14px; padding: 12px; background: linear-gradient(135deg, var(--primary-50), var(--off)); border: 1px solid var(--line); }
.u-room:nth-child(2) { background: linear-gradient(135deg, var(--lime-50), var(--off)); }
.u-room__h { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.u-desks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.u-desk { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 4px; }
.u-desk .u-av { box-shadow: 0 0 0 3px var(--white); }
.u-table-desk { display: block; width: 74%; height: 12px; border-radius: 4px; background: var(--white); border: 1px solid var(--line); }
.u-bubble { font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 10px 10px 10px 2px; background: var(--white); color: var(--navy); box-shadow: var(--shadow-sm); white-space: nowrap; }
.u-bubble--run { color: var(--lime-ink); }
.u-bubble--wait { color: var(--primary); }
.u-bubble--done { color: var(--muted); }

/* ---------- Responsive theo khung chứa ---------- */
@container ui (max-width: 900px) {
  .ui__wrap--chat { grid-template-columns: 210px minmax(0, 1fr); }
  .ui__wrap--chat .ui__side--profile { display: none; }
  .ui__wrap { grid-template-columns: 168px minmax(0, 1fr); }
  .ui__wrap--full { grid-template-columns: minmax(0, 1fr); }
}
@container ui (max-width: 700px) {
  .ui__wrap, .ui__wrap--chat { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .ui__wrap > .ui__side:not(.ui__side--list) { display: none; }
  .ui__wrap--chat .ui__side--list { border-right: 0; border-bottom: 1px solid var(--line); grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; }
  .ui__main { padding: 12px; }
  .u-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .u-split, .u-split--wide, .ui__main--office { grid-template-columns: minmax(0, 1fr); }
  .u-kanban { grid-template-columns: minmax(0, 1fr); }
  .u-assets { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .u-asset { padding: 6px; }
  .u-asset b { font-size: 11px; }
  .u-asset span:last-child { display: none; }
  .u-asset__play { width: 22px; height: 22px; font-size: 11px; }
  .u-msg { max-width: 90%; }
}
@container ui (max-width: 420px) {
  .ui__bar { flex-wrap: wrap; row-gap: 6px; }
  .ui__dots { display: none; }
}
