/* =========================================================================
   OneBiz 擎营 · 管理端（Admin Console）
   复用 ../assets/style.css 的设计 token（--navy / --line / --bg / --card 等），
   在其之上补齐后台所需的表格、矩阵、抽屉、弹窗与响应式规则。
   ========================================================================= */

:root {
  --a-side-w: 236px;
  --a-radius: 14px;
  --a-radius-sm: 10px;
  --a-shadow: 0 1px 2px rgba(15, 27, 51, .04), 0 8px 24px rgba(15, 27, 51, .06);
}

/* style.css 中 .view 需配合 hidden 使用 */
[hidden] { display: none !important; }

body {
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
}
body.no-scroll { overflow: hidden; }

/* style.css 对 svg 设有 width:100%，后台需约束内联图标尺寸 */
.a-main svg,
.modal svg,
.drawer svg { flex: 0 0 auto; }
.search svg { width: 14px; height: 14px; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.btn > svg { width: 14px; height: 14px; }
.empty .eico svg { width: 26px; height: 26px; }
.sync-ico svg { width: 18px; height: 18px; }
.stat-ico svg { width: 14px; height: 14px; }
.a-side .nav .n-ico { width: 16px; height: 16px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: #eef2f8;
  color: #334155;
  padding: 1px 5px;
  border-radius: 5px;
}

/* =========================================================================
   1. 骨架：左侧导航 + 内容区
   ========================================================================= */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

.a-side {
  width: var(--a-side-w);
  flex: 0 0 var(--a-side-w);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  background: linear-gradient(180deg, #0e1a30 0%, #132342 100%);
  color: #cbd5e1;
}

.a-side .brand { padding: 0 8px 16px; }
.a-side .brand-text { min-width: 0; }
.a-side .brand-sub { font-size: 10px; letter-spacing: .1em; }

.a-side .nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.a-side .nav-label {
  font-size: 10.5px;
  letter-spacing: .14em;
  padding: 12px 10px 5px;
  color: #64748b;
  white-space: nowrap;
}

.a-side .nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  margin: 1px 0;
  border-radius: 9px;
  font-size: 13.5px;
  color: #cbd5e1;
  white-space: nowrap;
}
.a-side .nav a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.06); }
.a-side .nav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(59,130,246,.3), rgba(13,148,136,.2));
  box-shadow: inset 0 0 0 1px rgba(96,165,250,.35);
}
.a-side .nav .n-ico { flex: 0 0 16px; opacity: .7; }
.a-side .nav a:hover .n-ico,
.a-side .nav a.active .n-ico { opacity: 1; }
.a-side .nav a.nav-back { color: #93c5fd; }
.a-side .nav a.nav-back:hover { color: #dbeafe; }

.a-side .side-foot {
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 11px;
  color: #64748b;
}
.side-admin { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.side-admin-t { min-width: 0; line-height: 1.3; }
.side-admin-t b { display: block; font-size: 12.5px; color: #e2e8f0; font-weight: 600; }
.side-admin-t span { font-size: 10.5px; color: #7f8ea6; }
.side-ver { line-height: 1.6; }

.mini-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #0d9488);
}

/* ------------------------- 内容区 ------------------------- */
.a-main {
  flex: 1;
  min-width: 0;
  padding: 20px 28px 56px;
}

.a-topbar { margin-bottom: 14px; gap: 12px; }
.a-topbar .crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-topbar .env-pill { white-space: nowrap; }

.admin-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--a-shadow);
}
.admin-chip-t { display: flex; flex-direction: column; line-height: 1.25; }
.admin-chip-t b { font-size: 12px; color: #1f2a37; }
.admin-chip-t span { font-size: 10.5px; color: var(--muted); }

/* ------------------------- 核心闭环提示条 ------------------------- */
.sync-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  margin-bottom: 16px;
  border: 1px solid #cfe0f8;
  border-radius: 12px;
  background: linear-gradient(90deg, #eef5ff 0%, #ecfaf6 100%);
}
.sync-ico {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  box-shadow: 0 4px 10px rgba(37, 99, 235, .22);
}
.sync-t { min-width: 0; }
.sync-t b { display: block; font-size: 13.5px; color: #12305c; letter-spacing: .01em; }
.sync-t span { display: block; font-size: 12.5px; color: #475569; }
.sync-t code { background: #dbeafe; color: #1e40af; }
.sync-link { flex: 0 0 auto; margin-left: auto; }

.guard-note {
  padding: 9px 14px;
  margin-bottom: 16px;
  border: 1px solid #fcd9b6;
  border-radius: 10px;
  background: var(--amber-soft);
  color: #92400e;
  font-size: 12.5px;
}

/* =========================================================================
   2. 通用区块：页头 / 统计 / 面板 / 工具栏
   ========================================================================= */
.view { animation: viewIn .22s ease; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 2px 0 16px;
}
.page-head h1 { font-size: 22px; letter-spacing: -.3px; }
.page-head p { margin: 5px 0 0; max-width: 820px; color: var(--muted); font-size: 13px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-note { margin-top: 12px; color: #94a3b8; font-size: 12px; }

.btn { padding: 9px 15px; font-size: 13.5px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn-primary:disabled,
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-danger { background: #b91c1c; color: #fff; }
.btn-danger:hover { background: #991b1b; text-decoration: none; }
.btn-badge {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  margin-left: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
  font-size: 10.5px;
  font-weight: 700;
}
.btn:disabled .btn-badge { background: rgba(255,255,255,.18); }

.icon-btn {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.icon-btn:hover { background: #f1f5fb; color: #1f2a37; }

/* 统计卡 */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  position: relative;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--a-shadow);
}
.stat-k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat b {
  display: block;
  margin-top: 1px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
  color: #0f1b33;
}
.stat b small { font-size: 12px; font-weight: 600; color: #94a3b8; margin-left: 2px; }
.stat-s { display: block; font-size: 11.5px; color: #94a3b8; }
.stat-s.good { color: #15803d; }
.stat-s.warn { color: #b45309; }
.stat-ico {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef5ff;
  color: #2563eb;
}

/* 面板 */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--a-radius);
  box-shadow: var(--a-shadow);
  margin-bottom: 16px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 18px;
  border-bottom: 1px solid #eef2f8;
}
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; }
.panel-sub { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.panel-sub strong { color: #334155; }
.panel-tip { font-size: 11.5px; color: #94a3b8; }
.panel-body { padding: 16px 18px; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid #eef2f8;
  background: #fbfcfe;
}
.toolbar-info { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.search { position: relative; flex: 1 1 230px; max-width: 330px; }
.search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 31px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
}
.search input::placeholder { color: #a8b3c4; }
.search input:focus {
  outline: none;
  border-color: #93b8f9;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.sel {
  height: 34px;
  padding: 0 28px 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 11px;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
}
.sel:focus {
  outline: none;
  border-color: #93b8f9;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.sel-sm { height: 30px; font-size: 12px; }

/* =========================================================================
   3. 表格
   ========================================================================= */
.panel .table-wrap { border-left: 0; border-right: 0; border-radius: 0; }
.a-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.a-table th {
  padding: 9px 12px;
  background: #f1f5fb;
  border-bottom: 1px solid #e6ecf5;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-align: left;
  white-space: nowrap;
}
.a-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f8;
  vertical-align: middle;
  color: #1f2a37;
}
.a-table tbody tr:last-child td { border-bottom: none; }
.a-table tbody tr:hover { background: #fafcff; }
.ta-r { text-align: right !important; }

.u-acc { font-weight: 600; font-size: 13px; color: #0f1b33; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.u-id { font-size: 10.5px; color: #a0aec0; margin-top: 1px; font-variant-numeric: tabular-nums; }
.u-name { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.u-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #64748b, #334155);
}
.u-email { display: block; margin-top: 1px; font-size: 11px; color: #94a3b8; }
.u-dept { font-size: 12.5px; color: #475569; }

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.65;
}
.role-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: 0 0 5px; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.status i { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.status.on { color: #15803d; }
.status.on i { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .14); }
.status.off { color: #94a3b8; }
.status.off i { background: #cbd5e1; }

.mfa {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.mfa.on { color: #15803d; background: var(--green-soft); border-color: #bfe3c8; }
.mfa.off { color: #b45309; background: var(--amber-soft); border-color: #fcd9b6; }

.mono-time { font-size: 12px; color: #475569; font-variant-numeric: tabular-nums; white-space: nowrap; }

.row-ops { display: flex; align-items: center; gap: 2px; justify-content: flex-end; flex-wrap: nowrap; }
.op {
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 12px;
  padding: 4px 7px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}
.op:hover { background: #eef5ff; color: #1d4ed8; }
.op.warn:hover { background: var(--amber-soft); color: var(--amber); }
.op.danger:hover { background: var(--red-soft); color: var(--red); }
.op:disabled { color: #c2cad6; cursor: not-allowed; background: transparent; }

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 1px solid #eef2f8;
}
.foot-note { font-size: 11.5px; color: var(--muted); }
.pager { display: flex; align-items: center; gap: 4px; }
.pg {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.pg:hover:not(:disabled) { border-color: #c7d2e2; color: #1d4ed8; }
.pg.active { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }
.pg:disabled { opacity: .45; cursor: not-allowed; }

/* 空状态 */
.empty {
  padding: 40px 20px 42px;
  text-align: center;
  color: var(--muted);
}
.empty .eico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: #f1f5fb;
  color: #94a3b8;
}
.empty b { display: block; font-size: 13.5px; color: #334155; margin-bottom: 3px; }
.empty > span { display: block; font-size: 12.5px; }
.empty > div { margin-top: 12px; }

/* =========================================================================
   4. 权限矩阵
   ========================================================================= */
.matrix-panel { overflow: hidden; }
.matrix-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.meta-pill {
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fafd;
  color: #475569;
  font-variant-numeric: tabular-nums;
}
.meta-pill.source-default { background: #f1f5f9; color: #64748b; }
.meta-pill.source-override { background: var(--blue-soft); color: #1d4ed8; border-color: #c7dbff; }

.chip-count {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #b45309;
  font-size: 11.5px;
  font-weight: 600;
}
.chip-count.zero { background: #f1f5f9; border-color: #e2e8f0; color: #94a3b8; }

.matrix-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 18px;
  border-bottom: 1px solid #eef2f8;
  background: #fbfcfe;
  font-size: 12px;
  color: #475569;
}
.lg-item { display: inline-flex; align-items: center; gap: 6px; }
.lv-swatch { width: 11px; height: 11px; border-radius: 4px; border: 1px solid transparent; display: inline-block; }
.lv-swatch.lv0 { background: #f1f5f9; border-color: #e2e8f0; }
.lv-swatch.lv1 { background: #e8f0fe; border-color: #c7dbff; }
.lv-swatch.lv2 { background: #fff4e5; border-color: #fcd9b6; }
.lv-swatch.lv3 { background: #e6f4ea; border-color: #bfe3c8; }
.lg-hint { margin-left: auto; color: #94a3b8; font-size: 11.5px; }

.matrix-scroll { overflow: auto; max-height: none; }
.matrix-table {
  width: 100%;
  min-width: 940px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}
.matrix-table th,
.matrix-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #eef2f8;
  text-align: center;
  vertical-align: middle;
}
.matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f1f5fb;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  border-bottom: 1px solid #e0e8f3;
}
.matrix-table thead th:first-child {
  left: 0;
  z-index: 4;
  text-align: left;
  padding-left: 16px;
}
.mh-name { display: block; }
.mh-code { display: block; margin-top: -1px; font-size: 9.5px; color: #94a3b8; font-weight: 500; letter-spacing: .03em; }
.matrix-table .role-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 212px;
  padding: 9px 14px 9px 16px;
  text-align: left;
  background: #fff;
  box-shadow: 1px 0 0 #eef2f8;
}
.matrix-table tbody tr:hover td { background: #fafcff; }
.matrix-table tbody tr:hover .role-cell { background: #fafcff; }
.matrix-role { display: flex; align-items: center; gap: 8px; }
.matrix-role-t { min-width: 0; line-height: 1.4; }
.matrix-role-t b { display: block; font-size: 12.5px; color: #1f2a37; }
.matrix-role-t span { font-size: 10.5px; color: #94a3b8; }
.matrix-role .role-badge { flex: 0 0 auto; }

.mcell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.mcell:hover { transform: translateY(-1px); filter: brightness(.98); }
.mcell:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }
.mcell.lv0 { background: #f1f5f9; border-color: #e2e8f0; color: #94a3b8; }
.mcell.lv1 { background: #e8f0fe; border-color: #c7dbff; color: #1d4ed8; }
.mcell.lv2 { background: #fff4e5; border-color: #fcd9b6; color: #b45309; }
.mcell.lv3 { background: #e6f4ea; border-color: #bfe3c8; color: #15803d; }
.mcell.dirty { box-shadow: 0 0 0 2px #f59e0b; }
.mcell.dirty::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f59e0b;
}

.matrix-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 18px;
  border-top: 1px solid #eef2f8;
  background: #fbfcfe;
}
.matrix-foot-note { font-size: 11.5px; color: #64748b; }
.matrix-foot-note b { color: #334155; }
.matrix-actions { display: flex; gap: 8px; }
.matrix-actions .btn-primary { box-shadow: 0 2px 8px rgba(37, 99, 235, .24); }

/* 应用端菜单预览 */
.preview-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pmod {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
}
.pmod.on { border-color: #bfe3c8; background: #f4fbf7; }
.pmod.off { border-style: dashed; opacity: .72; }
.pmod-t { min-width: 0; }
.pmod-t b { display: block; font-size: 12px; color: #1f2a37; }
.pmod-t span { font-size: 10px; color: #94a3b8; }
.pmod-lv {
  flex: 0 0 auto;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.7;
}
.pmod-lv.lv0 { background: #f1f5f9; color: #94a3b8; }
.pmod-lv.lv1 { background: #e8f0fe; color: #1d4ed8; }
.pmod-lv.lv2 { background: #fff4e5; color: #b45309; }
.pmod-lv.lv3 { background: #e6f4ea; color: #15803d; }
.preview-note { margin: 11px 0 0; font-size: 12px; color: var(--muted); }

.closeloop {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 14px 18px;
  border: 1px dashed #c7dbff;
  border-radius: 12px;
  background: #f8fbff;
  flex-wrap: wrap;
}
.closeloop-step { flex: 1 1 220px; min-width: 0; position: relative; padding-left: 30px; }
.closeloop-idx {
  position: absolute;
  left: 0;
  top: 0;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}
.closeloop-step b { display: block; font-size: 12.5px; color: #12305c; }
.closeloop-step span { display: block; font-size: 11.5px; color: #475569; margin-top: 1px; }
.closeloop-arrow { align-self: center; color: #93b8f9; font-weight: 700; }

/* =========================================================================
   5. 智能体授权
   ========================================================================= */
.grant-body { display: flex; flex-direction: column; gap: 14px; }
.role-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.rtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.rtab:hover { border-color: #c7d2e2; }
.rtab i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.rtab.active { background: #0e1a30; border-color: #0e1a30; color: #fff; font-weight: 600; }
.grant-hint { margin: 0; font-size: 12px; color: var(--muted); }
.grant-hint code { font-size: 11px; }

.fam-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.fam-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.fam-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-bottom: 1px solid #eef2f8;
  background: #fbfcfe;
  font-size: 12.5px;
  font-weight: 700;
  color: #1f2a37;
}
.fam-dot { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 8px; }
.fam-count { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.fam-check {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
  cursor: pointer;
  margin: 0;
}
.agent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 13px;
  border-bottom: 1px solid #f3f6fb;
  cursor: pointer;
  transition: background .12s;
}
.agent-row:last-child { border-bottom: none; }
.agent-row:hover { background: #f8fbff; }
.agent-row input {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin: 2px 0 0;
  accent-color: #2563eb;
  cursor: pointer;
}
.agent-row-t { min-width: 0; flex: 1; }
.ar-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; color: #1f2a37; }
.ar-desc { display: block; margin-top: 1px; font-size: 11px; line-height: 1.55; color: var(--muted); }
.lvl-tag { padding: 0 6px; border-radius: 5px; font-size: 10px; font-weight: 700; line-height: 1.7; }
.lvl-tag.lvA3 { background: var(--green-soft); color: var(--green); }
.lvl-tag.lvA2 { background: var(--blue-soft); color: #1d4ed8; }
.lvl-tag.lvA1 { background: var(--amber-soft); color: var(--amber); }
.lvl-tag.lvA0 { background: #eceff1; color: #455a64; }
#grantDirtyTip {
  font-size: 11.5px;
  color: #b45309;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 1px 9px;
}

/* =========================================================================
   6. 审计日志
   ========================================================================= */
.audit-table .a-op { display: flex; align-items: center; gap: 7px; min-width: 0; }
.audit-table .a-op-t { min-width: 0; line-height: 1.35; }
.audit-table .a-op-t b { display: block; font-size: 12.5px; color: #1f2a37; font-weight: 600; }
.audit-table .a-op-t span { font-size: 10.5px; color: #94a3b8; }
.a-action {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafd;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.a-action.tag-danger { background: var(--red-soft); border-color: #fecaca; color: var(--red); }
.a-action.tag-warn { background: var(--amber-soft); border-color: #fcd9b6; color: var(--amber); }
.a-action.tag-info { background: var(--blue-soft); border-color: #c7dbff; color: #1d4ed8; }
.a-action.tag-safe { background: var(--green-soft); border-color: #bfe3c8; color: #15803d; }
.a-obj { font-size: 12.5px; color: #475569; max-width: 320px; }
.a-obj small { display: block; font-size: 10.5px; color: #a0aec0; }
.res { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.res.ok { background: var(--green-soft); color: #15803d; }
.res.fail { background: var(--red-soft); color: var(--red); }
.res.warn { background: var(--amber-soft); color: var(--amber); }
.ip { font-size: 11.5px; color: #64748b; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; }

/* =========================================================================
   7. 表单 / 企业设置
   ========================================================================= */
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #334155; }
.field > span:first-child { display: flex; align-items: center; gap: 3px; }
.field input,
.field select {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
}
.field select {
  padding-right: 28px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 11px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: #93b8f9;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.field input:disabled,
.field input[readonly] { background: #f8fafd; color: #64748b; cursor: default; }
.req { color: #dc2626; font-style: normal; }
.hint { font-size: 11px; font-weight: 400; color: #94a3b8; }
.err { display: none; font-size: 11px; font-weight: 500; color: #b91c1c; }
.err.visible { display: block; }
.field.bad input,
.field.bad select { border-color: #f87171; background: #fffafa; }
.field.bad .err { display: block; }
.field.bad .hint { display: none; }
.field-hint { margin: 10px 0 0; font-size: 11.5px; color: #94a3b8; }
.field-hint b { color: #475569; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eef2f8;
}

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr); gap: 16px; align-items: start; }
.kv {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #e6ecf5;
  font-size: 12.5px;
  color: var(--muted);
}
.kv:last-of-type { border-bottom: none; }
.kv b { font-weight: 600; color: #1f2a37; text-align: right; }
.notice.small { margin-top: 14px; font-size: 11.5px; line-height: 1.6; }

/* =========================================================================
   8. 右侧抽屉（新建 / 编辑用户）
   ========================================================================= */
.mask {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(16, 24, 40, .44);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}
.mask.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  width: min(560px, 100vw);
  height: 100vh;
  height: 100dvh;
  background: #fff;
  box-shadow: -24px 0 70px rgba(15, 27, 51, .24);
  transform: translateX(104%);
  visibility: hidden;
  transition: transform .3s cubic-bezier(.32, .72, .24, 1), visibility .3s;
}
.drawer.open { transform: none; visibility: visible; }

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #eef2f8;
}
.drawer-head h2 { font-size: 18px; letter-spacing: -.2px; }
.drawer-sub { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 22px 8px;
}
.drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 22px 16px;
  border-top: 1px solid #eef2f8;
  background: #fbfcfe;
}
.foot-hint { font-size: 11.5px; color: var(--muted); }
.foot-btns { display: flex; gap: 8px; }
.foot-btns .btn { min-width: 84px; justify-content: center; }

.form-alert {
  margin-bottom: 14px;
  padding: 9px 12px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
}
.form-alert.info { border-color: #c7dbff; background: var(--blue-soft); color: #1d4ed8; }

.fset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.fset legend {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1f2a37;
}
.fset legend::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: linear-gradient(180deg, #2563eb, #0d9488);
}
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fgrid .full { grid-column: 1 / -1; }

.role-preview {
  grid-column: 1 / -1;
  padding: 9px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #fbfcfe;
  font-size: 11.5px;
  color: #475569;
}
.rp-head { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #334155; font-size: 12px; }
.rp-head .role-badge { margin-left: 2px; }
.rp-scope { margin-top: 3px; color: #64748b; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rp-chip {
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid #c7dbff;
  background: var(--blue-soft);
  color: #1d4ed8;
  font-size: 10.5px;
  line-height: 1.7;
}
.rp-chip.no {
  border-color: #e2e8f0;
  background: #f1f5f9;
  color: #a0aec0;
  text-decoration: line-through;
}
.rp-note { margin-top: 6px; font-size: 10.5px; color: #94a3b8; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.sr-t { line-height: 1.35; min-width: 0; }
.sr-t b { display: block; font-size: 12px; font-weight: 600; color: #1f2a37; }
.sr-t span { font-size: 10.5px; color: var(--muted); }

/* iOS 风格开关 */
.switch { position: relative; display: inline-flex; flex: 0 0 40px; width: 40px; height: 23px; }
.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  z-index: 2;
  cursor: pointer;
}
.switch .track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .2s ease;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 27, 51, .25);
  transition: transform .2s ease;
}
.switch input:checked + .track { background: #2563eb; }
.switch input:checked + .track::after { transform: translateX(17px); }
.switch input:focus-visible + .track { outline: 2px solid #93c5fd; outline-offset: 2px; }
.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;
}

/* 分段控件 */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f1f5f9;
  max-width: 100%;
  flex-wrap: wrap;
}
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span {
  display: block;
  padding: 4px 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}
.seg input:checked + span { background: #fff; color: #1d4ed8; box-shadow: 0 1px 2px rgba(15, 27, 51, .14); }
.seg input:focus-visible + span { outline: 2px solid #93c5fd; }

.scope-panel { margin-top: 9px; }
.scope-fams { display: flex; flex-wrap: wrap; gap: 6px; }
.scope-fam {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11.5px;
  color: #475569;
  cursor: pointer;
}
.scope-fam input { width: 13px; height: 13px; margin: 0; accent-color: #2563eb; }
.scope-fam.on { border-color: #bfe3c8; background: #f4fbf7; color: #15803d; }
.scope-count { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.inline-field { width: 170px; }
.scope-summary { margin: 9px 0 0; font-size: 11.5px; color: #64748b; }
.scope-summary b { color: #1d4ed8; }

/* 密码输入 + 强度 */
.pwd-wrap { display: flex; gap: 6px; align-items: center; }
.pwd-wrap input { flex: 1; }
.pwd-actions { display: flex; gap: 8px; align-items: center; }
.strength { display: flex; gap: 4px; margin-top: 6px; }
.sbar { flex: 1; height: 4px; border-radius: 2px; background: #eef2f8; transition: background .18s; }
.sbar.on.s1 { background: #ef4444; }
.sbar.on.s2 { background: #f59e0b; }
.sbar.on.s3 { background: #2563eb; }
.sbar.on.s4 { background: #16a34a; }
.pwd-rules { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 5px; font-size: 10.5px; color: #94a3b8; }
.rule::before { content: "○ "; }
.rule.ok { color: #15803d; }
.rule.ok::before { content: "✓ "; font-weight: 700; }

/* =========================================================================
   9. 弹窗 / 提示
   ========================================================================= */
.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 24, 40, .48);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.modal-wrap.show { opacity: 1; pointer-events: auto; }
.modal {
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(15, 27, 51, .32);
  transform: translateY(8px) scale(.985);
  transition: transform .2s ease;
}
.modal-wrap.show .modal { transform: none; }
.modal-sm { width: min(440px, 100%); }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 6px;
}
.modal-head h3 { font-size: 16px; }
.modal-sub { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.modal-body { padding: 6px 20px 16px; }
.modal-text { margin: 0; font-size: 13px; line-height: 1.7; color: #475569; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px 18px;
  border-top: 1px solid #eef2f8;
}

.secret-user {
  padding: 9px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
  font-size: 12.5px;
  color: #334155;
}
.secret-user b { color: #1f2a37; }
.tmp-pwd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  margin: 12px 0 10px;
  border-radius: 10px;
  background: #0f172a;
}
.tmp-pwd code {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: #a7f3d0;
  font-size: 14px;
  letter-spacing: .6px;
  word-break: break-all;
}
.tmp-pwd.blank code { color: #64748b; letter-spacing: 0; font-size: 12.5px; }
.tmp-pwd .btn { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #e2e8f0; }
.tmp-pwd .btn:hover { background: rgba(255,255,255,.16); }
.tmp-pwd .btn:disabled { opacity: .45; }
.secret-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.toast-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
/* 抽屉打开时把提示移到左下，避免遮挡抽屉底部主操作按钮 */
@media (min-width: 861px) {
  body.drawer-open .toast-wrap { right: auto; left: 20px; }
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 11px;
  background: #0f1b33;
  color: #e2e8f0;
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: 0 14px 40px rgba(15, 27, 51, .3);
  animation: toastIn .22s ease;
  pointer-events: auto;
}
.toast .ticon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}
.toast.success .ticon { background: #22c55e; color: #052e16; }
.toast.error .ticon { background: #ef4444; color: #fff; }
.toast.info .ticon { background: #3b82f6; color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* =========================================================================
   10. 页脚
   ========================================================================= */
.a-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: #94a3b8;
  font-size: 11.5px;
}
.a-foot-links { display: flex; gap: 14px; }
.a-foot-links a { color: #64748b; }
.a-foot-links a:hover { color: #2563eb; }

/* =========================================================================
   11. 响应式
   ========================================================================= */

/* 1400 以下：统计卡 2 列、预览 3 列 */
@media (max-width: 1400px) {
  .preview-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
  .a-main { padding: 18px 20px 48px; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
}

/* 核心响应式：<1100px 左侧导航折叠为顶部横向滚动条 */
@media (max-width: 1100px) {
  .admin-shell { flex-direction: column; }

  .a-side {
    position: sticky;
    top: 0;
    width: 100%;
    flex: 0 0 auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 27, 51, .18);
  }
  .a-side .brand { padding: 0; flex: 0 0 auto; }
  .a-side .brand-mark { width: 30px; height: 30px; font-size: 13px; border-radius: 9px; }
  .a-side .brand-name { font-size: 13.5px; }
  .a-side .brand-sub { display: none; }
  .a-side .nav {
    flex: 1;
    flex-direction: row;
    gap: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .a-side .nav::-webkit-scrollbar { height: 4px; }
  .a-side .nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 2px; }
  .a-side .nav-label { display: none; }
  .a-side .nav a {
    padding: 6px 11px;
    margin: 0;
    font-size: 12.5px;
    flex: 0 0 auto;
    border-radius: 8px;
  }
  .a-side .nav .dot { display: none; }
  .a-side .side-foot { display: none; }
  .a-main { padding: 16px 16px 44px; padding-left: 16px; }
  .fam-grid { grid-template-columns: 1fr; }
  .matrix-scroll { max-height: 66vh; }
}

@media (max-width: 860px) {
  .a-topbar .crumb { width: 100%; }
  .a-topbar .topbar-right { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .sync-banner { align-items: flex-start; }
  .sync-link { margin-left: 0; }
  .sync-t code { word-break: break-all; }
  .page-head { align-items: flex-start; }
  .head-actions { width: 100%; }
  .toolbar .search { max-width: none; flex: 1 1 100%; }
  .toolbar-info { margin-left: 0; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .fgrid { grid-template-columns: 1fr; }
  .preview-list { grid-template-columns: 1fr 1fr; }
  .matrix-legend .lg-hint { margin-left: 0; width: 100%; }
  .closeloop { flex-direction: column; }
  .closeloop-arrow { display: none; }
  .a-foot { flex-direction: column; align-items: flex-start; }
  .fam-grid { grid-template-columns: 1fr; }
  .modal { width: 100%; }
}

@media (max-width: 640px) {
  .a-main { padding: 12px 12px 40px; }
  .a-side { padding: 7px 10px; gap: 8px; }
  .a-side .nav a span { font-size: 12px; }
  .page-head h1 { font-size: 19px; }
  .stat { padding: 10px 12px; }
  .stat b { font-size: 21px; }
  .stat-ico { display: none; }
  .admin-chip-t { display: none; }
  .admin-chip { padding: 3px; background: transparent; border: 0; box-shadow: none; }
  .preview-list { grid-template-columns: 1fr; }
  .role-tabs { gap: 4px; }
  .rtab { font-size: 11.5px; padding: 4px 9px; }
  .drawer { width: 100vw; }
  .drawer-head { padding: 14px 16px 12px; }
  .drawer-body { padding: 14px 16px 6px; }
  .drawer-foot { padding: 11px 16px 14px; }
  .foot-hint { display: none; }
  .foot-btns { width: 100%; }
  .foot-btns .btn { flex: 1; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; justify-content: center; }
  .toast-wrap { right: 12px; left: 12px; bottom: 12px; max-width: none; }
  .matrix-table { min-width: 860px; }
  .table-wrap { max-width: 100%; }
  .a-table { min-width: 860px; }
  .audit-table { min-width: 760px; }
}

@media (max-width: 480px) {
  .a-side .brand-text { display: none; }
  .a-side .brand { gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
