/* Material Icons Sharp — self-hosted, vendored from
   https://fonts.googleapis.com/css2?family=Material+Icons+Sharp
   (v110, 136 KB, full set, sha256 d31bfb81…483956c8)

   来源：E:/projects/im26/src/miv/static/design/material-icons-sharp.css
   （2026-11-24 原样移植进管理端，字形与字体文件未做任何裁剪或改写）。

   ★ 放在 static/design/ 而不是 src/ 的原因：Vite 的 publicDir 指向 static/，
     文件**原样**进产物，url(fonts/…) 也按 CSS 自身位置解析 ——
     所以这里必须用相对路径，绝不能写成 /design/fonts/…：管理端部署在
     `/admin/` 子目录下（BASE_PATH 可改），绝对路径会直接 404。
     引用方式见 index.html 的 <link>，带 %BASE_URL% 前缀。

   ★ 字体在 @font-face 里声明不等于会下载：浏览器只在**有元素用这个 family**
     时才取文件。所以先把样式挂上是零成本的，用到 .mi 的地方才开始付费。

   Why local: the product's claim is "stays on this device". A viewer that
   phones Google for a font contradicts its own label — and breaks the icon
   set entirely on an isolated reading station.

   font-display:block, not swap. These glyphs are selected by ligature, so a
   swapping font shows the literal word "straighten" for one frame before the
   ruler appears. block hides the fallback text instead, and because the file
   is local that hidden window is effectively zero. */

@font-face {
  font-family: 'Material Icons Sharp';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(fonts/material-icons-sharp.woff2) format('woff2');
}

/* The name is the markup: <span class="mi">straighten</span>.
   Ligature substitution turns it into the glyph.

   ★ 用法三条（管理端口径）：
     ① 大小只用 font-size 调，不要再套 width/height —— 字形是字体，不是盒子；
        与文字并排时给 `vertical-align: -0.125em` 左右的值对齐基线。
     ② 颜色自动跟 `color` 走（字形是 currentColor），不需要另传色值；
        灰态用 .muted 的父级色，不要给图标单独写 #999。
     ③ `aria-hidden="true"` 必加，图标永远不是唯一的信息载体 ——
        按钮必须自带 aria-label 或可见文字（同 IconClose.svelte 的约定）。
     ④ 名字写错不会报错，只会**把英文原词显示出来**（ligature 没命中）。
        加图标后看一眼渲染，别只看代码。 */
.mi {
  font-family: 'Material Icons Sharp';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  /* Sharp draws on a 24 grid with a 20 live area, so no optical nudge needed. */
  -moz-osx-font-smoothing: grayscale;
}

/* 按钮内的图标（刷新等）。
   ★ 为什么放在**字库**里而不是各端 app.css：这段样式被 admin 与 customer 共用
     （shared/ServiceOrderTable 的刷新按钮两端都渲染）。分开放过一次，结果是顾客端
     停在 .mi 的默认 20px、管理端 18px，同一颗图标两种大小 —— 谁都看不出来是漏了。
   ★ 18px 的来由：图标按钮是 32×32、按钮文字 15px；字库画在 24 网格、字面只占 20，
     取 18px 时字面才与按钮文字视觉等大。继承字号（13.5–15px）会只剩 11–12px 的字面。
   ★ vertical-align 的 -0.125em 只对**没有 .btn 类**的按钮生效（如 shared/LastMilePanel
     的刷新按钮，button 内部是 inline 流）。在 .btn 里它是 flex item，这条声明被忽略，
     所以两种按钮共用一条规则不会打架。页标题那边是另一套（.page-mi 的 -3px）。
   ★ 不写 color：字形是 currentColor，继承按钮色，禁用态 / 主色按钮自动跟随。 */
.mi-btn {
  font-size: 18px;
  line-height: 1;
  vertical-align: -0.125em;
}

