/* Compact language controls shared by public pages and the private CRM. */
.crm-language-control {
  --language-bg: var(--crm-surface, #fff);
  --language-text: var(--crm-surface-text, #132b43);
  --language-muted: var(--crm-surface-muted, #536b7b);
  --language-border: var(--crm-border, #d8e3eb);
  --language-soft: var(--crm-subtle, #eff5f3);
  --language-soft-text: var(--crm-subtle-text, #173d31);
  --language-accent: var(--crm-subtle-link, #08755b);
  position: relative; flex: 0 0 auto; min-width: 0; max-width: 100%;
}
.crm-language-picker { position: relative; padding: 0; margin: 0; border: 0; color: var(--language-text); font: inherit; }
.crm-language-picker > summary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; max-width: 100%; padding: 9px 11px;
  background: var(--language-bg); color: var(--language-text);
  border: 1px solid var(--language-border); border-radius: 11px;
  font-size: 13px; font-weight: 650; line-height: 1.35; list-style: none;
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: border-color .15s, box-shadow .15s;
}
.crm-language-picker > summary::-webkit-details-marker { display: none; }
.crm-language-picker > summary::marker { content: ""; }
.crm-language-picker > summary:hover, .crm-language-picker[open] > summary { border-color: var(--language-accent); box-shadow: 0 0 0 3px #08755b0a; }
.crm-language-picker > summary:focus-visible, .crm-language-picker .crm-language-option:focus-visible { outline: 3px solid var(--crm-focus, #146dc5); outline-offset: 3px; }
.crm-language-globe { display: flex; align-items: center; color: var(--language-muted); }
.crm-language-globe svg { display: block; width: 18px; height: 18px; max-width: none; }
.crm-language-current { min-width: 0; max-width: 115px; overflow: hidden; text-overflow: ellipsis; }
.crm-language-chevron { width: 6px; height: 6px; margin-inline-start: 2px; margin-block-start: -3px; border-inline-end: 1.6px solid currentColor; border-block-end: 1.6px solid currentColor; transform: rotate(45deg); opacity: .7; flex-shrink: 0; }
.crm-language-picker[open] .crm-language-chevron { margin-block-start: 3px; transform: rotate(225deg); }
.crm-language-picker.is-changing > summary { cursor: progress; opacity: .7; }
.crm-language-popup {
  position: absolute; inset-block-start: calc(100% + 10px); inset-inline-end: 0; z-index: 80;
  width: min(326px, calc(100vw - 28px)); max-width: calc(100vw - 28px);
  padding: 16px 12px 12px; border: 1px solid var(--language-border); border-radius: 17px;
  background: var(--language-bg); color: var(--language-text);
  box-shadow: 0 20px 60px #10263a22, 0 3px 12px #10263a0a;
  transform: translateX(var(--language-shift, 0px)); overflow-x: hidden;
  max-height: min(390px, calc(100dvh - 100px)); overflow-y: auto; scrollbar-width: thin;
}
.crm-language-picker:not([open]) > .crm-language-popup { display: none; }
.crm-language-popup .crm-language-heading { margin: 0 6px 12px; padding: 0; color: var(--language-muted); font-size: 11px; line-height: 1.5; letter-spacing: .15px; font-weight: 650; }
.crm-language-popup .crm-language-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin: 0; padding: 0; }
.crm-language-picker .crm-language-grid .crm-language-option {
  display: flex; align-items: center; justify-content: start; gap: 8px;
  width: 100%; min-width: 0; min-height: 45px; margin: 0; padding: 8px 9px;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--language-text);
  font-size: 13px; line-height: 1.4; font-weight: 600;
  text-align: start; text-decoration: none; box-shadow: none; cursor: pointer;
  filter: none; transition: background .15s, border-color .15s;
}
.crm-language-picker .crm-language-option:hover { background: var(--language-soft); color: var(--language-soft-text); transform: none; }
.crm-language-picker .crm-language-option[aria-pressed="true"], .crm-language-picker .crm-language-option[aria-current] { background: var(--language-soft); color: var(--language-soft-text); border-color: var(--language-border); }
.crm-language-mark { display: grid; place-items: center; flex: 0 0 26px; height: 27px; background: var(--language-soft); color: var(--crm-subtle-muted, var(--language-muted)); border: 1px solid var(--language-border); border-radius: 7px; font-size: 9px; font-weight: 700; letter-spacing: .2px; }
.crm-language-name { min-width: 0; flex: 1; white-space: nowrap; }
.crm-language-name[lang^="zh"], .crm-language-option[lang^="zh"] .crm-language-name { font-family: "Microsoft YaHei", "Microsoft JhengHei", system-ui, sans-serif; font-size: 13px; }
.crm-language-check { display: flex; width: 14px; flex: 0 0 14px; color: var(--language-accent); opacity: 0; }
.crm-language-check svg { width: 14px; height: 14px; }
.crm-language-option[aria-current] .crm-language-check, .crm-language-option[aria-pressed="true"] .crm-language-check { opacity: 1; }
.crm-language-status {
  position: absolute; inset-block-start: calc(100% + 10px); inset-inline-end: 0; z-index: 85;
  width: min(320px, calc(100vw - 28px)); max-width: calc(100vw - 28px);
  display: block; padding: 12px 15px; margin: 0; border: 1px solid var(--language-border); border-radius: 11px;
  background: var(--language-bg); color: var(--language-text); box-shadow: 0 8px 24px #10263a17;
  font-size: 12px; font-weight: 500; line-height: 1.65; text-align: start; overflow-wrap: anywhere; transform: translateX(var(--language-shift, 0px));
}
.crm-language-control .crm-language-status[hidden] { display: none; }
.crm-language-status.error { color: var(--crm-surface-negative, #98283a); }
.crm-language-panel { --crm-context-text:var(--crm-surface-text); --crm-context-muted:var(--crm-surface-muted); --crm-context-link:var(--crm-surface-link); background: var(--crm-surface, #fff); color: var(--crm-surface-text, #18263a); border: 1px solid var(--crm-border, #ccd4dd); border-radius: 16px; padding: 22px; margin-block-start: 20px; max-width: 980px; }
.crm-language-panel h3 { margin: 0 0 10px; }.crm-language-panel p { line-height: 1.6; }.crm-language-panel small:not(.crm-language-status) { display: block; margin-block-start: 12px; color: var(--crm-surface-muted, #53677c); line-height: 1.6; }
[data-language-selector] { max-width: 100%; min-width: 0; }
.auth-topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; min-width:0; padding-block-end:20px; border-block-end:1px solid #e0e8ee; }
.auth-topbar .authbrand { display:inline-flex; align-items:center; gap:8px; min-width:0; color:#142c43; text-decoration:none; font-size:21px; line-height:1.2; font-weight:800; letter-spacing:-.6px; direction:ltr; unicode-bidi:isolate; white-space:nowrap; }
.auth-topbar .authbrand img { display:block; width:36px; height:36px; object-fit:contain; flex-shrink:0; border-radius:9px; padding:0; background:#edf6f3; }
.auth-topbar .auth-tools { display:flex; justify-content:end; flex:0 0 auto; margin:0; min-width:0; }
.auth-topbar .crm-language-picker > summary { min-height:38px; padding:8px 10px; font-size:12px; }
.auth-topbar .crm-language-current { max-width:95px; }
.auth-topbar .crm-language-globe svg { width:16px; height:16px; }
.guide-site-header.siteheader { display: flex; flex-wrap: nowrap; gap: 24px; align-items: center; justify-content: space-between; min-height: 78px; padding-block: 15px; z-index: 45; }
.guide-site-header .guide-site-tools { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.guide-site-header .brand { font-size: 23px; }
.guide-site-header .brand img { width: 36px; height: 36px; }
.guide-site-header .button.small { font-size: 12px; min-height: 40px; padding: 9px 13px; border-radius: 10px; }
.guide-open-compact { display:none; }
html[lang^="zh"] body { font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", "Microsoft JhengHei", sans-serif; }
html[lang^="zh"] p, html[lang^="zh"] label, html[lang^="zh"] td { line-height: 1.65; }
html[lang="ar"] body { font-family: system-ui, "Segoe UI", Tahoma, "Noto Naskh Arabic", sans-serif; line-height: 1.65; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] .eyebrow, html[lang="ar"] aside > small { letter-spacing: normal; }
html[lang^="zh"] h1, html[lang^="zh"] h2, html[lang^="zh"] h3 { letter-spacing: normal; }
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="url"], html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="number"], html[dir="rtl"] input[type="date"], html[dir="rtl"] [data-technical] { direction: ltr; text-align: right; unicode-bidi: plaintext; }
html[dir="rtl"] main, html[dir="rtl"] section, html[dir="rtl"] th, html[dir="rtl"] td, html[dir="rtl"] label { text-align: start; }
html[dir="rtl"] .crm-branded > aside { left: auto; right: 0; }
html[dir="rtl"] .crm-branded > main { margin-left: 0; margin-right: 230px; }
html[dir="rtl"] .crm-branded aside nav button { text-align: right; }
html[dir="rtl"] .support-attachment-viewer, html[dir="rtl"] .support-image-stage, html[dir="rtl"] .support-viewer-stage { direction: ltr; }
html[dir="rtl"] dialog { text-align: right; }
html[dir="rtl"] .guide-nav, html[dir="rtl"] .sidebar { text-align: right; }
@media(max-width:700px) {
  html[dir="rtl"] .crm-branded > main { margin-right: 0; }
  .crm-language-panel { padding: 18px; }
  .guide-site-header.siteheader { gap: 13px; min-height: 72px; padding-inline: 18px; }
  .guide-site-header .brand { font-size: 21px; gap: 8px; }
  .guide-site-header .brand img { width: 32px; height: 32px; }
  .guide-site-header .guide-site-tools { gap: 10px; }
  .guide-site-header .button.small { font-size:10px; min-height:38px; padding:7px 8px; white-space:nowrap; }
  .guide-open-label { display:none; }.guide-open-compact { display:inline; }
  .crm-language-popup { width: min(318px, calc(100vw - 28px)); }
  .auth-topbar { gap:10px; padding-block-end:17px; }
  .auth-topbar .authbrand { font-size:20px; gap:7px; }
  .auth-topbar .authbrand img { width:33px; height:33px; }
  .auth-topbar .crm-language-picker > summary { gap:6px; padding-inline:9px; font-size:11px; }
  .auth-topbar .crm-language-current { max-width:83px; }
}
@media(prefers-reduced-motion:reduce) { .crm-language-picker *, .crm-language-picker *::before { transition: none; } }

.legal-links{display:flex;flex-wrap:wrap;gap:12px;margin-block:16px}
