/* ═══════════════════════════════════════════════════════
   管理后台 — Dark Morandi Luxury Dashboard (admin.css v6)
   依据后台管理首页设计图还原：深海军蓝 / 莫兰迪青绿 / 雾紫 / 暖橙 / 毛玻璃
   v6.1: 增强色差 — 页面底色更暗，面板/卡片更亮，提升层次感
   ═══════════════════════════════════════════════════════ */

#page-admin {
  padding: 18px 22px 96px;
  background:
    radial-gradient(circle at 12% 0%, rgba(95, 194, 192, .06), transparent 28%),
    radial-gradient(circle at 88% 30%, rgba(184, 156, 248, .04), transparent 35%),
    linear-gradient(180deg, #0a101e 0%, #060c16 100%);
}

.adm-wrap {
  --adm-bg: #070d18;
  --adm-panel: #1a2738;
  --adm-panel-2: #132034;
  --adm-panel-3: #253447;
  --adm-cyan: #5fc2c0;
  --adm-cyan-2: #7aa4af;
  --adm-purple: #b89cf8;
  --adm-orange: #e39b80;
  --adm-green: #6fd3ac;
  --adm-muted: #7b8a9c;
  --adm-muted-2: #5f6c7d;
  --adm-white: #f8fafc;
  --adm-line: rgba(255, 255, 255, .08);
  --adm-border: rgba(255, 255, 255, .075);
  width: 100%;
  color: var(--adm-white);
  font-family: var(--font, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif);
  animation: adm-fade-in .28s ease-out;
}

.adm-wrap *,
.adm-wrap *::before,
.adm-wrap *::after {
  box-sizing: border-box;
}

.adm-wrap svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* 顶部 Banner */
.adm-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 164px;
  margin: 0 0 24px;
  padding: 24px 28px;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, .075);
  background:
    radial-gradient(circle at 88% -12%, rgba(91, 194, 192, .15), transparent 34%),
    linear-gradient(135deg, #1a2638 0%, #121d2e 100%);
  box-shadow:
    0 20px 60px rgba(5, 12, 24, .38),
    inset 0 1px 0 rgba(255, 255, 255, .05);
}

.adm-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .045), transparent 42%),
    radial-gradient(circle at 20% 88%, rgba(255, 255, 255, .035), transparent 34%);
  pointer-events: none;
}

.adm-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -30px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 194, 192, .15), transparent 68%);
  pointer-events: none;
}

.adm-profile-back {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 2;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(95, 194, 192, .34);
  background: rgba(18, 29, 46, .82);
  color: #7fe8e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 26px rgba(5, 12, 24, .26), 0 0 0 1px rgba(95, 194, 192, .08);
}

.adm-profile-back::after {
  content: '';
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--adm-orange);
  box-shadow: 0 0 0 3px rgba(18, 29, 46, .9);
}

.adm-profile-back .adm-home-icon {
  width: 24px;
  height: 24px;
  stroke-width: 2.35;
}

.adm-hero-head,
.adm-hero-desc {
  position: relative;
  z-index: 1;
}

.adm-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.adm-hero-title {
  color: #f8fafc;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  white-space: nowrap;
}

.adm-hero-desc {
  margin-top: auto;
  color: #758294;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
}

.adm-hero .adm-role {
  margin-top: auto;
  align-self: flex-start;
}

/* Tab 导航 — 卡片包裹 + 横排溢出自滚动 */
#page-admin .adm-card-tabs {
  position: relative;
  padding: 14px 14px 0;
  margin: 0 0 24px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 16% 0%, rgba(95, 194, 192, .08), transparent 34%),
    linear-gradient(135deg, rgba(26, 39, 56, .74), rgba(19, 32, 52, .84));
  border: 1px solid rgba(255, 255, 255, .05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

#page-admin .adm-card-tabs::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 44%);
  pointer-events: none;
}

#page-admin #admTabs.adm-tabs {
  margin: 0;
  display: grid !important;
  grid-template-columns: repeat(var(--adm-tab-count, 7), minmax(0, 1fr)) !important;
  gap: 10px !important;
  border-bottom: 0 !important;
  overflow-x: visible !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  z-index: 1;
  padding: 2px 0 6px;
}
#page-admin #admTabs.adm-tabs::-webkit-scrollbar { display: none; }

#page-admin .adm-tab-row {
  display: contents;
}

#page-admin #admTabs.adm-tabs .adm-tab {
  position: relative;
  flex: none !important;
  width: 100%;
  min-width: 0;
  height: 60px;
  padding: 7px 4px 8px;
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #90a0b3;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .2s;
  border: 1px solid rgba(255, 255, 255, .045);
  border-radius: 18px;
  margin-bottom: 0;
  background:
    linear-gradient(180deg, rgba(23, 36, 55, .96), rgba(14, 26, 42, .92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .035),
    0 10px 18px rgba(4, 10, 20, .16);
}

#page-admin #admTabs.adm-tabs .adm-tab::before {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(111, 211, 172, .88), rgba(95, 194, 192, .88));
  opacity: 0;
  transform: scaleX(.45);
  transition: opacity .2s, transform .2s;
}

#page-admin #admTabs.adm-tabs .adm-tab::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 56%);
  opacity: .7;
  pointer-events: none;
}

#page-admin #admTabs.adm-tabs .adm-tab:hover { color: #d7e5ee; }

#page-admin #admTabs.adm-tabs .adm-tab:focus-visible {
  outline: none;
  border-color: rgba(111, 211, 172, .66);
  box-shadow:
    inset 0 1px 0 rgba(201, 255, 238, .18),
    0 0 0 3px rgba(111, 211, 172, .14),
    0 14px 24px rgba(5, 22, 28, .22);
}

#page-admin #admTabs.adm-tabs .adm-tab.active {
  color: #f4fbff;
  border-color: rgba(111, 211, 172, .56);
  background:
    radial-gradient(circle at 50% 2px, rgba(111, 211, 172, .16), transparent 60%),
    linear-gradient(180deg, rgba(33, 55, 62, .96), rgba(16, 35, 42, .96));
  box-shadow:
    inset 0 1px 0 rgba(201, 255, 238, .18),
    0 16px 24px rgba(5, 22, 28, .2),
    0 0 0 1px rgba(111, 211, 172, .08);
}

#page-admin #admTabs.adm-tabs .adm-tab.active::before {
  opacity: 1;
  transform: scaleX(1);
}

.adm-tab-icon {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(188, 208, 221, .86);
  transition: color .2s, transform .2s, filter .2s;
}

.adm-tab-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 2.05;
}

.adm-tab-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .01em;
}

#page-admin #admTabs.adm-tabs .adm-tab.active .adm-tab-icon {
  color: #6fd3ac;
  transform: translateY(-1px);
  filter: drop-shadow(0 0 10px rgba(111, 211, 172, .28));
}

/* 数据统计卡 */
.adm-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 24px;
}

.adm-stat {
  position: relative;
  height: 136px;
  min-width: 0;
  padding: 24px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: linear-gradient(135deg, #1a2638 0%, #152132 100%);
  box-shadow:
    0 18px 40px rgba(5, 12, 24, .28),
    inset 0 1px 0 rgba(255, 255, 255, .04);
}

.adm-stat-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--adm-cyan);
  background: none;
  box-shadow: none;
  font-size: 23px;
}

.adm-stat-new .adm-stat-icon,
.adm-stat-new .adm-stat-num {
  color: #91b4ee;
}

.adm-stat-new .adm-stat-icon {
  background: none;
}

.adm-stat-disabled .adm-stat-icon,
.adm-stat-disabled .adm-stat-num {
  color: var(--adm-purple);
}

.adm-stat-disabled .adm-stat-icon {
  background: none;
}

.adm-stat-num {
  margin-top: 10px;
  color: var(--adm-cyan);
  font-size: 38px;
  font-weight: 900;
  line-height: .95;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.adm-stat-lbl {
  margin-top: 8px;
  color: #8b97a8;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

/* 搜索 / 筛选 */
.adm-filter {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 84px;
  margin: 0 0 24px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .055);
  background: linear-gradient(135deg, rgba(29, 42, 58, .94), rgba(21, 32, 48, .94));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(5, 12, 24, .28), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.adm-search,
.adm-select,
.adm-input {
  height: 60px;
  border-radius: 18px;
  border: 1px solid rgba(95, 194, 192, .12);
  background-color: #101c2d;
  color: var(--adm-white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 10px 26px rgba(0, 0, 0, .18);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.adm-search,
.adm-input {
  width: 100%;
  padding: 0 18px;
}

.adm-search {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 56px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235f6c7d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 18px center;
}

.adm-select {
  flex: 0 0 104px;
  padding: 0 38px 0 18px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  color: #8c98a9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238c98a9' 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 18px center;
}

.adm-search::placeholder,
.adm-input::placeholder { color: #8895a5; }

.adm-search:focus,
.adm-select:focus,
.adm-input:focus {
  border-color: rgba(126, 166, 189, .35);
  box-shadow: 0 0 0 4px rgba(126, 166, 189, .08), inset 0 1px 0 rgba(255, 255, 255, .05);
}

/* 用户卡片 / 通用卡片 */
.adm-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.adm-card {
  position: relative;
  overflow: hidden;
  padding: 24px 22px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: linear-gradient(135deg, #1a2638 0%, #132033 100%);
  box-shadow:
    0 18px 44px rgba(5, 12, 24, .32),
    inset 0 1px 0 rgba(255, 255, 255, .04);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.adm-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 96% 18%, rgba(95, 194, 192, .08), transparent 34%);
  pointer-events: none;
}

.adm-user-card {
  min-height: 218px;
}

.adm-card > * {
  position: relative;
  z-index: 1;
}

.adm-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.adm-user-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.adm-avatar {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, .76);
  background: linear-gradient(135deg, #5e4a93 0%, #3b315e 100%);
  box-shadow:
    0 16px 30px rgba(83, 61, 142, .25),
    inset 0 1px 0 rgba(255, 255, 255, .1);
  font-size: 30px;
}

.adm-user-title {
  min-width: 0;
}

.adm-card-name {
  display: block;
  max-width: 190px;
  overflow: hidden;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-card-name small {
  color: var(--adm-muted-2);
  font-size: 12px;
  font-weight: 500;
}

.adm-card-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #b4c0d0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.adm-user-meta {
  margin-top: 10px;
}

.adm-user-login {
  margin: 0 0 18px;
  color: #667487;
  font-size: 14px;
}

.adm-dot {
  width: 4px;
  height: 4px;
  display: inline-flex;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
}

.adm-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 16px;
  border-top: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent) top / 100% 1px no-repeat;
}

/* 角色 / 状态标签 */
.adm-role,
.adm-status {
  min-height: 28px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
}

.adm-role-super_admin { background: rgba(227, 155, 128, .14); color: #f0b898; border: 1px solid rgba(227, 155, 128, .35); }
.adm-role-ops_admin { background: rgba(184, 156, 248, .14); color: #cfb8ff; border: 1px solid rgba(184, 156, 248, .3); }
.adm-role-analyst { background: rgba(95, 194, 192, .14); color: #7fe8e5; border: 1px solid rgba(95, 194, 192, .3); }
.adm-role-viewer { background: rgba(160, 175, 195, .12); color: #bcc6d2; border: 1px solid rgba(160, 175, 195, .25); }

.adm-status-active,
.adm-status-settled,
.adm-status-paid {
  min-width: 82px;
  background: rgba(111, 211, 172, .08);
  color: var(--adm-green);
  border: 1px solid rgba(111, 211, 172, .2);
}

.adm-status-disabled,
.adm-status-rejected {
  min-width: 92px;
  background: rgba(227, 155, 128, .08);
  color: var(--adm-orange);
  border: 1px solid rgba(227, 155, 128, .24);
}

.adm-status-locked,
.adm-status-pending,
.adm-status-submitted,
.adm-status-expiring_soon {
  min-width: 82px;
  background: rgba(235, 188, 102, .08);
  color: #e2b86c;
  border: 1px solid rgba(235, 188, 102, .22);
}

.adm-status-expired {
  min-width: 82px;
  background: rgba(123, 138, 156, .1);
  color: #9aa8b9;
  border: 1px solid rgba(123, 138, 156, .16);
}

/* 按钮 */
.adm-btn {
  min-height: 54px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .065);
  color: #afc0cf;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform .15s ease, color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.adm-btn svg {
  font-size: 18px;
}

.adm-btn-sm {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
}

.adm-btn-primary {
  color: #8ee7df;
  background: rgba(95, 194, 192, .08);
  border-color: rgba(95, 194, 192, .2);
}

.adm-btn-ghost {
  color: #94c7c8;
  background: rgba(255, 255, 255, .065);
  border-color: rgba(255, 255, 255, .09);
}

.adm-btn-danger {
  color: var(--adm-orange);
  background: rgba(227, 155, 128, .07);
  border-color: rgba(227, 155, 128, .22);
}

.adm-btn:active { transform: scale(.97); }

.adm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.adm-actions .adm-btn { width: 100%; }

/* Bottom Sheet / 表单 / 系统看板 */
.adm-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(4, 9, 18, .76);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: adm-fade-in .15s ease-out;
}

.adm-sheet {
  width: 100%;
  max-width: 440px;
  max-height: 84vh;
  overflow-y: auto;
  padding: 28px 22px 40px;
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(255, 255, 255, .07);
  border-bottom: 0;
  background: linear-gradient(180deg, #1a2638, #111c2c);
  box-shadow: 0 -20px 54px rgba(0, 0, 0, .46), inset 0 1px 0 rgba(255, 255, 255, .05);
  animation: adm-slide-up .25s cubic-bezier(.16, 1, .3, 1);
}

.adm-sheet-title {
  margin-bottom: 20px;
  padding-right: 42px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.adm-sheet-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #c4cdd8;
  font-size: 22px;
  cursor: pointer;
}

.adm-form-group { margin-bottom: 18px; color: #eef2f6; }
.adm-label { display: block; margin-bottom: 8px; color: #b4c0d0; font-size: 13px; font-weight: 800; }
.adm-form-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.adm-form-inline .adm-input { flex: 1 1 92px; }
.adm-form-inline .adm-select { flex: 1 1 136px; }
.adm-form-inline .adm-btn { flex: 0 0 auto; }

.adm-msg { min-height: 1.3em; margin-top: 10px; color: #a8b4c2; font-size: 13px; line-height: 1.45; }
.adm-msg-ok { color: #8fe3c8; }
.adm-msg-err { color: #f0a890; }

.adm-checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: #d0d8e2;
  cursor: pointer;
}
.adm-checkbox-row:last-child { border-bottom: 0; }
.adm-checkbox-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--adm-cyan); cursor: pointer; }
.adm-checkbox-label { flex: 1; color: #d0d8e2; font-size: 14px; font-weight: 600; }

.adm-toast {
  position: fixed;
  top: 60px;
  left: 50%;
  z-index: 9999;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 18px;
  transform: translateX(-50%);
  border: 1px solid rgba(95, 194, 192, .22);
  border-radius: 8px;
  background: rgba(16, 28, 45, .96);
  color: #dfe8f0;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .42);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  animation: adm-toast-in .2s ease-out;
}

.adm-health-card,
.adm-temp-pw {
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: linear-gradient(135deg, #1a2638, #132033);
}

.adm-health-title { margin-bottom: 12px; color: #fff; font-size: 16px; font-weight: 900; }
.adm-health-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; color: #7b8a9c; font-size: 14px; line-height: 1.5; }
.adm-health-row + .adm-health-row { border-top: 1px solid rgba(255, 255, 255, .07); }
.adm-health-name { flex: 1; min-width: 0; color: #dfe8f0; display: inline-flex; align-items: center; gap: 8px; }
.adm-health-icon { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: #8bd8d6; opacity: .95; }
.adm-health-icon svg { width: 16px; height: 16px; stroke-width: 2.05; }
.adm-health-rate { flex: 0 0 58px; color: var(--adm-cyan); font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.adm-health-time { flex: 0 0 74px; color: #5f6c7d; font-size: 12px; text-align: right; }

.adm-health-ok { color: var(--adm-green); }
.adm-health-warn { color: #e2b86c; }
.adm-health-err { color: var(--adm-orange); }

.adm-log-item { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); color: #aab7c8; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.65; word-break: break-all; }

.adm-log-item:last-child { border-bottom: 0; }
.adm-temp-pw { margin: 16px 0; text-align: center; border-color: rgba(227, 155, 128, .24); background: rgba(227, 155, 128, .07); }
.adm-temp-pw code { display: block; margin: 10px 0; color: var(--adm-orange); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 24px; font-weight: 900; letter-spacing: 3px; }

.adm-loading {
  min-height: 156px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 14px;
  text-align: center;
  color: #b4c0d0;
  font-size: 14px;
  line-height: 1.6;
}

html:has(#page-admin.active),
body:has(#page-admin.active) {
  background: #0d1724;
}

#page-admin.active {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.adm-wrap button.adm-btn {
  border-radius: 10px !important;
  border-color: rgba(255, 255, 255, .08) !important;
  background: rgba(255, 255, 255, .065) !important;
  color: #afc0cf !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05) !important;
}

.adm-wrap button.adm-btn-primary {
  color: #8ee7df !important;
  background: rgba(95, 194, 192, .08) !important;
  border-color: rgba(95, 194, 192, .2) !important;
}

.adm-wrap button.adm-btn-ghost {
  color: #94c7c8 !important;
  background: rgba(255, 255, 255, .065) !important;
  border-color: rgba(255, 255, 255, .09) !important;
}

.adm-wrap button.adm-btn-danger {
  color: var(--adm-orange) !important;
  background: rgba(227, 155, 128, .07) !important;
  border-color: rgba(227, 155, 128, .22) !important;
}

/* V7: 根据 1.3 设计稿加强空间、光效和装饰细节 */
body:has(#page-admin.active) {
  max-width: 608px;
  background:
    radial-gradient(circle at 50% -12%, rgba(95, 194, 192, .08), transparent 34%),
    #0b1521;
}

body:has(#page-admin.active) .navbar,
body:has(#page-admin.active) .tabbar {
  max-width: 608px;
}

#page-admin {
  padding: 19px 18px 96px;
  background:
    radial-gradient(circle at 74% 14%, rgba(49, 119, 122, .12), transparent 27%),
    linear-gradient(180deg, #101b2a 0%, #0b1521 100%);
}

.adm-hero {
  min-height: 183px;
  padding: 27px 28px 26px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 83% 64%, rgba(95, 194, 192, .16), transparent 27%),
    radial-gradient(circle at 82% 45%, rgba(95, 194, 192, .12), transparent 20%),
    linear-gradient(135deg, #101b2b 0%, #0a1422 100%);
  box-shadow:
    0 24px 64px rgba(3, 8, 18, .44),
    inset 0 1px 0 rgba(255, 255, 255, .07);
}

.adm-hero::after {
  right: -18px;
  top: 18px;
  width: 245px;
  height: 245px;
  opacity: .92;
  background:
    radial-gradient(circle at 50% 50%, rgba(95, 194, 192, .22), rgba(95, 194, 192, .08) 36%, transparent 67%);
}

.adm-hero-title {
  font-size: clamp(30px, 5.2vw, 34px);
  letter-spacing: -.035em;
}

.adm-hero-desc {
  font-size: 16px;
}

.adm-hero .adm-role {
  margin-top: auto;
  align-self: flex-start;
}



.adm-stats {
  gap: 14px;
  margin-bottom: 22px;
}

.adm-stat {
  height: 178px;
  padding: 27px 18px 24px;
  border-radius: 16px;
  overflow: hidden;
  justify-content: flex-start;
}

.adm-stat::after {
  content: '';
  position: absolute;
  inset: auto 10px 18px auto;
  width: 86px;
  height: 72px;
  opacity: .15;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.adm-stat-users::after {
  right: 10px;
  bottom: 34px;
  width: 92px;
  height: 54px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 56'%3E%3Cpath d='M2 40c16 0 18-2 28-18 8 30 12 34 20 3 6 45 13 1 23 16 9-27 12-14 18-25' fill='none' stroke='%235FC2C0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.adm-stat-new::after {
  right: 16px;
  bottom: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 80'%3E%3Cg fill='%2386AAFF'%3E%3Crect x='6' y='49' width='9' height='25' rx='5' opacity='.18'/%3E%3Crect x='25' y='38' width='9' height='36' rx='5' opacity='.25'/%3E%3Crect x='44' y='29' width='9' height='45' rx='5' opacity='.36'/%3E%3Crect x='63' y='9' width='9' height='65' rx='5' opacity='.48'/%3E%3C/g%3E%3C/svg%3E");
}

.adm-stat-disabled::after {
  right: -2px;
  bottom: 24px;
  width: 104px;
  height: 104px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 110 110'%3E%3Cpath d='M55 8 96 26v27c0 25-17 42-41 51C31 95 14 78 14 53V26L55 8Z' fill='none' stroke='%23B89CF8' stroke-width='2' opacity='.5'/%3E%3C/svg%3E");
}

.adm-stat-icon {
  position: relative;
  z-index: 1;
  width: 55px;
  height: 55px;
  margin-bottom: 26px;
  background: none;
  box-shadow: none;
}

.adm-stat-num {
  position: relative;
  z-index: 1;
  margin-top: 0;
  font-size: 42px;
}

.adm-stat-lbl {
  position: relative;
  z-index: 1;
  font-size: 16px;
}

.adm-filter {
  min-height: 82px;
  margin-bottom: 20px;
  padding: 13px 12px;
  border-radius: 8px;
}

.adm-search,
.adm-select,
.adm-input {
  height: 56px;
  border-radius: 8px;
}

.adm-select {
  flex-basis: 114px;
}

.adm-user-card {
  min-height: 214px;
  padding: 22px 20px 16px;
  border-radius: 16px;
  box-shadow:
    0 18px 48px rgba(4, 10, 22, .38),
    inset 0 1px 0 rgba(255, 255, 255, .055);
}

.adm-avatar {
  width: 72px;
  height: 72px;
  font-size: 39px;
  background: radial-gradient(circle at 55% 28%, #c2b0ff 0 10%, transparent 11%), linear-gradient(135deg, #7a49d7 0%, #463080 100%);
}

.adm-card-name {
  font-size: 24px;
}

.adm-user-meta,
.adm-user-login {
  font-size: 15px;
}

.adm-user-meta {
  flex-wrap: nowrap;
}

.adm-user-meta span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-status {
  min-height: 36px;
  padding: 0 17px;
  border-radius: 14px;
  font-size: 15px;
}

.adm-card-actions {
  gap: 21px;
  padding-top: 14px;
}

.adm-wrap button.adm-btn-sm {
  min-height: 43px;
  border-radius: 10px !important;
  font-size: 13px;
}

/* 防折行：关键标题、标签、按钮在手机宽度下保持单行 */
.adm-hero-head,
.adm-tab,
.adm-stat-lbl,
.adm-card-name,
.adm-role,
.adm-status,
.adm-btn,
.adm-select,
.adm-user-meta,
.adm-user-login {
  white-space: nowrap;
}

.adm-tab > span,
.adm-btn {
  min-width: 0;
}

.adm-btn {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  body:has(#page-admin.active) {
    max-width: 440px;
  }

  #page-admin {
    padding-left: 18px;
    padding-right: 18px;
  }

  .adm-hero {
    min-height: 174px;
    padding: 25px 20px 24px;
  }

  .adm-hero-head {
    gap: 10px;
    align-items: center;
  }

  .adm-hero-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(24px, 6vw, 26px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .adm-hero .adm-role {
    flex: 0 0 auto;
    margin-top: auto;
    align-self: flex-start;
  }

  .adm-hero-desc {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #page-admin #admTabs.adm-tabs {
    gap: 8px !important;
  }

  #page-admin #admTabs.adm-tabs .adm-tab {
    height: 58px;
    gap: 5px;
    font-size: 11px;
  }

  .adm-tab-icon {
    width: 16px;
    height: 16px;
  }

  .adm-stats {
    gap: 10px;
  }

  .adm-stat {
    padding-left: 14px;
    padding-right: 12px;
  }

  .adm-stat-lbl {
    font-size: 13px;
  }

  .adm-filter {
    gap: 10px;
  }

  .adm-select {
    flex-basis: 96px;
    padding-left: 16px;
    padding-right: 34px;
  }

  .adm-card-header {
    gap: 10px;
  }

  .adm-user-head {
    gap: 14px;
    min-width: 0;
  }

  .adm-user-title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .adm-card-name {
    max-width: 168px;
  }

  .adm-user-meta,
  .adm-user-login {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .adm-user-meta {
    flex-wrap: nowrap;
    max-width: 100%;
    min-height: 28px;
  }

  .adm-user-meta .adm-role {
    flex: 0 0 auto;
  }

  .adm-user-meta .adm-dot {
    flex: 0 0 4px;
  }

  .adm-user-meta span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .adm-status {
    flex: 0 0 auto;
    min-width: 74px;
    padding: 0 12px;
    font-size: 12px;
  }

  .adm-card-actions {
    gap: 10px;
  }

  .adm-wrap button.adm-btn-sm {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 12px;
  }

  .adm-btn svg {
    font-size: 15px;
  }
}

@keyframes adm-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes adm-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes adm-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(-8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

@media (max-width: 390px) {
  #page-admin { padding-left: 16px; padding-right: 16px; }
  .adm-hero { min-height: 154px; padding: 22px 24px; border-radius: 14px; }
  .adm-hero-title { font-size: 23px; }
  .adm-hero .adm-role { min-height: 38px; padding: 0 13px; font-size: 11px; }
  #page-admin #admTabs.adm-tabs { gap: 6px !important; }
  #page-admin #admTabs.adm-tabs .adm-tab {
    height: 54px;
    padding: 7px 2px;
    gap: 4px;
    border-radius: 16px;
  }
  .adm-tab-icon { width: 15px; height: 15px; }
  .adm-tab-label { font-size: 10px; }
  .adm-stats { gap: 10px; }
  .adm-stat { height: 124px; padding: 18px 12px 14px; border-radius: 14px; }
  .adm-stat-icon { width: 42px; height: 42px; font-size: 20px; }
  .adm-stat-num { font-size: 31px; }
  .adm-stat-lbl { font-size: 12px; }
  .adm-filter { padding: 12px; gap: 10px; }
  .adm-select { flex-basis: 90px; padding-left: 14px; }
  .adm-card { padding: 22px 20px; border-radius: 14px; }
  .adm-card-actions { gap: 10px; }
  .adm-btn-sm { font-size: 11px; padding: 0 8px; }
}

@media (hover: hover) {
  #page-admin #admTabs.adm-tabs .adm-tab:not(.active):hover { color: #c9d5df; background: rgba(255, 255, 255, .045); }
  .adm-card:hover,
  .adm-stat:hover { border-color: rgba(95, 194, 192, .16); transform: translateY(-1px); }
  .adm-wrap button.adm-btn:hover { color: #132033 !important; background: var(--adm-cyan) !important; border-color: rgba(95, 194, 192, .44) !important; box-shadow: 0 12px 24px rgba(95, 194, 192, .16) !important; }
  .adm-wrap button.adm-btn-danger:hover { color: #132033 !important; background: var(--adm-orange) !important; }
  .adm-sheet-close:hover { background: rgba(255, 255, 255, .1); }
}
