/* ===== Kalin — [DOT 81] Thanh 4 nút đỏ trên cùng: Kalin - Nhắn tin · TIỆN ÍCH · LĨNH VỰC · NGÔN NGỮ =====
   Chỉ hiện trên máy tính (>=821px) và sau khi đăng nhập (có #shell). Nếu app cài từ Chrome bật "window-controls-overlay"
   thì thanh nằm NGAY TRÊN thanh tiêu đề của cửa sổ (class kb-wco); nếu không, thanh là dải ngay dưới thanh tiêu đề. */
#kb-bar, #kb-page { display: none; }
@media (min-width: 821px) {
  html.kb-on { --kb-h: 40px; }
  html.kb-on.kb-wco { --kb-h: env(titlebar-area-height, 40px); }
  html.kb-on body { padding-top: var(--kb-h); box-sizing: border-box; }
  html.kb-on .shell { height: calc(100vh - var(--kb-h)); height: calc(100dvh - var(--kb-h)); }
  html.kb-on .auth { min-height: calc(100vh - var(--kb-h)); }
  html.kb-on .rail #r-ti { display: none; } /* vali đỏ đã chuyển lên thanh trên (nút TIỆN ÍCH) */

  html.kb-on #kb-bar {
    display: flex; align-items: center; gap: 8px; position: fixed; z-index: 60; top: 0;
    left: 0; width: 100%; height: var(--kb-h); box-sizing: border-box; padding: 0 12px;
    background: #4f46e5; color: #fff; user-select: none; -webkit-user-select: none;
  }
  html.kb-on.kb-wco #kb-bar {
    top: env(titlebar-area-y, 0px); left: env(titlebar-area-x, 0px); width: env(titlebar-area-width, 100%);
    -webkit-app-region: drag; app-region: drag;
  }
  #kb-bar .kb-b {
    -webkit-app-region: no-drag; app-region: no-drag;
    height: 28px; padding: 0 16px; border: 0; border-radius: 8px; cursor: pointer; font: 800 12.5px/1 "Be Vietnam Pro", system-ui, sans-serif;
    letter-spacing: .3px; color: #fff; background: #dc2626; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    box-shadow: 0 1px 0 rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.18); transition: background .15s, transform .1s;
  }
  #kb-bar .kb-b:hover { background: #ef4444; }
  #kb-bar .kb-b:active { transform: translateY(1px); }
  #kb-bar .kb-b.on { background: #b91c1c; box-shadow: 0 0 0 2px #fff, 0 1px 0 rgba(0,0,0,.25); }
  #kb-bar .kb-b:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  #kb-bar .kb-ic { font-size: 14px; line-height: 1; }

  html.kb-on #kb-page.open {
    display: block; position: fixed; z-index: 55; left: 0; right: 0; bottom: 0; top: var(--kb-h);
    background: var(--bg, #eef1f8); color: var(--ink, #1f2547); overflow: auto;
  }
  #kb-page .kb-wrap { max-width: 980px; margin: 0 auto; padding: 28px 24px 48px; }
  #kb-page h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.4px; }
  #kb-page .kb-sub { margin: 0 0 22px; color: var(--ink2, #5a6385); line-height: 1.5; }
  #kb-page .kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
  #kb-page .kb-tile {
    text-align: left; border: 1px solid var(--line, #dfe3f0); background: var(--panel, #fff); color: inherit; border-radius: 16px;
    padding: 16px; cursor: pointer; display: flex; gap: 12px; align-items: center; font: inherit;
  }
  #kb-page .kb-tile:hover { border-color: #dc2626; box-shadow: 0 6px 18px rgba(220,38,38,.12); }
  #kb-page .kb-tile .kb-ti { font-size: 26px; width: 44px; height: 44px; border-radius: 12px; background: var(--panel2, #f1f3fa); display: grid; place-items: center; flex: none; }
  #kb-page .kb-tile b { display: block; font-size: 14.5px; }
  #kb-page .kb-tile small { color: var(--ink3, #8089a8); font-size: 12px; }
  #kb-page .kb-tile.soon { opacity: .8; }
  #kb-page .kb-note { margin-top: 20px; padding: 14px 16px; border-radius: 14px; background: var(--panel, #fff); border: 1px dashed var(--line, #dfe3f0); color: var(--ink2, #5a6385); font-size: 13px; line-height: 1.55; }
}
