/* 钉钉应用集合平台 · 设计系统 v2
   business blue #2563EB / light & dark 双主题 / 零依赖原生 CSS
   设计取向：精致化升级 —— 更克制的层次、更柔和的阴影、更讲究的排版与微交互 */

/* ---------------------------------------------------------------- 设计令牌 */
:root,
:root[data-theme="light"] {
  /* 品牌色 */
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-active: #1E40AF;
  --primary-soft: rgba(37, 99, 235, 0.10);
  --primary-soft-2: rgba(37, 99, 235, 0.06);

  /* 中性色（带极微品牌冷调，避免死灰） */
  --bg: #F5F7FB;
  --surface: #FFFFFF;
  --surface-2: #F1F4F9;
  --surface-3: #EAEFF6;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);

  /* 文本 */
  --text: #0F172A;
  --text-2: #475569;
  --text-3: #94A3B8;

  /* 语义色 */
  --danger: #E11D48;
  --danger-soft: rgba(225, 29, 72, 0.08);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.10);
  --warn: #B45309;
  --warn-soft: rgba(180, 83, 9, 0.10);

  /* 阴影：若隐若现的层次 */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, 0.04), 0 10px 26px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 18px rgba(15, 23, 42, 0.08), 0 20px 48px rgba(15, 23, 42, 0.10);

  /* 圆角 */
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* 间距刻度（4pt 基准） */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;

  /* 动效曲线（指数缓出，禁用 bounce） */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --dur-fast: 120ms;
  --dur: 260ms;

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  --primary: #3B82F6;
  --primary-hover: #60A5FA;
  --primary-active: #93C5FD;
  --primary-soft: rgba(59, 130, 246, 0.16);
  --primary-soft-2: rgba(59, 130, 246, 0.10);

  /* 深色模式：用更亮的 surface 表达深度，而非阴影 */
  --bg: #0A0F1C;
  --surface: #131B2D;
  --surface-2: #1A2438;
  --surface-3: #222E45;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);

  --text: #E8EDF6;
  --text-2: #A6B3C6;
  --text-3: #6B7A92;

  --danger: #FB7185;
  --danger-soft: rgba(251, 113, 133, 0.14);
  --success: #34D399;
  --success-soft: rgba(52, 211, 153, 0.14);
  --warn: #FBBF24;
  --warn-soft: rgba(251, 191, 36, 0.14);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.45), 0 16px 36px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.55), 0 24px 56px rgba(0, 0, 0, 0.50);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* hidden 属性必须永远生效：作者样式里的 .auth-wrap / .viewer / .mask 等会压过浏览器
   默认的 [hidden]{display:none}（UA 样式优先级最低），导致登录后登录页仍占一整屏。
   此规则兜底所有用 hidden 切换的元素。 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.1px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

/* 统一焦点态：键盘可达性 + 精致 ring */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--text-2);
}

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: var(--space-3);
  height: 62px; padding: 0 var(--space-4);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.5) blur(14px);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
/* 品牌标识：骏利德 logo 已做去底透明处理，
   统一用「白色瓷砖 + contain 图片」承载，浅色/深色主题下都不露白块。 */
.brand-logo, .auth-logo, .auth-hero-logo {
  display: flex; align-items: center; justify-content: center;
  background: #fff;
}
.brand-logo img, .auth-logo img, .auth-hero-logo img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  flex: none;
}
.brand-logo {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  padding: 4px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.07);
}
.brand-text { min-width: 0; }
.brand-title {
  font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub { font-size: 12px; color: var(--text-3); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-spacer { flex: 1; }

.search-box { position: relative; width: 248px; }
.search-box input {
  width: 100%; height: 38px; padding: 0 14px 0 36px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface-2); outline: none; color: var(--text);
  transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast);
}
.search-box input::placeholder { color: var(--text-3); }
.search-box input:focus {
  border-color: var(--primary); background: var(--surface);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.search-box .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); display: grid; }

.icon-btn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.icon-btn:active { transform: scale(0.94); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: var(--primary-soft); color: var(--primary);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border);
  transition: box-shadow var(--dur-fast), transform var(--dur-fast);
}
.avatar:hover { box-shadow: 0 0 0 3px var(--primary-soft); }
.avatar:active { transform: scale(0.95); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.main { max-width: 1140px; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-16); }

/* 页头 + 问候语 */
.page-head { margin: 2px 0 var(--space-6); }
.greeting {
  font-size: 13px; color: var(--primary); font-weight: 600;
  margin-bottom: 4px; letter-spacing: 0.2px;
}
.page-head h1 { font-size: 22px; font-weight: 700; margin: 0 0 5px; letter-spacing: 0.2px; }
.page-head p { margin: 0; color: var(--text-2); font-size: 13px; }

.section { margin-bottom: var(--space-8); }
.section-head {
  display: flex; align-items: baseline; gap: var(--space-2); margin-bottom: var(--space-3);
}
.section-head h2 { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0; letter-spacing: 0.4px; }
.section-head .count { font-size: 12px; color: var(--text-3); }

.grid {
  display: grid; gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
}

/* ---------------------------------------------------------------- 应用卡片 */
.app-card {
  position: relative; display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
  /* 错位入场（基础 opacity:1 作为兜底，防止动画被整体禁用时卡片不可见） */
  opacity: 1;
  animation: card-in var(--dur) var(--ease-out) both;
  animation-delay: min(calc(var(--i, 0) * 38ms), 480ms);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
/* 搜索/筛选时关闭入场动画，避免逐字符输入时卡片反复闪动 */
.no-anim .app-card { animation: none !important; }
/* 顶部分类主题色细线：hover 时展开 */
.app-card::before {
  content: ""; position: absolute; top: 0; left: var(--space-4); right: var(--space-4);
  height: 2px; border-radius: 2px; background: var(--accent, var(--primary));
  opacity: 0; transform: scaleX(0.35); transform-origin: left;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.app-card:hover::before { opacity: 1; transform: scaleX(1); }
.app-card:active { transform: translateY(-1px); }

.app-icon {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  transition: transform var(--dur) var(--ease-out);
}
.app-card:hover .app-icon { transform: scale(1.06); }
.app-name { font-size: 14px; font-weight: 600; line-height: 1.35; letter-spacing: 0.2px; }
.app-desc {
  font-size: 12px; color: var(--text-3); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 36px;
}
.app-meta { display: flex; align-items: center; gap: var(--space-2); margin-top: auto; }
.tag {
  font-size: 11px; padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
  white-space: nowrap;
}
.tag-primary { background: var(--primary-soft); color: var(--primary); border-color: transparent; font-weight: 500; }
.app-open { margin-left: auto; color: var(--text-3); display: grid; transition: color var(--dur-fast), transform var(--dur) var(--ease-out); }
.app-card:hover .app-open { color: var(--primary); transform: translateX(2px); }

/* 最近使用（横向） */
.recent-row { display: flex; gap: var(--space-3); overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.recent-row .app-card { min-width: 176px; }
.recent-row::-webkit-scrollbar { height: 6px; }
.recent-row::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-pill); }

/* ---------------------------------------------------------------- 空态 */
.empty {
  padding: var(--space-8) var(--space-4); text-align: center; color: var(--text-3);
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface);
}
.empty strong { display: block; color: var(--text-2); font-weight: 600; margin-bottom: 4px; }

/* ---------------------------------------------------------------- 内嵌查看器 */
.viewer {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  background: var(--bg);
  animation: viewer-in var(--dur) var(--ease-out);
}
@keyframes viewer-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.viewer-bar {
  display: flex; align-items: center; gap: var(--space-2); flex: none;
  height: 54px; padding: 0 var(--space-3);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: saturate(1.5) blur(14px);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--border);
}
.viewer-title { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-loading { font-size: 12px; color: var(--text-3); }
.viewer-body { flex: 1; position: relative; background: var(--surface); overflow: auto; }
.viewer-body iframe { display: block; width: 100%; height: 100%; min-height: 100%; border: 0; }

/* ---------------------------------------------------------------- 弹层 */
.mask {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: var(--space-4);
  animation: mask-in var(--dur-fast) ease;
}
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }

.dialog {
  width: 100%; max-width: 440px; max-height: 88vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-5);
  animation: dialog-in var(--dur) var(--ease-out);
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.dialog h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; letter-spacing: 0.2px; }
.dialog .sub { margin: 0 0 var(--space-4); font-size: 12px; color: var(--text-3); line-height: 1.6; }

.field { margin-bottom: var(--space-3); }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; height: 40px; padding: 0 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); outline: none; color: var(--text);
  transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field textarea { height: 80px; padding: 9px 12px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); background: var(--surface);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.field .hint { font-size: 11px; color: var(--text-3); margin-top: 5px; line-height: 1.6; }
.hint { font-size: 11px; color: var(--text-3); line-height: 1.6; margin: var(--space-3) 0 0; }

.btn {
  height: 40px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; font-size: 14px; font-weight: 500;
  transition: background var(--dur-fast), border-color var(--dur-fast), opacity var(--dur-fast), transform var(--dur-fast);
}
.btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--danger); border-color: var(--border); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.row-actions { display: flex; gap: var(--space-3); margin-top: var(--space-4); }

/* ---------------------------------------------------------------- 登录页（品牌侧栏 + 表单分栏） */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: stretch;
  background: var(--bg);
}
.auth-hero {
  flex: 1.05; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--space-10) var(--space-10);
  color: #fff;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(96, 165, 250, 0.45), transparent 55%),
    radial-gradient(120% 90% at 100% 100%, rgba(30, 64, 175, 0.55), transparent 50%),
    linear-gradient(135deg, var(--primary) 0%, #1E3A8A 100%);
}
.auth-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 22px 22px; opacity: 0.5; pointer-events: none;
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero-top { display: flex; align-items: center; gap: 12px; }
.auth-hero-logo {
  width: 46px; height: 46px; border-radius: 13px;
  padding: 6px;
  box-shadow: 0 4px 14px rgba(2, 12, 40, 0.24);
}
.auth-hero-name { font-size: 18px; font-weight: 700; letter-spacing: 0.4px; }
.auth-hero-body { max-width: 420px; }
.auth-hero-body h2 { font-size: 30px; font-weight: 700; line-height: 1.3; margin: 0 0 var(--space-3); letter-spacing: 0.4px; }
.auth-hero-body p { font-size: 15px; line-height: 1.7; color: rgba(255, 255, 255, 0.82); margin: 0 0 var(--space-6); }
.auth-hero-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.auth-hero-list li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255, 255, 255, 0.92); }
.auth-hero-list .ic {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.14); color: #fff;
}
.auth-hero-foot { font-size: 12px; color: rgba(255, 255, 255, 0.6); }

.auth-main {
  flex: 0 0 460px; display: grid; place-items: center; place-content: center;
  padding: var(--space-8); overflow: auto;
}
.auth-card {
  width: 100%; max-width: 360px; padding: var(--space-8) var(--space-6);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  animation: dialog-in var(--dur) var(--ease-out);
}
.auth-logo {
  width: 54px; height: 54px; border-radius: 16px; margin: 0 auto var(--space-4);
  padding: 6px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.07);
}
.auth-card h1 { font-size: 19px; text-align: center; margin: 0 0 5px; font-weight: 700; letter-spacing: 0.3px; }
.auth-card .sub { text-align: center; color: var(--text-3); font-size: 12px; margin: 0 0 var(--space-6); }
.auth-status { font-size: 12px; color: var(--text-3); text-align: center; margin-top: var(--space-4); line-height: 1.6; }
.divider { display: flex; align-items: center; gap: var(--space-3); color: var(--text-3); font-size: 12px; margin: var(--space-4) 0; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }

/* ---------------------------------------------------------------- 提示 */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  z-index: 90; max-width: 88vw;
  padding: 11px 18px; border-radius: 12px;
  background: var(--text); color: var(--bg);
  font-size: 13px; box-shadow: var(--shadow-lg);
  animation: toast-in var(--dur) var(--ease-out);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------------------------------------------------------------- 管理后台 */
.admin-shell { max-width: 1100px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-16); }
.tabs {
  display: flex; gap: 6px; margin-bottom: var(--space-5);
  overflow-x: auto; padding-bottom: 2px; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 15px; border: 1px solid transparent; background: transparent; cursor: pointer;
  color: var(--text-2); font-size: 13px; border-radius: var(--radius-pill); white-space: nowrap;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-5); margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.panel-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.panel-head h2 { font-size: 15px; font-weight: 700; margin: 0; flex: 1; letter-spacing: 0.2px; }
.panel-head .hint { font-size: 12px; color: var(--text-3); }

.stat-row { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); }
.stat {
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.stat .v { font-size: 22px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; letter-spacing: 0.2px; }
.stat .k { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 13px 4px; border-bottom: 1px solid var(--border);
  transition: background var(--dur-fast);
}
.list-item:hover { background: var(--surface-2); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t1 { font-size: 14px; font-weight: 500; }
.list-item .t2 { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .ops { display: flex; gap: 4px; flex: none; align-items: center; }
.hidden-tag { font-size: 11px; color: var(--warn); background: var(--warn-soft); border: 1px solid transparent; border-radius: var(--radius-pill); padding: 1px 8px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
table.tbl th { color: var(--text-3); font-weight: 500; font-size: 12px; }
table.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }

.switch-row { display: flex; align-items: center; gap: var(--space-3); padding: 9px 0; }
.switch-row .grow { flex: 1; }
.switch-row .t1 { font-size: 13px; }
.switch-row .t2 { font-size: 12px; color: var(--text-3); line-height: 1.5; }

/* 复选框 → 精致开关（仅用于开关行） */
.switch-row input.chk {
  appearance: none; -webkit-appearance: none;
  width: 42px; height: 24px; flex: none; cursor: pointer;
  border-radius: var(--radius-pill); background: var(--border-strong);
  position: relative; transition: background var(--dur) var(--ease-out);
}
.switch-row input.chk::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform var(--dur) var(--ease-out);
}
.switch-row input.chk:checked { background: var(--primary); }
.switch-row input.chk:checked::after { transform: translateX(18px); }
.switch-row input.chk:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
/* 普通复选框保持强调色 */
.chk { accent-color: var(--primary); }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 860px) {
  .auth-hero { display: none; }
  .auth-main { flex: 1; }
}
@media (max-width: 720px) {
  .brand-sub { display: none; }
  .search-box { display: none; }
  .main { padding: var(--space-4) var(--space-3) var(--space-12); }
  .admin-shell { padding: var(--space-4) var(--space-3) var(--space-12); }
  .page-head h1 { font-size: 19px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .app-card { padding: 12px; gap: 10px; }
  .app-desc { min-height: 32px; }
  .recent-row .app-card { min-width: 46%; }
  .viewer-bar { height: 50px; }
  .mobile-search { display: block; margin: 0 0 var(--space-4); }
}
.mobile-search { display: none; }
.mobile-search input {
  width: 100%; height: 40px; padding: 0 14px 0 36px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface); outline: none; color: var(--text);
}
.mobile-search .wrap { position: relative; }
.mobile-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); display: grid; }

/* ---------------------------------------------------------------- 动效降级 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
}
