:root{
  --bg: #071428;
  --panel: rgba(10, 28, 55, 0.72);
  --panel-2: rgba(9, 22, 45, 0.72);
  --stroke: rgba(255,255,255,0.06);
  --text: rgba(240, 248, 255, 0.92);
  --muted: rgba(199, 216, 238, 0.68);
  --accent: #2c7dff;
  --accent-2: #2fb3ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --btn-add-bg: rgba(46, 214, 164, 0.22);
  --btn-add-bg-2: rgba(46, 214, 164, 0.12);
  --btn-add-border: rgba(46, 214, 164, 0.38);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC","Source Han Sans SC", sans-serif;
  color: var(--text);
  background: #071428;
}

.app{ height: 100%; display: flex; flex-direction: column; }

.topbar{
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 14px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(7,20,40,0.9), rgba(7,20,40,0.65));
  backdrop-filter: blur(10px);
}

.brand{ display: flex; align-items: center; gap: 10px; }
.brand__dot{
  width: 12px; height: 12px; border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 3px rgba(44,125,255,0.16);
}
.brand__title{ font-weight: 700; letter-spacing: 0.2px; }
.brand__sub{ margin-top: 2px; font-size: 12px; color: var(--muted); }
.topbar__hint{ font-size: 12px; color: var(--muted); }

.topbar__right{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  min-width: 0;
}

/* 顶栏登录用户：仅展示账号名 */
.user-chip{
  min-width: 0;
  max-width: min(220px, 38vw);
}
.user-chip__name{
  display: block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: rgba(220, 234, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.main{
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  padding: 14px;
  min-height: 0;
}

.sidebar{
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(10,28,55,0.78) 0%, rgba(7,18,38,0.72) 100%);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  overflow-y: auto;  /* ⭐ 允许垂直滚动 */
}

/* ⭐ 美化侧边栏滚动条 - WebKit浏览器（Chrome、Edge、Safari） */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(7, 20, 40, 0.2);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(100, 130, 180, 0.25);
  border-radius: 3px;
  transition: background 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 130, 180, 0.4);
}

.sidebar::-webkit-scrollbar-thumb:active {
  background: rgba(100, 130, 180, 0.55);
}

/* ⭐ Firefox浏览器滚动条样式 */
.sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 130, 180, 0.25) rgba(7, 20, 40, 0.2);
}

/* ============================================
   全局滚动条样式 - 统一管理所有滚动条
   ============================================ */

/* WebKit浏览器（Chrome、Edge、Safari）全局滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(7, 20, 40, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 130, 180, 0.25);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 130, 180, 0.4);
}

::-webkit-scrollbar-thumb:active {
  background: rgba(100, 130, 180, 0.55);
}

/* Firefox浏览器全局滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 130, 180, 0.25) rgba(7, 20, 40, 0.2);
}

.sidebar__inner{ 
  padding: 14px; 
  min-height: 100%;  /* ⭐ 确保内部容器撑满高度 */
}

.segmented{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
  padding: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--stroke);
  border-radius: 14px;
}
.segmented__btn{
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(235,245,255,0.90);
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 650;
  text-align: left;
}
.segmented__btn:hover{ background: rgba(255,255,255,0.04); }
.segmented__btn.is-active{
  background: linear-gradient(135deg, rgba(44,125,255,0.35), rgba(47,179,255,0.22));
  border-color: rgba(44,125,255,0.35);
  box-shadow: 0 10px 30px rgba(44,125,255,0.12);
}

.nav{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
}
.nav__item{
  appearance: none;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.02);
  border-radius: 14px;
  padding: 12px 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: rgba(235,245,255,0.92);
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.nav__item:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
.nav__item.is-active{
  background: linear-gradient(135deg, rgba(44,125,255,0.28), rgba(47,179,255,0.14));
  border-color: rgba(44,125,255,0.28);
}
.nav__title{ font-weight: 700; }
.nav__sub{ font-size: 12px; color: rgba(200,220,245,0.70); font-weight: 650; }

.content{
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(10,28,55,0.55), rgba(7,18,38,0.50));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.content__toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(0,0,0,0.08);
}
.content__title{ font-weight: 800; letter-spacing: 0.2px; }
.content__actions{ display: flex; align-items: center; gap: 8px; min-width: 0; }

.urlbox{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
  min-width: 320px;
  max-width: 52vw;
}
.urlbox__label{ font-size: 12px; color: var(--muted); font-weight: 700; }
.urlbox__input{
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: rgba(235,245,255,0.92);
  font-size: 13px;
}
.urlbox__input::placeholder{ color: rgba(200,220,245,0.42); }

.btn{
  appearance: none;
  border: 1px solid rgba(44,125,255,0.30);
  background: linear-gradient(135deg, rgba(44,125,255,0.38), rgba(47,179,255,0.20));
  color: rgba(245,250,255,0.96);
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
  transition: all 0.15s ease;
}
.btn:hover{ 
  filter: brightness(1.06); 
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(44,125,255,0.15);
}
.btn:active{
  transform: translateY(0);
  filter: brightness(0.95);
  box-shadow: 0 1px 4px rgba(44,125,255,0.1);
}
.btn--ghost{
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  color: rgba(235,245,255,0.90);
}
.btn--add{
  border-color: transparent;
  background: linear-gradient(135deg, var(--btn-add-bg), var(--btn-add-bg-2));
  color: rgba(232, 255, 246, 0.96);
}
.btn.btn--add{
  padding: 10px 14px;
  font-size: 13px;
}
.card__tools .btn.btn--add{
  padding: 9px 14px;
  font-size: 13px;
  border-radius: 12px;
}

.content__frame{ 
  flex: 1; 
  min-height: 0;
  overflow: hidden; /* 隐藏外层滚动条，由iframe内部处理 */
}

#appFrame{
  width: 100%;
  height: 100%;
  border: 0;
  background: linear-gradient(180deg, #0a1628 0%, #071428 50%, #050f1f 100%);
  display: block; /* 确保iframe正确显示 */
}

@media (max-width: 980px){
  .main{ grid-template-columns: 1fr; }
  .urlbox{ min-width: 0; width: 100%; max-width: none; }
  .content__actions{ width: 100%; }
  .content__toolbar{ flex-direction: column; align-items: stretch; }
}

/* ---------------------------
   Admin pages (static HTML)
   --------------------------- */

.page-wrap{
  min-height: 100%;
  /* iframe 内页面：统一留白 */
  padding: 24px;
  overflow-y: auto;
}

/* iframe内页面滚动条优化 */
.page-wrap::-webkit-scrollbar {
  width: 8px;
}

.page-wrap::-webkit-scrollbar-track {
  background: rgba(7, 20, 40, 0.2);
  border-radius: 4px;
}

.page-wrap::-webkit-scrollbar-thumb {
  background: rgba(100, 130, 180, 0.25);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.page-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 130, 180, 0.4);
}
@media (max-width: 720px){
  .page-wrap{ padding: 16px; }
}

.page-card{
  --page-max: 980px;
  /* 自适应填满 iframe，不居中留白 */
  max-width: 100%;
  width: 100%;
  margin: 0;
  /* 最外层容器去掉：不再形成“卡片盒子” */
  display: contents;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.page-title{
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: 0.2px;
  /* 子页面标题统一隐藏（iframe 内） */
  display: none;
}
.page-desc{
  margin: 0 0 16px;
  color: rgba(199, 216, 238, 0.72);
  font-size: 13px;
  line-height: 1.7;
  /* 子页面说明统一隐藏（iframe 内） */
  display: none;
}
.hint{
  margin-top: 8px;
  font-size: 12px;
  color: rgba(199, 216, 238, 0.62);
  line-height: 1.6;
}

.form-label{
  display: block;
  font-size: 12px;
  font-weight: 750;
  margin: 10px 0 6px;
  color: rgba(199, 216, 238, 0.82);
}
.control,
.page-card input,
.page-card select,
.page-card textarea{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(235, 245, 255, 0.92);
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 13px;
  outline: none;
}
.page-card select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(235,245,255,.72) 50%),
    linear-gradient(135deg, rgba(235,245,255,.72) 50%, transparent 50%),
    linear-gradient(to right, rgba(255,255,255,.10), rgba(255,255,255,.10));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    calc(100% - 32px) 50%;
  background-size: 6px 6px, 6px 6px, 1px 18px;
  background-repeat: no-repeat;
}
.page-card select:focus{
  border-color: rgba(100, 179, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(100, 179, 255, 0.12);
}

/* ⭐ 全站统一下拉框样式 - 参考分页栏每页数量下拉框 */
.app-select,
select.app-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(235, 245, 255, 0.92);
  border-radius: 12px;
  padding: 9px 34px 9px 10px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  /* 自定义箭头图标 */
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(235,245,255,.72) 50%),
    linear-gradient(135deg, rgba(235,245,255,.72) 50%, transparent 50%),
    linear-gradient(to right, rgba(255,255,255,.10), rgba(255,255,255,.10));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    calc(100% - 32px) 50%;
  background-size: 6px 6px, 6px 6px, 1px 18px;
  background-repeat: no-repeat;
}

.app-select:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background-color: rgba(0, 0, 0, 0.22);
}

.app-select:focus {
  border-color: rgba(100, 179, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(100, 179, 255, 0.12);
}

/* 下拉选项样式 */
.app-select option {
  background: #0b1220;
  color: rgba(235, 245, 255, 0.92);
  padding: 8px 12px;
}

.app-select option:checked {
  background: #111c33;
}

.app-select option:hover {
  background: #1a2640;
}
/* 下拉面板（Windows/Chrome 支持有限，但尽量统一） */
.page-card select option{
  background: #0b1220;
  color: rgba(235, 245, 255, 0.92);
}
.page-card select option:checked{
  background: #111c33;
}
.page-card input[type="date"]::-webkit-calendar-picker-indicator,
.page-card input[type="datetime-local"]::-webkit-calendar-picker-indicator{
  filter: invert(1);
  opacity: 0.9;
}

/* ⭐ 模态框中的时间选择器样式优化 */
.modal__panel input[type="datetime-local"],
.modal__panel input[type="date"],
.modal__panel input[type="time"] {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
}

.modal__panel input[type="datetime-local"]:hover,
.modal__panel input[type="date"]:hover,
.modal__panel input[type="time"]:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(44, 125, 255, 0.5);
}

.modal__panel input[type="datetime-local"]:focus,
.modal__panel input[type="date"]:focus,
.modal__panel input[type="time"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 125, 255, 0.15);
}

/* 时间选择器图标优化 */
.modal__panel input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.modal__panel input[type="date"]::-webkit-calendar-picker-indicator,
.modal__panel input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.8;
  cursor: pointer;
  padding: 2px;
}
.page-card textarea{ resize: vertical; }
.textarea--mono{ font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

.btns{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.filters{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.form-inline{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* 筛选区与表单工具条：字段、按钮同一基准线 */
.filters > .btn{
  align-self: center;
}
.form-inline > .btn{
  align-self: center;
}
.form-inline .actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 0;
}

/* 筛选区/横向表单：label + 控件同一水平行 */
.filters .field,
.form-inline .field{
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}
.filters .field label,
.form-inline .field label{
  margin: 0;
  white-space: nowrap;
}
.filters .field input,
.filters .field select,
.form-inline .field input,
.form-inline .field select{
  width: 180px;
  max-width: 100%;
}
.filters .field textarea,
.form-inline .field textarea{
  width: 100%;
  max-width: 100%;
}
/* 筛选区多行：标签顶对齐 */
.filters .field.field--textarea{
  align-items: start;
}
/* 与短输入同一行的备注等：标签垂直居中，与「用户ID」等一致 */
.form-inline .field.field--textarea:not(.field--full){
  align-items: center;
}
.form-inline .field.field--full{
  flex: 1 1 100%;
  min-width: 0;
  align-items: start;
}
.filters .field.field--wide input,
.filters .field.field--wide select,
.form-inline .field.field--wide input,
.form-inline .field.field--wide select{
  width: 240px;
}
.form-inline .field.field--flex{
  flex: 1;
  min-width: 200px;
  grid-template-columns: auto 1fr;
}
.form-inline .field.field--flex input,
.form-inline .field.field--flex select,
.form-inline .field.field--flex textarea{
  width: 100%;
  max-width: 100%;
}
/* 与同一行短输入框视觉高度一致（仍可纵向拖拽拉高） */
.form-inline .field.field--textarea:not(.field--full) textarea{
  min-height: 0;
  line-height: 1.35;
  padding: 9px 10px;
  resize: vertical;
  overflow-y: auto;
}

/* 与主操作区无关的可选补充（如 VIP 备注），单独成块 */
.form-meta{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.form-meta .field{
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 8px;
}
.form-meta .field label{
  margin: 0;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
  color: rgba(199, 216, 238, 0.62);
}
.form-meta .field textarea{
  width: 100%;
  max-width: 100%;
}

.field label{
  display: block;
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 6px;
  color: rgba(199, 216, 238, 0.82);
}
.field input,
.field select{
  width: 140px;
  max-width: 100%;
  padding: 9px 10px;
}

.grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

/* Common layout blocks (use inside iframe pages) */
.stack{ display: grid; gap: 18px; }
.card{
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px 22px;
}
.card__title{
  margin: 0 0 16px;
  font-size: 16px;
  letter-spacing: 0.2px;
  font-weight: 900;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.card__head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.card__head .card__title{
  margin: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.card__tools{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.card__tools--left{
  justify-content: flex-start;
}

/* segmented controls (用于切换列表范围) */
.seg{
  display: inline-flex;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
.seg__btn{
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.1;
  cursor: pointer;
}
.seg__btn + .seg__btn{
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}
.seg__btn.is-active{
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.96);
}
.card__tools .btn{
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.1;
}
.card__tools .btn.btn--ghost{
  padding: 7px 10px;
}
.card__tools .field{
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}
.card__tools .field label{
  margin: 0;
  white-space: nowrap;
}
.card__tools .field input,
.card__tools .field select{
  width: 180px;
  max-width: 100%;
}
@media (max-width: 720px){
  .card__head{
    align-items: stretch;
    flex-direction: column;
  }
  .card__tools{
    justify-content: flex-start;
  }
  .card__tools .field input,
  .card__tools .field select{
    width: 100%;
  }
}
.card__hint{
  margin: 0 0 12px;
  font-size: 13px;
  color: rgba(199, 216, 238, 0.75);
  line-height: 1.6;
}
.split-2{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 980px){
  .split-2{ grid-template-columns: 1fr 1fr; align-items: start; }
}
.split-2-420{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 980px){
  .split-2-420{ grid-template-columns: 420px 1fr; align-items: start; }
}
.actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}
.actions .btn{ min-width: 92px; }

.table-wrap + .form-inline{
  margin-top: 12px;
}

.pager{
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border-top: 0;
  padding-top: 0;
}
.pager__left{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.pager__right{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}
.pager__meta{
  font-size: 12px;
  color: rgba(199, 216, 238, 0.75);
  white-space: nowrap;
}
.pager__center{
  justify-self: center;
  text-align: center;
  min-width: 0;
}

.pager .btn{
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.pager__pagesize{
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 720px){
  .pager{
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .pager__left,
  .pager__right{
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .pager__center{
    justify-self: start;
    text-align: left;
  }
}

.panel{
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
}
.panel h2{
  margin: 0 0 14px;
  font-size: 16px;
  letter-spacing: 0.2px;
  font-weight: 900;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.row{
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}
@media (max-width: 720px){
  .row{ grid-template-columns: 1fr; }
}

.row2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px){
  .row2{ grid-template-columns: 1fr; }
}

.table-wrap{ 
  overflow: auto; 
  margin-top: 16px;
}

/* 表格容器滚动条优化 */
.table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
  background: rgba(7, 20, 40, 0.2);
  border-radius: 4px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(100, 130, 180, 0.25);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 130, 180, 0.4);
}
table{ width: 100%; border-collapse: collapse; font-size: 13px; }
th, td{
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}
th{ color: rgba(199,216,238,.85); }

.mono{ font-family: ui-monospace, Menlo, Consolas, monospace; }
.row-actions{ display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

.msg{
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.ok{ color: rgba(180, 255, 210, 0.9); }
.err{ color: rgba(255, 180, 180, 0.95); }

details{
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.12);
}
summary{ cursor: pointer; font-weight: 800; }

.codeblock{
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  max-height: 70vh;
  overflow: auto;
}

/* 管理页表格行内「编辑」等 */
.modal{
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.modal.is-open{
  display: flex;
}
.modal__backdrop{
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(4, 12, 28, 0.72);
}
.modal__panel{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: min(90vh, 720px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 22, 42, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  padding: 20px 22px;
}
.modal__panel--wide{
  max-width: 560px;
}
.modal__title{
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.2px;
}
.modal__hint{
  margin: 0 0 16px;
  font-size: 12px;
  color: rgba(199, 216, 238, 0.72);
  line-height: 1.55;
}
.modal__field{
  margin-bottom: 16px;
}
.modal__field label{
  display: block;
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 6px;
  color: rgba(199, 216, 238, 0.82);
}
.modal__field input,
.modal__field select,
.modal__field textarea{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(235, 245, 255, 0.92);
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 13px;
  outline: none;
}
.modal__field textarea{
  min-height: 100px;
  resize: vertical;
}
.modal__field--hidden{
  display: none;
}
.modal__actions{
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* 通用确认模态框 */
.confirm-modal{
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.confirm-modal.is-open{
  display: flex;
}
.confirm-modal__backdrop{
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(4, 12, 28, 0.72);
}
.confirm-modal__panel{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 22, 42, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  padding: 20px;
}
.confirm-modal__title{
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.2px;
}
.confirm-modal__message{
  margin: 0 0 20px;
  font-size: 14px;
  color: rgba(199, 216, 238, 0.85);
  line-height: 1.6;
}
.confirm-modal__actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* 搜索下拉框样式 */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: rgba(10, 28, 55, 0.98);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  max-height: 240px;
  overflow-y: auto;
  z-index: 10000;
}

.search-dropdown__item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.search-dropdown__item:last-child {
  border-bottom: none;
}

.search-dropdown__item:hover {
  background: rgba(44, 125, 255, 0.15);
}

.search-dropdown__item--selected {
  background: rgba(44, 125, 255, 0.2);
}

.search-dropdown__name {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.search-dropdown__phone {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.search-dropdown__empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.stat-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  font-size: 12px;
  font-weight: 650;
  color: rgba(199, 216, 238, 0.75);
  letter-spacing: 0.02em;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: rgba(235, 245, 255, 0.95);
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
