@font-face {
    font-family: 'UyghurWebFont';
    src: url('/static/fonts/UyghurWeb.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    unicode-range:
        U+0600-06FF,
        U+0750-077F,
        U+08A0-08FF,
        U+FB50-FDFF,
        U+FE70-FEFF;
}

/* 维语页面整体字体缩小 */
body.ug {
    font-family: 'UyghurWebFont', Arial, 'Microsoft YaHei', 'Segoe UI', sans-serif !important;
    font-size: 14px !important;
}

/* 标题稍微缩小 */
body.ug h1 {
    font-size: 24px !important;
}

body.ug h2 {
    font-size: 22px !important;
}

body.ug h3 {
    font-size: 20px !important;
}

body.ug h4 {
    font-size: 18px !important;
}

body.ug h5,
body.ug h6 {
    font-size: 16px !important;
}

/* 普通文字元素 */
body.ug label,
body.ug button,
body.ug a,
body.ug p,
body.ug th,
body.ug td,
body.ug span,
body.ug div,
body.ug .nav-link,
body.ug .dropdown-item,
body.ug .card-title,
body.ug .card-header,
body.ug .form-label {
    font-family: 'UyghurWebFont', Arial, 'Microsoft YaHei', 'Segoe UI', sans-serif !important;
}

/* 今日金价区域字体 */
body.ug .price-section,
body.ug .price-section *,
body.ug .sales-card-title,
body.ug .metal-name,
body.ug .metal-unit-row,
body.ug .price-update-time,
body.ug .compact-price-setting-btn,
body.ug .price-setting-btn {
    font-family: 'UyghurWebFont', Arial, 'Microsoft YaHei', 'Segoe UI', sans-serif !important;
}

/* 今日金价里面的价格数字必须继续用普通数字字体 */
body.ug .metal-price-row,
body.ug .metal-price-row *,
body.ug span[id^="display_price_"],
body.ug .currency {
    font-family: Arial, 'Microsoft YaHei', 'Segoe UI', sans-serif !important;
    direction: ltr;
    unicode-bidi: plaintext;
}

/* select 选择框使用维语字体 */
body.ug select,
body.ug select option {
    font-family: 'UyghurWebFont', Arial, 'Microsoft YaHei', 'Segoe UI', sans-serif !important;
    font-size: 14px !important;
}

/* input 和 textarea 使用普通字体 */
body.ug input,
body.ug textarea,
body.ug .form-control {
    font-family: Arial, 'Microsoft YaHei', 'Segoe UI', sans-serif !important;
}

/* 数字金额日期继续保护 */
body.ug input[type="number"],
body.ug input[type="date"],
body.ug .number,
body.ug .amount,
body.ug .price-number,
body.ug .money,
body.ug .date,
body.ug .time,
body.ug .phone,
body.ug .code,
body.ug .version,
body.ug [id*="amount"],
body.ug [id*="total"],
body.ug [id*="price"],
body.ug [id*="date"],
body.ug [id*="time"],
body.ug [class*="amount"],
body.ug [class*="total"],
body.ug [class*="balance"],
body.ug [class*="date"],
body.ug [class*="time"] {
    font-family: Arial, 'Microsoft YaHei', 'Segoe UI', sans-serif !important;
    direction: ltr;
    unicode-bidi: plaintext;
}

/* 保护 FontAwesome 图标 */
body.ug i,
body.ug .fa,
body.ug .fas,
body.ug .far,
body.ug .fab,
body.ug .fa-solid,
body.ug .fa-regular,
body.ug .fa-brands,
body.ug [class^="fa-"],
body.ug [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", "Font Awesome 5 Brands", "FontAwesome" !important;
}

/* 保护 Bootstrap Icons */
body.ug .bi,
body.ug [class^="bi-"],
body.ug [class*=" bi-"] {
    font-family: "bootstrap-icons" !important;
}

/* SVG 图标不受字体影响 */
body.ug svg {
    font-family: inherit;
}