/* 主题变量：取值直接来自原软件 index-DD2BaRXt.css 的 nan-feng-wechat-inspired-ui-v1 主题块 */
:root {
  --bg: #e9eaec;            /* --xy-bg  页面底色 */
  --panel: #f5f6f7;         /* --xy-panel 右侧面板 */
  --card: #ffffff;          /* --xy-card  卡片 */
  --ink: #1f2329;           /* --xy-text */
  --ink-2: #8b9098;         /* --xy-muted */
  --ink-3: #a8adb5;
  --line: #e6e8eb;          /* --xy-border */
  --line-2: #d8dbe0;
  --accent: #07c160;        /* 原名文主色（微信绿） */
  --accent-deep: #07a94f;   /* 原名文菜单/页签激活色 */
  --accent-soft: #ecfaf2;   /* --el-color-primary-light-9 */
  --danger: #b42318;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 28px rgba(31, 35, 41, .06);
}

* { box-sizing: border-box; }

/* 保证 hidden 属性始终生效（避免被 display 规则覆盖） */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.6;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------------- 布局 ----------------
   对应原软件 HomeView 的 .content > .leftNav + .right(.right-show)：
   整页灰底 + 10px 内边距 + 10px 间隙，左右都是 12px 圆角卡片 */
.app {
  display: flex; min-height: 100vh;
  gap: 10px; padding: 10px; background: var(--bg);
  align-items: stretch;
}

.side {
  /* 原名文 .leftNav 是 92px，但那是**纯图标**侧栏。我们给菜单项加了中文（离线签章 /
     用印管理 / 印章提取 各 4 字），92px 时菜单项内容区只有 60px、塞不下 86px 的内容，
     文字会往卡片外溢 10px。按「图标 19 + 间距 7 + 4 字约 54 + 内边距 16」反推需要 ≥112px，
     取 116px 留出粗体（激活态 font-weight:600）的余量。 */
  width: 116px;
  flex: 0 0 116px;
  background: #dedfe1;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 8px;
  position: sticky;
  top: 10px;
  height: calc(100vh - 20px);
  overflow: hidden;
}

.nav { display: flex; flex-direction: column; width: 100%; }
.nav-item {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 7px; width: 100%;
  border: none; background: none; text-align: left;
  height: 46px; line-height: 46px; margin: 5px 0; padding: 0 8px;
  border-radius: 9px;
  font-size: 13px; color: #60656d;
  white-space: nowrap;
  transition: .18s ease;
}
.nav-item:hover { background: rgba(255,255,255,.66); color: #1f2329; }
.nav-item.active {
  background: #fff; color: var(--accent-deep); font-weight: 600;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.nav-ico { display: inline-flex; width: 19px; height: 19px; flex: 0 0 19px; }
.nav-ico svg { width: 100%; height: 100%; display: block; }

.side-foot { padding: 6px 2px 0; text-align: center; }
.side-foot a { color: var(--ink-2); font-size: 11px; text-decoration: none; }
.side-foot a:hover { color: var(--ink); }

.main {
  flex: 1; min-width: 0;
  background: var(--panel); border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.view { max-width: 1180px; }

.view-head { margin-bottom: 18px; }
.view-head h1 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.view-sub { margin: 0; color: var(--ink-2); }

/* 对应原软件 .titleview（居中标题） */
.page-title {
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; margin-bottom: 14px;
}
.page-title span { font-weight: 600; }
.group-name { margin: 0; font-size: 14px; font-weight: 600; }
.tip { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); }

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  /* grid 内的卡片交给 gap 排间距；grid 自身与下方独立卡片（个人）之间留同样的 16px */
  margin-bottom: 16px;
}
/* 卡片间距统一交给 grid 的 gap，避免与 .card 的 margin-bottom 叠加成双倍 */
.grid2 > .card { margin-bottom: 0; }
/* 跨整行（图库卡片放在预览与单位下面占满一行） */
.span2 { grid-column: 1 / -1; }
@media (max-width: 1080px) {
  /* 必须写 minmax(0,1fr)：裸 1fr = minmax(auto,1fr)，列宽会被内部不可压缩的内容
     （如宽画布、长表格）顶开，整页横向溢出。0 最小值才能让列真正收窄。 */
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
}

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.card-head h2 { margin: 0; font-size: 14px; font-weight: 600; }

/* ---------------- 页签 ----------------
   对应原软件 .el-tabs--border-card：白底卡片 + 边框，
   激活项文字用 #07a94f（原名文 .el-tabs__item.is-active 的值） */
.tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  background: var(--card); padding: 4px; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 14px;
}
.tab {
  border: none; background: none; padding: 6px 14px;
  font-size: 13px; font-weight: 500; color: var(--ink); border-radius: 6px;
}
.tab:hover { color: var(--accent-deep); }
.tab.active {
  background: var(--accent-soft); color: var(--accent-deep); font-weight: 600;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

.pane { display: none; }
.pane.active { display: block; }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

input[type="text"], input[type="number"], select {
  width: 100%; min-width: 0; padding: 7px 10px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font-size: 13px;
}
input[type="text"]:focus, input[type="number"]:focus, select:focus {
  outline: none; border-color: var(--accent);
}
input[type="color"] {
  width: 100%; height: 34px; padding: 3px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer;
}
input[type="range"] { width: 100%; accent-color: var(--accent); }
.field .inline, label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.row > label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.row > label input[type="number"] { width: 84px; }
.row > label input[type="range"] { width: 130px; }

.radios { display: flex; gap: 6px; flex-wrap: wrap; }
.radios.wrap { flex-wrap: wrap; }
.checks { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.checks label.inline input[type="checkbox"] { accent-color: var(--accent); }
.hint-inline { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
.radio {
  border: 1px solid var(--line-2); background: #fff;
  padding: 6px 11px; border-radius: 999px;
  font-size: 12.5px; color: var(--ink-2);
}
.radio:hover { border-color: var(--ink-3); }
.radio.active { background: var(--accent-soft); border-color: var(--accent-deep); color: var(--accent-deep); font-weight: 600; }

/* ---------------- 按钮 ---------------- */
.btn {
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 8px 16px; font-size: 13px;
  transition: opacity .14s, border-color .14s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:not(:disabled):hover { opacity: .9; }
.btn.ghost { background: #fff; border-color: var(--line-2); color: var(--ink); }
.btn.ghost:not(:disabled):hover { border-color: var(--ink-3); }
.btn.ghost.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 500; }

.mini {
  border: 1px solid var(--line-2); background: #fff;
  padding: 3px 10px; border-radius: 6px;
  font-size: 12px; color: var(--ink-2);
}
.mini:hover { border-color: var(--ink-3); color: var(--ink); }
.mini.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.bgs { display: flex; align-items: center; gap: 5px; }

.hint { margin: 0 0 10px; color: var(--ink-2); font-size: 12.5px; }
.status { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); min-height: 18px; }
.status.error { color: var(--danger); }

/* ---------------- 上传 ---------------- */
.drop {
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius-sm);
  padding: 22px 14px; text-align: center;
  color: var(--ink-2); font-size: 12.5px;
  cursor: pointer; transition: border-color .14s, background .14s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.drop-slim { padding: 11px 12px; font-size: 12px; }
.drop-slim span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-sub .note { color: var(--ink-3); font-size: 12px; }

/* ---------------- 预览台 ---------------- */
.stage {
  border-radius: var(--radius-sm);
  min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  padding: 14px; overflow: hidden;
}
.stage[data-bg="checker"] {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #ededed 25%, transparent 25%, transparent 75%, #ededed 75%),
    linear-gradient(45deg, #ededed 25%, transparent 25%, transparent 75%, #ededed 75%);
  background-size: 18px 18px;
  background-position: 0 0, 9px 9px;
  border: 1px solid var(--line);
}
.stage[data-bg="white"] { background: #fff; border: 1px solid var(--line); }
.stage[data-bg="dark"] { background: #1e1e1c; }
.stage img { max-width: 100%; max-height: 380px; display: block; }
.placeholder { color: var(--ink-3); margin: 0; font-size: 12.5px; }

.meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 0; }
.meta > div { background: var(--bg); border-radius: var(--radius-sm); padding: 7px 9px; }
.meta dt { font-size: 11px; color: var(--ink-3); margin: 0; }
.meta dd { margin: 2px 0 0; font-size: 12.5px; font-weight: 500; }

/* ---------------- 图库 ---------------- */
.lib {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}
.lib .placeholder { grid-column: 1 / -1; }
.lib-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px; background: #fff; text-align: center;
  position: relative;
}
.lib-item img {
  width: 100%; height: 76px; object-fit: contain;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%),
    linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
  border-radius: 5px;
}
.lib-item .name {
  font-size: 11px; color: var(--ink-2); margin-top: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lib-item .del {
  position: absolute; top: 3px; right: 3px;
  border: none; background: rgba(255,255,255,.9);
  color: var(--ink-3); font-size: 12px; line-height: 1;
  padding: 2px 5px; border-radius: 5px;
}
.lib-item .del:hover { color: var(--danger); }

.lib.pick .lib-item { cursor: pointer; }
.lib.pick .lib-item.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ---------------- PDF 签章 ---------------- */
.pdf-stage {
  min-height: 440px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #dfe2e5;
  overflow: auto;
  padding: 8px;
  /* 这里**不能**用 flex + justify-content:center：内容比容器宽时，flex 居中会把溢出
     平均分到左右两侧，左侧那半永远滚不回来 —— 一放大页面就像「翻过去」了。
     改成块级 + margin:0 auto：放得下居中，放不下就左边对齐、整页都能滚到。 */
}
.pdf-canvas-wrap { position: relative; line-height: 0; width: max-content; margin: 0 auto; }
.pdf-canvas-wrap canvas { display: block; box-shadow: 0 1px 6px rgba(0,0,0,.12); }
/* 离线签章：左侧整块就是投放区（原来右上角那个小块已并入这里，旧的「还没打开 PDF」占位已删） */
.sign-drop {
  min-height: 422px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-sm);
}
.sign-drop-main { font-size: 14px; font-weight: 500; color: var(--ink); }
.sign-drop-sub { font-size: 12px; color: var(--ink-3); }
/* .layers 只是定位参照层，必须让点击穿透到画布，否则整张页面点不动、盖不上章 */
.layers { position: absolute; inset: 0; pointer-events: none; }
.stamp-layer {
  position: absolute; transform: translate(-50%, -50%);
  cursor: move; user-select: none;
  pointer-events: auto;   /* 印章本身仍可点选/拖动 */
}
.stamp-layer img { display: block; width: 100%; pointer-events: none; }
.stamp-layer.active { outline: 1px dashed var(--accent); }
/* 原名文：选中后右下角出现缩放手柄（title「拖动调整大小」） */
.stamp-resize {
  position: absolute; right: -6px; bottom: -6px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #07c160; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
  cursor: nwse-resize; pointer-events: auto;
}

/* ---- 盖章动效 ---- */
/* 盖下瞬间：印章从上方「落下」——放大淡入 → 轻微回压 → 落定 */
@keyframes stamp-drop {
  0%   { transform: translate(-50%, -50%) scale(1.9); opacity: 0; }
  55%  { transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
  75%  { transform: translate(-50%, -50%) scale(1.03); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
.stamp-layer.drop-in { animation: stamp-drop .3s ease-out both; }

/* 拖动中：印章微放大 + 投影（拿起来的感觉），虚线框隐藏更干净 */
.stamp-layer { cursor: grab; }
.stamp-layer.dragging { cursor: grabbing; }
.stamp-layer.dragging.active { outline-color: transparent; }
.stamp-layer.dragging img { filter: drop-shadow(0 7px 16px rgba(0, 0, 0, .3)); }

/* 松手落定：轻微回弹 */
@keyframes stamp-settle {
  0%   { transform: scale(1.05); }
  60%  { transform: scale(0.98); }
  100% { transform: scale(1); }
}
.stamp-layer.drop-settle img { animation: stamp-settle .22s ease-out; }

/* 自由旋转中：手柄隐藏（不能缩放）、显示旋转光标 */
.stamp-layer.rotating { cursor: ew-resize; }
.stamp-layer.rotating .stamp-resize { display: none; }
.stamp-layer.rotating.active { outline-style: solid; }

/* ---- 常驻印章 ---- */
.quick-item {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 200px;
  padding: 5px 26px 5px 12px;
  border-radius: 14px;
  font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.quick-item:hover { border-color: var(--accent); color: var(--accent); }
.quick-del {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px; line-height: 14px;
  border-radius: 50%;
  font-size: 13px; text-align: center;
  color: var(--ink-3); background: transparent;
}
.quick-del:hover { color: #e02020; background: rgba(224, 32, 32, .1); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------------- 面板内预览行（对应原软件「预览：」+ 按钮） ---------------- */
.preview-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px;
}
.preview-label { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.preview-thumb {
  width: 84px; height: 84px; object-fit: contain; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 6px; padding: 3px;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%),
    linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
}
.preview-thumb.wide { width: 150px; height: 66px; }

/* ---------------- 字体选择（对应原软件「合作愉快」预览单选） ---------------- */
.font-picker {
  display: flex; flex-wrap: wrap; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px; background: #fbfbfa; min-height: 56px;
  max-height: 210px; overflow-y: auto;
}
.font-picker .placeholder { font-size: 12px; }
.font-item {
  border: 1px solid var(--line-2); background: #fff; border-radius: 6px;
  padding: 3px; line-height: 0; cursor: pointer;
}
.font-item img { display: block; height: 42px; width: auto; }
.font-item.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ---------------- 弹窗（对应原软件 el-dialog） ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,.42);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-box {
  background: #fff; border-radius: var(--radius);
  width: 100%; max-width: 500px; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
}
.modal-head {
  padding: 14px 18px; font-size: 15px; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-foot {
  padding: 12px 18px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* 裁剪 */
.crop-stage {
  position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 300px;
  margin: 0 auto 12px; overflow: hidden;
  background: #2b2b28; border-radius: var(--radius-sm);
  cursor: grab; touch-action: none;
}
.crop-stage.dragging { cursor: grabbing; }
.crop-stage img {
  position: absolute; left: 50%; top: 50%;
  transform-origin: center; user-select: none; pointer-events: none;
  max-width: none;
}
.crop-box {
  position: absolute; left: 10%; top: 10%; width: 80%; height: 80%;
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.35);
  pointer-events: none;
}

/* 调整清晰度 */
.tune-preview {
  display: flex; align-items: center; justify-content: center;
  min-height: 160px; margin-bottom: 12px;
  background-color: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background-image:
    linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%),
    linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%);
  background-size: 14px 14px; background-position: 0 0, 7px 7px;
}
.tune-preview img { max-width: 220px; max-height: 200px; display: block; }
.tune-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.tune-row > span:first-child { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.tune-row input[type="number"] { width: 96px; }
.tune-row input[type="range"] { flex: 1; }

/* ---------------- 离线签章工具条 ----------------
   对应原名文 .centent（grid: minmax(0,1fr) 282px）+ .left-top + .pdf-sign */
.tabs-slim { margin-bottom: 10px; }

.sign-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  gap: 12px;
  align-items: start;
}
.sign-main, .sign-side { margin-bottom: 0; min-width: 0; }
.sign-side .lib.pick { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 268px; overflow-y: auto; }
.sign-side .sign-place { margin-top: 12px; }
.sign-side .sign-save {
  margin-top: 4px; padding-top: 12px; border-top: 1px solid #eceeef;
  justify-content: flex-start;
}
@media (max-width: 1050px) { .sign-grid { grid-template-columns: minmax(0, 1fr) 250px; } }
/* 同样必须 minmax(0,1fr)：画布 wrap 是 width:max-content，裸 1fr 会在窄屏把整页顶宽 */
@media (max-width: 860px)  { .sign-grid { grid-template-columns: minmax(0, 1fr); } }

.pdf-toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  min-height: 40px;
  margin-bottom: 12px; font-size: 12.5px; color: var(--ink-2);
}
.pdf-toolbar .paper-size { font-weight: 600; color: #30343b; }
.pager {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 9px; background: #f4f5f6; border-radius: 8px; color: #5f646c;
}
.pager span { min-width: 46px; text-align: center; }

/* ---------------- 窄屏适配 ----------------
   窄窗口下卡片会被压到几十像素宽，中文逐字换行（「红色印章」变成竖排的
   红/色/印/章），界面看起来就像坏了。这里把侧栏收成顶部横条、主内容取
   全宽，并禁止按钮类文字在字间断行。 */
.tab, .radio, .btn, .mini, .group-name, .nav-item, .page-title span { white-space: nowrap; }

@media (max-width: 720px) {
  .app { flex-direction: column; padding: 8px; gap: 8px; }
  .side {
    width: auto; flex: 0 0 auto;
    height: auto; min-height: 0;
    position: static;
    flex-direction: row; align-items: center; justify-content: flex-start;
    gap: 6px; padding: 6px;
    overflow-x: auto; overflow-y: hidden;
    border-radius: 10px;
  }
  .nav { flex-direction: row; align-items: center; width: auto; gap: 4px; }
  .nav-item { width: auto; flex: 0 0 auto; margin: 0; padding: 0 11px; }
  .side-foot { display: none; }
  .main { padding: 12px; border-radius: 10px; }
  .card { padding: 13px; }
  .card-head { flex-wrap: wrap; }
  .page-title { justify-content: flex-start; }
  .pdf-toolbar { gap: 8px; }
  .sign-grid { gap: 10px; }
}
@media (max-width: 420px) {
  .nav-item { padding: 0 9px; gap: 5px; }
  .nav-ico { width: 17px; height: 17px; flex: 0 0 17px; }
  .main { padding: 10px; }
  .card { padding: 11px; }
}
