* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #f5f5f7;
    min-height: 100vh;
    padding: 32px;
    color: #111;
}

.container {
    max-width: 1200px;
    margin: 0 auto 40px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(17, 17, 17, 0.08), 0 2px 8px rgba(17,17,17,0.05);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f7f9 100%);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.logo-block h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: #111;
}

.subtitle {
    margin-top: 4px;
    color: #666;
    font-size: 13px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switch-container { position: relative; }

/* 语言切换开关样式（保留原样） */
.switch { position: relative; margin: 0; }
.switch input {
  top: 0; right: 0; bottom: 0; left: 0;
  opacity: 0; z-index: 100; position: absolute;
  width: 100%; height: 100%; cursor: pointer;
}
.switch.demo3 { width: 140px; height: 44px; }
.switch.demo3 label {
  display: block; width: 100%; height: 100%;
  background: #e1e4ea; border-radius: 50px;
  box-shadow: inset 0 4px 8px 2px rgba(0,0,0,0.08),
    0 1px 0 rgba(255, 255, 255, 0.7);
  transition: background 0.3s;
}
.switch.demo3 label:after {
  content: ""; position: absolute; z-index: -1;
  top: -8px; right: -8px; bottom: -8px; left: -8px;
  border-radius: inherit; background: linear-gradient(#f2f2f2, #c8cbd1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.08);
}
.switch.demo3 label:before {
  content: ""; position: absolute; z-index: -1;
  top: -18px; right: -18px; bottom: -18px; left: -18px;
  border-radius: inherit; background: linear-gradient(#e5e7e6, #eee);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  filter: blur(1px);
}
.switch.demo3 label i {
  display: block; height: 100%; width: 58%;
  border-radius: inherit; background: linear-gradient(#ffffff, #cfd3db);
  position: absolute; z-index: 2; right: 42%; top: 0;
  box-shadow: inset 0 1px 0 white, 0 0 8px rgba(0, 0, 0, 0.2),
    0 5px 5px rgba(0, 0, 0, 0.08);
  transition: right 0.3s;
}
.switch.demo3 label i:after {
  content: ""; position: absolute; left: 15%; top: 25%;
  width: 70%; height: 50%;
  background: linear-gradient(#d5d8de, #c9ced6); border-radius: inherit;
}
.switch.demo3 label i:before {
  content: "中文"; font-style: normal; font-weight: 700;
  color: rgba(0, 0, 0, 0.45); font-family: "SF Pro Display", Arial, sans-serif;
  font-size: 15px; position: absolute; top: 50%;
  margin-top: -9px; right: -40%; transition: all 0.3s; white-space: nowrap;
}
.switch.demo3 input:checked ~ label { background: #d2e5ff; }
.switch.demo3 input:checked ~ label i { right: 0%; }
.switch.demo3 input:checked ~ label i:before {
  content: "EN"; right: 110%; color: #3a7cff; text-transform: uppercase;
}

.section { padding: 26px 28px; border-bottom: 1px solid rgba(0,0,0,0.04); background: #fff; }
.section:last-child { border-bottom: none; }
.section h2 { font-size: 22px; color: #111; margin-bottom: 16px; font-weight: 700; }

.admin-card {
    background: #f8f9fb;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.admin-status { margin-bottom: 8px; color: #444; font-size: 14px; }
.admin-actions { text-align: right; margin-bottom: 10px; }
.team-card {
    border: 1px dashed #d6d8dd;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fff;
}
.team-list .form-row, .admin-passwords .form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.team-list input, .team-list textarea, .admin-passwords input {
    padding: 10px 12px; border: 1px solid #dfe1e5; border-radius: 10px; font-size: 14px; background: #fff;
}
.team-list label, .admin-passwords label { color: #444; font-size: 14px; }

/* 数据库统计 */
.stats-box {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; background: #f9fafb; border-radius: 14px; border: 1px solid rgba(0,0,0,0.04);
}
.total-count { font-size: 20px; }
.total-count .label { color: #666; }
.total-count .value { color: #0f6fff; font-weight: 700; font-size: 28px; margin: 0 10px; }

/* 按钮样式 */
.btn {
    padding: 11px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    letter-spacing: 0.1px;
}
.btn-primary { background: linear-gradient(180deg, #4d7cff 0%, #2c5eff 100%); color: #fff; box-shadow: 0 8px 16px rgba(76,118,255,0.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(76,118,255,0.4); }
.btn-success { background: linear-gradient(180deg, #2ac88a 0%, #13b26f 100%); color: #fff; box-shadow: 0 8px 16px rgba(19,178,111,0.25); }
.btn-success:hover { background: #0fa260; transform: translateY(-1px); box-shadow: 0 10px 20px rgba(19,178,111,0.35); }
.btn-danger { background: linear-gradient(180deg, #ff6b6b 0%, #f54747 100%); color: #fff; box-shadow: 0 8px 16px rgba(245,71,71,0.35); }
.btn-danger:hover { background: #e63b3b; transform: translateY(-1px); box-shadow: 0 10px 20px rgba(229,57,57,0.4); }
.btn-secondary { background: #e9ecf1; color: #3a3a3c; border: 1px solid #d1d5db; }
.btn-secondary:hover { background: #dde1e8; transform: translateY(-1px); box-shadow: 0 6px 12px rgba(0,0,0,0.08); }
.btn-secondary.ghost { background: #f3f4f6; color: #444; }
.btn-download { background: linear-gradient(180deg, #f7b733 0%, #fc4a1a 100%); color: #fff; box-shadow: 0 8px 16px rgba(252,74,26,0.25); }
.btn:disabled { background: #d1d5db; color: #999; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-admin {
    background: rgba(0,0,0,0.06);
    color: #111;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 4px 10px rgba(0,0,0,0.08);
}
.btn-admin:hover { background: rgba(0,0,0,0.08); transform: translateY(-1px); }

/* 导入区域 */
.import-box { background: #f8f9fb; padding: 20px; border-radius: 14px; border: 1px solid rgba(0,0,0,0.04); }
.employee-selectors { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.selector { display: flex; flex-direction: column; min-width: 200px; }
.selector label { margin-bottom: 6px; color: #333; font-weight: 500; }
.selector select { padding: 10px; border: 1px solid #dfe1e5; border-radius: 10px; font-size: 14px; background: #fff; }

.file-upload { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.file-name { color: #666; font-size: 14px; }

.import-result { margin-top: 20px; padding: 20px; background: #fff; border-radius: 12px; border: 1px solid rgba(0,0,0,0.06); }
.result-container { display: flex; gap: 20px; align-items: flex-start; }
.result-stats { flex: 0 0 250px; }
.import-result h3 { font-size: 18px; margin-bottom: 15px; color: #333; }
.duplicate-details { flex: 1; min-width: 0; }
.result-item { display: flex; align-items: center; margin-bottom: 12px; font-size: 16px; }
.result-item .label { color: #666; width: 120px; }
.result-item .value { font-weight: 600; font-size: 20px; margin: 0 10px; }
.result-item .value.duplicate { color: #e63b3b; }
.result-item .value.valid { color: #0fa260; }
.result-item .unit { color: #999; }

/* 表格样式 */
.table-container { overflow-x: auto; }
.employee-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.stats-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05); }
.sub-title { margin: 16px 0 8px; color: #333; font-weight: 600; }
.stats-table thead { background: #f4f5f7; color: #111; }
.stats-table th { padding: 15px; text-align: left; font-weight: 700; }
.stats-table td { padding: 15px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.stats-table tbody tr:hover { background: #f9fafb; }
.stats-table tbody tr:last-child td { border-bottom: none; }
.loading { text-align: center; color: #999; padding: 30px !important; }

.btn-filter { background: #eef0f4; color: #111; border: 1px solid rgba(0,0,0,0.06); padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-filter.active { background: #0f6fff; color: #fff; border-color: #0f6fff; }

.toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 2000;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
    min-width: 240px; padding: 12px 16px; border-radius: 12px;
    color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    animation: fadeIn 0.2s ease, fadeOut 0.3s ease 2.7s forwards;
    pointer-events: auto;
}
.toast.info { background: linear-gradient(120deg, #0f6fff, #4d7cff); }
.toast.error { background: linear-gradient(120deg, #ff6b6b, #f54747); }
.toast.success { background: linear-gradient(120deg, #2ac88a, #13b26f); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-10px); } }

.inline-dialog {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35); display: flex; align-items: center; justify-content: center; z-index: 2100;
}
.inline-dialog-content {
    background: #fff; color: #111; padding: 20px 24px; border-radius: 16px;
    min-width: 280px; box-shadow: 0 16px 40px rgba(0,0,0,0.18); text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
}
.inline-dialog-message { margin-bottom: 16px; font-size: 16px; }

.export-box { display: flex; gap: 15px; }

/* 对话框 */
.dialog-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;
}
.dialog {
    background: white; padding: 30px; border-radius: 16px; max-width: 420px; width: 90%;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}
.dialog h3 { font-size: 20px; margin-bottom: 15px; color: #111; }
.dialog p { color: #666; margin-bottom: 20px; line-height: 1.6; }
.dialog-buttons { display: flex; gap: 10px; justify-content: flex-end; }

/* 管理员模态 */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.28);
    display: flex; align-items: center; justify-content: center;
    z-index: 2200; padding: 24px;
}
.modal-content {
    width: 100%; max-width: 760px; background: #fff;
    border-radius: 20px; padding: 20px 20px 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.18);
    border: 1px solid rgba(0,0,0,0.05);
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}

/* 输入与文本域 */
input, textarea, select {
    font-family: inherit;
}

.import-box textarea {
    border: 1px solid #dfe1e5;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    background: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body { padding: 12px; }
    .container { border-radius: 18px; }
    .app-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .header-actions { width: 100%; justify-content: flex-end; }
    .stats-box { flex-direction: column; gap: 15px; align-items: flex-start; }
    .file-upload { flex-direction: column; align-items: flex-start; }
    .export-box { flex-direction: column; width: 100%; }
    .export-box .btn { width: 100%; text-align: center; }
}
