*{margin:0;padding:0;box-sizing:border-box;font-family:"Microsoft Yahei",system-ui,sans-serif;transition:all 0.2s ease;}
body{background:#eef2f8;color:#2a3447;padding:15px;min-height:100vh;}
/* iOS 沉浸式安全区域 */
body{padding-top:calc(15px + env(safe-area-inset-top,0px));padding-right:calc(15px + env(safe-area-inset-right,0px));padding-bottom:calc(15px + env(safe-area-inset-bottom,0px));padding-left:calc(15px + env(safe-area-inset-left,0px));}
@supports (padding-top:constant(safe-area-inset-top)){body{padding-top:calc(15px + constant(safe-area-inset-top));padding-right:calc(15px + constant(safe-area-inset-right));padding-bottom:calc(15px + constant(safe-area-inset-bottom));padding-left:calc(15px + constant(safe-area-inset-left));}}
:root{
  --neu-bg: #eef2f8;
  --neu-light: #ffffff;
  --neu-dark: #d1d9e6;
  --neu-out: 5px 5px 10px var(--neu-dark), -5px -5px 10px var(--neu-light);
  --neu-inset: inset 3px 3px 6px var(--neu-dark), inset -3px -3px 6px var(--neu-light);
  --neu-btn: 3px 3px 6px var(--neu-dark), -3px -3px 6px var(--neu-light);
  --primary: #0891b2;
  --primary-light: #0ea5e9;
  --primary-fade: rgba(8,145,178,0.08);
  --success: #0891b2;
  --success-light: #0ea5e9;
  --warning: #d97706;
  --danger: #dc2626;
  --text-main: #2a3447;
  --text-sub: #6b7280;
  --text-tip: #9ca3af;
  --bg-card: #f4f7fb;
  --bg-page: #eef2f8;
}
    * {
      transition:all 0.25s ease;
    }

    /* ====== 动效增强 ====== */
    @keyframes fadeUp {
      from { opacity:0; transform:translateY(16px); }
      to   { opacity:1; transform:translateY(0); }
    }
    @keyframes fadeIn {
      from { opacity:0; }
      to   { opacity:1; }
    }
    @keyframes ripple {
      to { transform:scale(4); opacity:0; }
    }
    @keyframes scaleIn {
      from { opacity:0; transform:scale(0.92); }
      to   { opacity:1; transform:scale(1); }
    }
    @keyframes slideRight {
      from { opacity:0; transform:translateX(calc(-20px * var(--dir,1))); }
      to   { opacity:1; transform:translateX(0); }
    }
    @keyframes slideDown {
      from { opacity:0; transform:translateY(-12px); }
      to   { opacity:1; transform:translateY(0); }
    }

    .tab-content { animation:fadeUp 0.35s ease both; }
    .tab-content-inner { animation:fadeUp 0.35s ease both; }

    .neu-btn { position:relative; overflow:hidden; }
    .neu-btn::after {
      content:''; position:absolute; inset:0;
      background:radial-gradient(circle at var(--rx,50%) var(--ry,50%), rgba(8,145,178,0.25) 0%, transparent 60%);
      opacity:0; transition:opacity 0.3s;
      pointer-events:none;
    }
    .neu-btn:active::after { opacity:1; }

    .nav-item { position:relative; overflow:hidden; }
    .nav-item::after {
      content:''; position:absolute; inset:0;
      background:radial-gradient(circle at var(--rx,50%) var(--ry,50%), rgba(8,145,178,0.2) 0%, transparent 60%);
      opacity:0; transition:opacity 0.3s;
      pointer-events:none;
    }
    .nav-item:active::after { opacity:1; }

    .stagger > * { animation:fadeUp 0.4s ease both; }
    .stagger > *:nth-child(1) { animation-delay:0.02s; }
    .stagger > *:nth-child(2) { animation-delay:0.06s; }
    .stagger > *:nth-child(3) { animation-delay:0.10s; }
    .stagger > *:nth-child(4) { animation-delay:0.14s; }
    .stagger > *:nth-child(5) { animation-delay:0.18s; }
    .stagger > *:nth-child(6) { animation-delay:0.22s; }
    .stagger > *:nth-child(7) { animation-delay:0.26s; }
    .stagger > *:nth-child(8) { animation-delay:0.30s; }
    .stagger > *:nth-child(9) { animation-delay:0.34s; }
    .stagger > *:nth-child(10){ animation-delay:0.38s; }
    .stagger > *:nth-child(n+11){ animation-delay:0.42s; }

    .table tbody tr { animation:fadeUp 0.3s ease both; }
    .table tbody tr:nth-child(1) { animation-delay:0.02s; }
    .table tbody tr:nth-child(2) { animation-delay:0.05s; }
    .table tbody tr:nth-child(3) { animation-delay:0.08s; }
    .table tbody tr:nth-child(4) { animation-delay:0.11s; }
    .table tbody tr:nth-child(5) { animation-delay:0.14s; }
    .table tbody tr:nth-child(6) { animation-delay:0.17s; }
    .table tbody tr:nth-child(7) { animation-delay:0.20s; }
    .table tbody tr:nth-child(8) { animation-delay:0.23s; }
    .table tbody tr:nth-child(9) { animation-delay:0.26s; }
    .table tbody tr:nth-child(10){ animation-delay:0.29s; }
    .table tbody tr:nth-child(n+11){ animation-delay:0.32s; }
.neu-card{
  background:var(--neu-bg);
  border-radius:18px;
  box-shadow:var(--neu-out);
  padding:24px;
  margin-bottom:20px;
  border:1px solid rgba(255,255,255,0.6);
}
.neu-input{
  background:var(--neu-bg);
  border-radius:12px;
  border:1px solid var(--neu-dark);
  outline:none;
  padding:12px 16px;
  color:var(--text-main);
  font-size:14px;
  caret-color:var(--primary);
}
.neu-input[type="number"]{
  appearance: textfield;
  -moz-appearance: textfield;
}
.neu-input[type="number"]::-webkit-outer-spin-button,
.neu-input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: inner-spin-button;
  margin: 0;
  opacity: 1;
}
.neu-input:focus{
  box-shadow:var(--neu-inset);
}
.neu-btn{
  background:var(--neu-bg);
  border-radius:10px;
  box-shadow:var(--neu-btn);
  border:none;
  padding:10px 22px;
  cursor:pointer;
  font-size:14px;
  font-weight:500;
  color:var(--text-sub);
}
.neu-btn:hover{
  color:var(--primary);
  transform:translateY(-1.5px);
  box-shadow:5px 5px 12px var(--neu-dark), -5px -5px 12px var(--neu-light);
}
.neu-btn:active{
  transform:translateY(0);
  box-shadow:var(--neu-inset);
  color:var(--primary);
}
.btn-primary{color:#f1f5f9;background:var(--primary);text-shadow:0 1px 3px rgba(0,0,0,0.2);}
.btn-primary:hover{background:var(--primary-light);color:#f1f5f9;}
.btn-success{color:#f1f5f9;background:var(--success);text-shadow:0 1px 3px rgba(0,0,0,0.2);}
.btn-success:hover{background:var(--success-light);color:#f1f5f9;}
.btn-warning{color:#f1f5f9;background:var(--warning);}
.btn-warning:hover{background:#eab308;color:#f1f5f9;}
.btn-danger{color:#f1f5f9;background:var(--danger);text-shadow:0 1px 3px rgba(0,0,0,0.2);}
.btn-outline{background:transparent;border:1px solid var(--text-tip);color:var(--text-sub);}
.btn-outline:hover{border-color:var(--primary);color:var(--primary);}
.nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:18px;
  background:var(--neu-bg);
  border-radius:18px;
  box-shadow:var(--neu-out);
  margin-bottom:20px;
}
.nav-item{
  padding:12px 20px;
  border-radius:12px;
  cursor:pointer;
  font-size:14px;
  font-weight:500;
  color:var(--text-sub);
  white-space:nowrap;
  background:var(--neu-bg);
  box-shadow:var(--neu-btn);
}
.nav-item.active{
  box-shadow:var(--neu-inset);
  color:var(--tab-active,hsl(var(--tab-h,200), var(--tab-s,70%), var(--tab-l,45%)));
  font-weight:600;
}
.nav-item:hover:not(.active){
  color:var(--tab-active,hsl(var(--tab-h,200), var(--tab-s,70%), var(--tab-l,45%)));
}
.nav-item.hide-nav{display:none !important;}

/* ====== Tab 专属主题色（设于 nav-item 和内容区容器上） ====== */
#stat,                 .nav-item[data-tab="stat"]                 { --tab-h:200; --tab-s:70%; --tab-l:45%; }
#attendance,           .nav-item[data-tab="attendance"]           { --tab-h:160; --tab-s:55%; --tab-l:40%; }
#attendanceReport,     .nav-item[data-tab="attendanceReport"]     { --tab-h:280; --tab-s:50%; --tab-l:45%; }
#comment,              .nav-item[data-tab="comment"]              { --tab-h: 40; --tab-s:80%; --tab-l:50%; }
#groupCompare, .nav-item[data-tab="groupCompare"] { --tab-h:270; --tab-s:50%; --tab-l:50%; }
#studentRecord,.nav-item[data-tab="studentRecord"]{ --tab-h:340; --tab-s:60%; --tab-l:45%; }
#removal,      .nav-item[data-tab="removal"]      { --tab-h:  0; --tab-s:65%; --tab-l:50%; }
#materialUpload,.nav-item[data-tab="materialUpload"]{ --tab-h:220; --tab-s:55%; --tab-l:45%; }
#teacherMsgSend,.nav-item[data-tab="teacherMsgSend"]{ --tab-h:190; --tab-s:60%; --tab-l:40%; }
#studentInbox, .nav-item[data-tab="studentInbox"] { --tab-h:155; --tab-s:50%; --tab-l:40%; }
#schedule,     .nav-item[data-tab="schedule"]     { --tab-h:260; --tab-s:45%; --tab-l:50%; }
#student,      .nav-item[data-tab="student"]      { --tab-h: 25; --tab-s:70%; --tab-l:50%; }
#user,         .nav-item[data-tab="user"]         { --tab-h:320; --tab-s:55%; --tab-l:45%; }
#export,       .nav-item[data-tab="export"]       { --tab-h:130; --tab-s:45%; --tab-l:40%; }
#storage,      .nav-item[data-tab="storage"]      { --tab-h: 50; --tab-s:60%; --tab-l:45%; }
#log,          .nav-item[data-tab="log"]          { --tab-h:  0; --tab-s: 0%; --tab-l:35%; }

/* Tab 内容区主标题取对应 accent 色 */
.tab-content > h3:first-child,
.tab-content > .neu-card:first-child > h3:first-child {
  color:hsl(var(--tab-h,200), var(--tab-s,70%), var(--tab-l,45%));
  border-left:4px solid hsl(var(--tab-h,200), var(--tab-s,70%), var(--tab-l,45%));
  padding-left:14px;
}

/* 主按钮用当前 tab 色 */
.tab-content .btn-primary {
  background:hsl(var(--tab-h,200), var(--tab-s,70%), var(--tab-l,45%));
}
.tab-content .btn-primary:hover {
  background:hsl(var(--tab-h,200), var(--tab-s,70%), calc(var(--tab-l,45%) + 8%));
}
.table{
  width:100%;
  border-collapse:collapse;
  margin-top:15px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--neu-dark);
}
.table th{
  background:rgba(255,255,255,0.5);
  padding:14px;
  text-align:center;
  color:var(--text-main);
  font-weight:600;
  border:1px solid var(--neu-dark);
}
.table td{
  padding:12px;
  text-align:center;
  background:var(--neu-bg);
  border:1px solid var(--neu-dark);
  color:var(--text-sub);
}
.container{max-width:1300px;margin:0 auto;padding:0 10px;}
h2{font-size:22px;color:var(--text-main);margin-bottom:10px;font-weight:600;}
h3{font-size:16px;color:var(--text-sub);margin:12px 0;font-weight:500;}
.tip{color:var(--text-tip);font-size:13px;margin:8px 0;line-height:1.5;}
.warn-tip{color:var(--danger);font-weight:500;}
.flex-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:15px 0;}
.chart-box{width:100%;height:420px;margin-top:15px;}
.hide{display:none !important;}
.cm-stat-item{display:inline-block;background:var(--bg-card);padding:2px 10px;border-radius:12px;border:1px solid var(--neu-dark);font-size:12px;white-space:nowrap;}
.cm-stat-item b{font-weight:700;}
.cm-word-count{text-align:right;font-size:10px;color:var(--text-tip);padding:1px 4px;}
.cm-textarea{resize:vertical;min-height:40px;}
@media(max-width:768px){
  #commentTable.cm-mobile{display:block;}
  #commentTable.cm-mobile thead{display:none;}
  #commentTable.cm-mobile tr{display:block;margin-bottom:10px;border:1px solid var(--neu-dark);border-radius:12px;padding:8px;background:var(--bg-card);}
  #commentTable.cm-mobile td{display:flex;justify-content:space-between;align-items:center;padding:4px 8px;border:none;background:transparent;text-align:right;}
  #commentTable.cm-mobile td::before{content:attr(data-label);font-weight:600;color:var(--text-main);text-align:left;}
}
.hide-input, .custom-select.hide-input {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  opacity: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
}
#loginPage{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:calc(100vh - 30px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
}
#loginPage.hide{display:none !important;}
.login-box{
  width:100%;
  max-width:420px;
  padding:30px;
  border-radius:22px;
  background:var(--neu-bg);
  box-shadow:var(--neu-out);
}
.login-box .neu-input{width:100%;}
#warnBox{
  border-radius:14px;
  padding:16px 22px;
  background:rgba(220,38,38,0.08);
  box-shadow:var(--neu-out);
  border:1px solid rgba(220,38,38,0.1);
}
textarea.neu-input{resize:none;min-height:60px;}
select.neu-input{
  appearance:none;
  cursor:pointer;
  text-align:center;
  text-align-last:center;
  min-width:140px;
  max-width:100%;
}
input[type="date"].neu-input {
  text-align: center;
}
#scheduleTable, #userTable {
  table-layout: fixed !important;
  width: 100% !important;
  max-width: 100% !important;
}
#scheduleTable {
  font-size: 13px;
}
#scheduleTable th,
#scheduleTable td {
  padding: 8px 6px !important;
  word-break: break-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#scheduleTable th:nth-child(1),
#scheduleTable td:nth-child(1) { width: 10%; }
#scheduleTable th:nth-child(2),
#scheduleTable td:nth-child(2) { width: 22%; }
#scheduleTable th:nth-child(3),
#scheduleTable td:nth-child(3) { width: 22%; }
#scheduleTable th:nth-child(4),
#scheduleTable td:nth-child(4) { width: 15%; }
#scheduleTable th:nth-child(5),
#scheduleTable td:nth-child(5) { width: 10%; }
#scheduleTable th:nth-child(6),
#scheduleTable td:nth-child(6) { width: 21%; }
#scheduleTable input[type="date"],
#userTable input[type="date"] {
  max-width: 100%;
  min-width: 0 !important;
}
/* 移动端自适应，参考考勤报告表样式 */
@media (max-width: 768px) {
  #scheduleTable {
    font-size: 11px !important;
    display: table !important;
    width: auto !important;
    min-width: 700px;
  }
  #scheduleTable th,
  #scheduleTable td {
    white-space: nowrap !important;
    word-break: keep-all !important;
    padding: 6px 8px !important;
    text-align: center !important;
  }
  #scheduleTable th:nth-child(1),
  #scheduleTable td:nth-child(1) { width: 12%; }
  #scheduleTable th:nth-child(2),
  #scheduleTable td:nth-child(2) { width: 22%; }
  #scheduleTable th:nth-child(3),
  #scheduleTable td:nth-child(3) { width: 22%; }
  #scheduleTable th:nth-child(4),
  #scheduleTable td:nth-child(4) { width: 14%; }
  #scheduleTable th:nth-child(5),
  #scheduleTable td:nth-child(5) { width: 10%; }
  #scheduleTable th:nth-child(6),
  #scheduleTable td:nth-child(6) { width: 20%; }
  #scheduleTable input[type="date"] {
    width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
    font-size: 11px;
    padding: 6px 4px;
    border: none;
    border-radius: 0;
    background: transparent;
    text-align: center;
  }
  #scheduleTable .neu-btn {
    padding: 4px 8px;
    font-size: 11px;
    min-height: auto;
  }
}

/* ====== 弹窗样式 ====== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: var(--bg-card);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
  margin: 0;
  font-size: 18px;
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-tip);
  padding: 0 8px;
}
.modal-close:hover {
  color: var(--text-primary);
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}

/* ====== 考勤报告表格样式 ====== */
.report-table {
  table-layout: fixed !important;
  width: 100% !important;
  max-width: 100% !important;
  font-size: 13px;
}
.report-table th,
.report-table td {
  padding: 8px 6px !important;
  word-break: break-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 移动端状态列表头保持原样，状态内容居中显示 */
@media (max-width: 768px) {
  .report-table {
    font-size: 11px !important;
    table-layout: fixed !important;
  }
  .report-table th,
  .report-table td {
    white-space: nowrap !important;
    word-break: keep-all !important;
    padding: 6px 4px !important;
    text-align: center !important;
  }
  .report-table th:nth-child(1),
  .report-table td:nth-child(1) { width: 16%; }
  .report-table th:nth-child(2),
  .report-table td:nth-child(2) { width: 14%; }
  .report-table th:nth-child(3),
  .report-table td:nth-child(3) { width: 12%; }
  .report-table th:nth-child(4),
  .report-table td:nth-child(4) { width: 28%; }
  .report-table th:nth-child(5),
  .report-table td:nth-child(5) { width: 30%; }
  .report-table-aggregate th:nth-child(1),
  .report-table-aggregate td:nth-child(1) { width: 12%; }
  .report-table-aggregate th:nth-child(2),
  .report-table-aggregate td:nth-child(2) { width: 14%; }
  .report-table-aggregate th:nth-child(3),
  .report-table-aggregate td:nth-child(3) { width: 10%; }
  .report-table-aggregate th:nth-child(4),
  .report-table-aggregate td:nth-child(4) { width: 22%; }
  .report-table-aggregate th:nth-child(5),
  .report-table-aggregate td:nth-child(5) { width: 20%; }
  .report-table-aggregate th:nth-child(6),
  .report-table-aggregate td:nth-child(6) { width: 22%; }
}
.report-table th {
  font-size: 12px;
  font-weight: 600;
  background: rgba(0,0,0,0.05);
}
.report-table th:nth-child(1),
.report-table td:nth-child(1) { width: 18%; min-width: 70px; }
.report-table th:nth-child(2),
.report-table td:nth-child(2) { width: 12%; min-width: 50px; }
.report-table th:nth-child(3),
.report-table td:nth-child(3) { width: 18%; min-width: 60px; }
.report-table th:nth-child(4),
.report-table td:nth-child(4) { width: 22%; min-width: 70px; }
.report-table th:nth-child(5),
.report-table td:nth-child(5) { width: 30%; min-width: 80px; }
/* 累计统计模式（6列） */
.report-table-aggregate th:nth-child(1),
.report-table-aggregate td:nth-child(1) { width: 12%; min-width: 50px; }
.report-table-aggregate th:nth-child(2),
.report-table-aggregate td:nth-child(2) { width: 14%; min-width: 50px; }
.report-table-aggregate th:nth-child(3),
.report-table-aggregate td:nth-child(3) { width: 10%; min-width: 40px; }
.report-table-aggregate th:nth-child(4),
.report-table-aggregate td:nth-child(4) { width: 22%; min-width: 50px; }
.report-table-aggregate th:nth-child(5),
.report-table-aggregate td:nth-child(5) { width: 20%; min-width: 50px; }
.report-table-aggregate th:nth-child(6),
.report-table-aggregate td:nth-child(6) { width: 22%; min-width: 50px; }

/* 姓名两端对齐（二字名自动分散对齐三字名宽度） */
.name-justify {
  display: inline-block;
  width: 3em;
  text-align: justify;
  text-align-last: justify;
}

/* 人数徽章样式 */
.badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(0,0,0,0.15);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  margin-left: 6px;
  vertical-align: middle;
}

/* 自动补全容器 */
.autocomplete-container {
  position: relative;
  display: inline-block;
}
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: white;
  border: 1px solid #d1d9e6;
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
}
.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}
.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover {
  background: #e0f2fe;
}
.autocomplete-item .sno {
  font-size: 12px;
  color: #999;
  margin-left: 8px;
}
.autocomplete-item .match-type {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  background: #f1f5f9;
  color: #64748b;
}

.hide-element {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

/* ====== 自定义下拉菜单样式 ====== */
.custom-select {
  position: relative;
  display: inline-block;
  min-width: 140px;
  max-width: 100%;
}
.custom-select select {
  display: none;
}
.custom-select-trigger {
  background: var(--neu-bg);
  border-radius: 12px;
  border: 1px solid var(--neu-dark);
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.custom-select-trigger::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--text-sub);
  pointer-events: none;
  transition: transform 0.2s;
}
.custom-select.open .custom-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}
.custom-select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--neu-bg);
  border-radius: 12px;
  border: 1px solid var(--neu-dark);
  box-shadow: var(--neu-out);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}
.custom-select.open .custom-select-options {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.custom-select-option {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-main);
  text-align: center;
  transition: background 0.15s;
}
.custom-select-option:hover {
  background: var(--primary-fade);
  color: var(--primary);
}
.custom-select-option.selected {
  background: var(--primary-fade);
  color: var(--primary);
  font-weight: 500;
}
/* 移动端自定义下拉菜单优化 */
@media (max-width:768px){
  .custom-select {
    width: 100%;
  }
  .custom-select-options {
    max-height: 200px;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
  }
  #cPreset {
    order: 4;
    width: 100% !important;
    max-width: 100% !important;
  }
}
#toast{
  position:fixed;top:25px;left:50%;transform:translateX(-50%);
  z-index:9999;padding:16px 32px;border-radius:14px;
  font-size:15px;font-weight:500;box-shadow:0 8px 30px rgba(0,0,0,0.15);
  opacity:0;transition:opacity 0.35s ease, transform 0.35s ease;
  pointer-events:none;max-width:90vw;text-align:center;
  background:var(--neu-bg);color:var(--text-main);
}
#toast.show{opacity:1;transform:translateX(-50%) translateY(0);}
#toast.toast-success{background:#d1fae5;color:#065f46;}
#toast.toast-error{background:#fee2e2;color:#991b1b;}
#toast.toast-warning{background:#fef3c7;color:#92400e;}
#toast.toast-info{color:var(--text-main);}
#loadingOverlay{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(238,242,248,0.7);z-index:9998;
  display:flex;align-items:center;justify-content:center;
  opacity:0;pointer-events:none;transition:opacity 0.25s;
}
#loadingOverlay.show{opacity:1;pointer-events:auto;}
.loading-spinner{
  width:48px;height:48px;
  border:4px solid var(--neu-dark);border-top-color:var(--primary);
  border-radius:50%;animation:spin 0.8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
.login-error{margin-top:12px;padding:10px;border-radius:10px;background:rgba(220,38,38,0.08);color:var(--danger);font-size:14px;text-align:center;display:none;}
@media screen and (-webkit-min-device-pixel-ratio:2) and (max-width:768px){
  *{-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;}
  body{padding:10px;}
  .neu-card,.nav,.login-box{border-radius:16px !important;}
  .neu-btn{-webkit-appearance:none;appearance:none;border-radius:10px;}
  .neu-input{-webkit-appearance:none;appearance:none;border-radius:12px;}
  :root{
    --neu-out: 4px 4px 8px var(--neu-dark), -4px -4px 8px var(--neu-light);
    --neu-inset: inset 2px 2px 5px var(--neu-dark), inset -2px -2px 5px var(--neu-light);
  }
  .neu-btn,.nav-item{transform:translateZ(0);backface-visibility:hidden;}
}
@media (max-width:768px){
  .nav{gap:6px;padding:12px;overflow-x:auto;flex-wrap:nowrap;justify-content:flex-start;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
  .nav::-webkit-scrollbar{display:none;}
  .nav-item{padding:10px 14px;font-size:13px;white-space:nowrap;flex-shrink:0;}
  .neu-card{padding:16px;}
  .flex-row{gap:8px;}
  .neu-input{width:100% !important;}
  .table td select.neu-input{width:auto !important;min-width:64px;}
  .neu-btn{padding:9px 16px;font-size:13px;min-height:42px;}
  .chart-box{height:300px;}
  .table{overflow-x:auto;display:block;-webkit-overflow-scrolling:touch;}
  .table th,.table td{padding:10px 6px;font-size:13px;white-space:nowrap;}
  .tab-content{animation-duration:0.3s;}
  #logoutBtn{padding:4px 10px !important;font-size:11px !important;min-height:auto !important;white-space:nowrap;}
  #changePwdBtn{padding:4px 10px !important;font-size:11px !important;min-height:auto !important;white-space:nowrap;}
  #mainPage > .neu-card:first-child > div:last-child{flex-wrap:wrap;}
  #mainPage > .neu-card:first-child > div:last-child > div:last-child{display:flex;flex-direction:column;gap:4px;}
  #mainPage > .neu-card:first-child > div:first-child > span{white-space:nowrap;font-size:clamp(9px,2.6vw,12px);}
}

/* ====== 身份水印样式 - 分散全屏布局 ====== */
.watermark {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  background-image: var(--watermark-bg);
  background-repeat: repeat;
  background-size: 400px 280px;
  opacity: 0.35;
}
@media (max-width:768px){
  .watermark{background-size: 340px 240px;}
}
@media (min-width:769px){
  .table{width:100%;min-width:auto;}
  .table th, .table td{white-space:nowrap;padding:10px 12px;}
  .table th:first-child, .table td:first-child{width:40px;min-width:40px;max-width:40px;}
  .table td select.neu-input{padding:4px 8px;font-size:13px;width:auto;min-width:70px;}
  .table td .neu-btn{padding:5px 12px;font-size:13px;min-height:auto;white-space:nowrap;}
  #mainPage > .neu-card:first-child > div:last-child{flex-direction:row!important;gap:10px!important;}
  #changePwdBtn,#logoutBtn{padding:6px 18px!important;font-size:13px!important;}
}
