/*
 * OCTONBOT-320 — layout adjustments that apply ONLY when the UI is Vietnamese.
 * Vietnamese labels run 1.5–2× longer than the Japanese originals, so a few
 * fixed-width slots need to wrap or shrink. Every rule is scoped to
 * html[lang="vi"]; the Japanese layout is untouched.
 */

/* Dashboard right panel: deadline filter chips may wrap to a second row. */
html[lang="vi"] .monitoring-filter-strip { flex-wrap: wrap; row-gap: 4px; }

/* PST card stats (確認が必要な書類 / 期日5日以内): keep label + value on one line each. */
html[lang="vi"] .case-index-status-label { white-space: nowrap; font-size: 0.92em; }

/* Sidebar navigation: never let a menu item break into two lines. */
html[lang="vi"] .sidebar-nav a p,
html[lang="vi"] aside nav a > p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Summary tiles on the dashboard: long headings wrap instead of pushing the value. */
html[lang="vi"] .task-summary-head span { white-space: normal; line-height: 1.2; }

/* Generic: tables and pill badges should shrink text rather than overflow. */
html[lang="vi"] .status-badge,
html[lang="vi"] .badge-pill,
html[lang="vi"] .cases-master-table th { white-space: nowrap; }
html[lang="vi"] .workspace-page-desc,
html[lang="vi"] .page-mascot-guide { overflow-wrap: anywhere; }

/* Project detail: document-rate chips (未提出 / 確認待ち / …) — labels are wider than the fixed chip. */
html[lang="vi"] .metric-breakdown-summary { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
html[lang="vi"] .metric-breakdown-chip-label { white-space: nowrap; font-size: 0.72rem; }

/* Project detail: per-document action buttons (差戻し / 提出済 / 完了) wrap inside their cell. */
html[lang="vi"] .status-toggle-wrapper .action-btn-group { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }

/* Form hints under inputs never widen their column. */
html[lang="vi"] .form-hint,
html[lang="vi"] .field-hint,
html[lang="vi"] .text-xs.text-gray-500 { overflow-wrap: anywhere; }

/* Sidebar user menu (bottom-left popover): items are as wide as the sidebar, so a
   long Vietnamese label wraps to a second line instead of being clipped. */
html[lang="vi"] .sidebar-user-menu-popover .app-action-menu-item { white-space: normal; line-height: 1.25; }

/* AI chat (Insights / widget): the model may indent Vietnamese step messages, which
   markdown renders as a code block; wrap it instead of letting it overflow the bubble. */
html[lang="vi"] .ai-chat-md pre,
html[lang="vi"] .ai-chat-md pre code,
html[lang="vi"] .insights-chat-card__messages pre,
html[lang="vi"] .insights-chat-card__messages pre code { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
