/* v2.0.18 - FUGALO UI HOTFIX SAFE
   Muc tieu: GIU NGUYEN AppShell v2.0.14 + Search v2.0.15 + Brand v2.0.16.
   Chi chuan hoa typography/spacing va attachment; KHONG override grid/app-shell widths. */
:root{
  --fg18-font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  --fg18-orange:#E5662A;
  --fg18-orange-dark:#C94F18;
  --fg18-orange-soft:#FFF1E9;
  --fg18-ink:#232323;
  --fg18-muted:#6B6D70;
  --fg18-line:#E8DED8;
  --fg18-xs:11px;
  --fg18-sm:12px;
  --fg18-md:13px;
  --fg18-base:14px;
  --fg18-lg:16px;
  --fg18-xl:20px;
}
body{font-family:var(--fg18-font)!important;color:var(--fg18-ink);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,input,select,textarea{font-family:var(--fg18-font)!important}
/* Global topbar: chi font, khong doi layout */
.fg-unified-search input,.gc-global-search input{font-size:var(--fg18-md)!important}
.fg-unified-search button,.gc-global-search button,.rbac-nav a,.base-user-menu summary{font-size:var(--fg18-sm)!important}
.base-user-popover{font-size:var(--fg18-sm)!important}.base-user-popover b{font-size:var(--fg18-md)!important}.base-user-popover small{font-size:var(--fg18-xs)!important}
/* Dashboard / search */
.fg-dashboard-hero h1{font-size:24px!important;line-height:1.25!important}.fg-dashboard-hero p{font-size:var(--fg18-md)!important;line-height:1.45!important}
.fg-stats b{font-size:24px!important;line-height:1.1!important}.fg-stats span{font-size:var(--fg18-sm)!important}
.fg-space-panel .panel-head h2,.fg-admin-columns .panel-head h2{font-size:var(--fg18-lg)!important}
.fg-space-card h3{font-size:var(--fg18-md)!important;line-height:1.3!important}.fg-space-card p,.fg-space-card .mini span{font-size:var(--fg18-xs)!important}
.fg-search-head h1{font-size:var(--fg18-xl)!important}.fg-search-head p{font-size:var(--fg18-md)!important}
.fg-search-result .result-top b{font-size:var(--fg18-md)!important}.fg-search-result p{font-size:var(--fg18-base)!important;line-height:1.5!important}.fg-search-result time,.fg-search-result small{font-size:var(--fg18-xs)!important}
/* Space typography only - KHONG doi grid/sidebar/appbar columns */
.gc-sidebar-head b{font-size:var(--fg18-md)!important}.gc-sidebar-head small{font-size:var(--fg18-xs)!important}
.gc-space-search-wrap input{font-size:var(--fg18-sm)!important}.gc-space-copy b{font-size:var(--fg18-md)!important;line-height:1.25!important}.gc-space-copy small{font-size:var(--fg18-xs)!important;line-height:1.3!important}
.gc-room-title h1{font-size:var(--fg18-lg)!important;line-height:1.25!important}.gc-room-title p,.fg-bridge-note{font-size:var(--fg18-sm)!important;line-height:1.4!important}
.gc-action-btn{font-size:var(--fg18-sm)!important}.gc-readonly,.gc-app-readonly{font-size:var(--fg18-xs)!important}
.gc-filter-query input,.gc-filter-bar>input[name="sender"],.gc-filter-bar label input,.gc-filter-bar button{font-size:var(--fg18-sm)!important}.gc-filter-bar label,.gc-filter-bar>a,.gc-filter-result{font-size:var(--fg18-xs)!important}
.gc-sender-name{font-size:var(--fg18-md)!important;line-height:1.35!important}.gc-sender-email,.gc-sender-line time,.gc-message-tools time,.gc-message-tools .thread-chip,.raw-menu{font-size:var(--fg18-xs)!important}
.gc-message-content,.gc-text{font-size:var(--fg18-base)!important;line-height:1.5!important}.gc-day span,.gc-history-top,.gc-history-bottom,.gc-history-btn{font-size:var(--fg18-xs)!important}
/* Attachment: fix text bi ep doc + khung preview loi */
.gc-attachment{display:block!important;overflow:hidden!important;border:1px solid var(--fg18-line)!important;border-radius:12px!important;background:#fff!important}
.gc-attachment-preview{display:block!important;width:100%!important;max-width:100%!important;background:#f8f8f8!important;overflow:hidden!important}
.gc-attachment-preview img{display:block!important;max-width:100%!important;width:auto!important;height:auto!important;max-height:560px!important;margin:0 auto!important;object-fit:contain!important}
.gc-attachment-info{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:3px!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;padding:9px 11px!important;white-space:normal!important;overflow-wrap:anywhere!important}
.gc-attachment-info b{font-size:var(--fg18-sm)!important}.gc-attachment-info small,.gc-attachment-info a{font-size:var(--fg18-xs)!important;white-space:normal!important;overflow-wrap:anywhere!important}
.gc-attachment.preview-failed .gc-attachment-info:before{content:"Bản xem trước chưa có trên máy chủ";display:block;font-size:var(--fg18-xs);color:var(--fg18-muted);margin-bottom:2px}
/* Mobile: chi sua typography/attachment, khong thay doi AppShell responsive cua v2.0.14/15 */
@media(max-width:720px){
  .gc-message-content,.gc-text{font-size:14px!important;line-height:1.5!important}
  .gc-sender-name{font-size:13px!important}.gc-sender-email,.gc-sender-line time{font-size:11px!important}
  .gc-attachment{width:100%!important;max-width:100%!important}.gc-attachment-preview img{width:100%!important;max-height:none!important}.gc-attachment-info{padding:9px!important}
}
