body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.8;
    color: #333;
}

.container {
    width: 85%;
    margin: 0 auto;
    padding: 20px 0;
}

/* 导航栏样式 */
nav {
    background: #2c3e50;
    color: #fff;
    padding: 12px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav a {
    color: #fff;
    margin-right: 20px;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: #34495e;
    text-decoration: none;
}

/* 表格样式 - 优化中文显示 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 15px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.table th, .table td {
    padding: 14px 16px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.table th {
    background-color: #3498db;
    color: white;
    font-weight: 600;
    letter-spacing: 1px;
}

.table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table tr:hover {
    background-color: #f1f7fd;
}

/* 表单样式 */
.form-container {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    margin: 30px auto;
    max-width: 600px;
}

.form-title {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-size: 24px;
}

form p {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border 0.3s;
}

input:focus, textarea:focus, select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52,152,219,0.3);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-align: center;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-edit {
    background: #f39c12;
    color: white;
    margin-right: 8px;
}

.btn-edit:hover {
    background: #d35400;
}

/* 操作按钮容器 */
.action-buttons {
    margin: 25px 0;
    text-align: center;
}

/* 提示消息样式 */
.alert {
    padding: 15px;
    margin: 15px 0;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 15px;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }

    nav a {
        display: block;
        margin: 8px 0;
    }

    .table {
        font-size: 14px;
    }

    .table th, .table td {
        padding: 10px 8px;
    }
}
/* 财务记录页面样式 */
.finance-container {
    width: 90%;
    margin: 20px auto;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.finance-title {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
}

.table-responsive {
    overflow-x: auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.finance-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.finance-table th {
    padding: 15px 20px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 1px;
    background-color: #3498db;
    color: white;
}

.finance-table td {
    padding: 12px 20px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.finance-table td:nth-child(3) {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #2ecc71;
}

.finance-table tr:hover {
    background-color: #f5f9fd;
}

.finance-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .finance-container {
        width: 95%;
    }

    .finance-table th,
    .finance-table td {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* 首页样式 */
.home-container {
    width: 90%;
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    text-align: center;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.home-title {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.welcome-message {
    margin: 20px 0;
    font-size: 18px;
    color: #555;
}

.auth-links {
    margin-top: 25px;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    margin: 0 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-login {
    background-color: #3498db;
    color: white;
    border: 2px solid #3498db;
}

.btn-login:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-logout {
    background-color: #e74c3c;
    color: white;
    border: 2px solid #e74c3c;
}

.btn-logout:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .home-container {
        width: 95%;
        padding: 20px;
    }

    .home-title {
        font-size: 24px;
    }

    .btn {
        padding: 8px 20px;
        margin: 5px;
        display: block;
        width: 80%;
        margin: 10px auto;
    }
}

/* 管理员仪表盘样式 */
.admin-dashboard {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.dashboard-title {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.dashboard-section {
    margin-bottom: 40px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

.section-title {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 20px;
    padding-left: 10px;
    border-left: 4px solid #3498db;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th {
    background-color: #f8f9fa;
    color: #495057;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

/* 财务表格特殊样式 */
.data-table td:nth-child(3) {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #28a745;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-dashboard {
        width: 95%;
    }

    .dashboard-section {
        padding: 15px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
}

/* ========== 优化后的下拉菜单样式 ========== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  position: relative;
  padding-right: 20px; /* 为箭头预留空间 */
}

/* 修改这里 - 去掉自定义箭头 */
.dropdown-btn::after {
  content: "";  /* 改为空字符串 */
  font-size: 10px;
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s;
}

/* 移除浏览器默认样式 */
.dropdown-btn {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  margin-top: 5px; /* 与按钮间距 */
}

.dropdown-content a {
  color: #333;
  padding: 10px 16px;
  display: block;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 14px;
}

.dropdown-content a:hover {
  background-color: #f8f9fa;
  padding-left: 20px;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* 导航栏适配 */
nav .dropdown {
  margin: 0 8px; /* 调整菜单项间距 */
}

nav .dropdown-btn {
  color: white;
  background-color: transparent;
  padding: 12px 15px 12px 20px; /* 调整内边距 */
}

/* 响应式适配 */
@media (max-width: 768px) {
  .dropdown-content {
    position: static;
    box-shadow: none;
    border: none;
    margin-top: 0;
    border-radius: 0;
  }

  nav .dropdown {
    display: block;
    margin: 0;
  }

  .dropdown-btn {
    width: 100%;
    text-align: left;
  }
}

.btn-danger {
    padding: 3px 8px;
    font-size: 12px;
}

.summary-row {
    background-color: #f8f9fa;
    font-weight: bold;
}

.summary-row td {
    border-top: 2px solid #dee2e6;
    border-bottom: 2px solid #dee2e6;
}

<style>
    .finance-table th {
        white-space: nowrap;  /* 禁止换行 */
        padding: 8px 12px;   /* 增加内边距 */
        text-align: center;   /* 文字居中 */
    }

    .finance-table {
        table-layout: fixed;  /* 固定表格布局 */
        width: 100%;         /* 表格宽度100% */
    }

    .finance-table th, .finance-table td {
        word-break: keep-all; /* 保持单词不换行 */
    }
</style>

/* 注册表单样式 */
.register-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: #333;
}

.form-input, .form-select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-select {
    background-color: white;
    cursor: pointer;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
}

.submit-btn {
    background: #3498db;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #2980b9;
}

/* ====== 移动端优先的响应式设计 ====== */
@media (max-width: 768px) {
    /* 基础布局调整 */
    .container {
        width: 95%;
        padding: 10px 0;
    }

    /* 导航栏完全重构 */
    nav {
        padding: 8px 0;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .hamburger {
        display: block;
        position: absolute;
        right: 15px;
        top: 12px;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 10px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a, .dropdown-btn {
        padding: 12px 15px;
        margin: 5px 0;
        width: 100%;
        text-align: left;
        border-radius: 4px;
        background-color: rgba(255,255,255,0.1);
    }

    .dropdown-content {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        border: none;
        margin: 0;
        padding-left: 15px;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    /* 表单完全重构 */
    .form-container {
        padding: 15px;
        margin: 15px auto;
    }

    .form-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    input, textarea, select {
        padding: 12px;
        font-size: 16px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        margin: 5px 0;
        padding: 12px;
    }

    /* 表格完全重构 - 改为卡片式布局 */
    .finance-container {
        width: 100%;
        padding: 0;
    }

    .finance-title {
        font-size: 20px;
        padding: 0 15px;
    }

    .table-responsive {
        display: block;
        width: 100%;
        padding: 0 10px;
    }

    .finance-table {
        display: none; /* 隐藏传统表格 */
    }

    .mobile-records {
        display: block;
    }

    .record-card {
        background: white;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .record-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;
        padding-bottom: 8px;
        border-bottom: 1px solid #eee;
    }

    .record-label {
        font-weight: bold;
        color: #555;
        flex: 1;
    }

    .record-value {
        flex: 2;
        text-align: right;
    }

    .record-actions {
        text-align: center;
        margin-top: 10px;
    }

    .btn-danger {
        width: 100%;
    }
}

/* ====== 现代化移动端UI方案 ====== */
@media (max-width: 768px) {
    /* 全局优化 */
    body {
        -webkit-font-smoothing: antialiased;
        background: #f5f7fa;
    }

    .container {
        padding: 0;
    }

    /* 现代化导航栏 */
    nav {
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
        box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    }

    .navbar {
        padding: 10px 15px;
    }

    .hamburger {
        color: #2c3e50;
        background: white;
        padding: 8px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        background: white;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-radius: 0 0 10px 10px;
        padding: 10px 0;
    }

    .nav-links a, .dropdown-btn {
        color: #2c3e50;
        margin: 5px 15px;
        padding: 12px 15px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-links a:hover, .dropdown-btn:hover {
        background: #f0f4f8;
        transform: translateX(5px);
    }

    .dropdown-content a {
        color: #5c6b7a;
        font-size: 14px;
    }

    /* 现代化卡片设计 */
    .finance-container {
        margin-top: 70px;
        padding: 15px;
    }

    .list-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .finance-title {
        color: #2c3e50;
        font-size: 1.5rem;
        font-weight: 600;
        margin: 0;
    }

    .btn-primary {
        background: linear-gradient(135deg, #3498db, #2c3e50);
        border: none;
        border-radius: 25px;
        padding: 10px 20px;
        box-shadow: 0 3px 10px rgba(52,152,219,0.3);
    }

    .record-card {
        background: white;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 15px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        transition: transform 0.3s, box-shadow 0.3s;
        border-left: 4px solid #3498db;
    }

    .record-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }

    .record-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px dashed #e0e6ed;
    }

    .record-row:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .record-label {
        color: #6c757d;
        font-weight: 500;
        font-size: 14px;
    }

    .record-value {
        color: #2c3e50;
        font-weight: 600;
        text-align: right;
        max-width: 60%;
    }

    .record-actions {
        margin-top: 15px;
    }

    .btn-danger {
        background: linear-gradient(135deg, #e74c3c, #c0392b);
        border: none;
        border-radius: 25px;
        width: 100%;
        padding: 12px;
        box-shadow: 0 3px 10px rgba(231,76,60,0.3);
    }

    /* 现代化表单设计 */
    .form-container {
        margin-top: 70px;
        background: white;
        border-radius: 12px;
        padding: 25px;
        box-shadow: 0 5px 25px rgba(0,0,0,0.05);
    }

    .form-title {
        color: #2c3e50;
        font-size: 1.5rem;
        text-align: center;
        margin-bottom: 25px;
        position: relative;
        padding-bottom: 10px;
    }

    .form-title:after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 3px;
        background: linear-gradient(to right, #3498db, #2ecc71);
    }

    .form-group {
        margin-bottom: 20px;
    }

    label {
        color: #5c6b7a;
        font-weight: 500;
        margin-bottom: 8px;
        display: block;
    }

    .form-input, .form-select {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid #e0e6ed;
        border-radius: 8px;
        font-size: 16px;
        transition: all 0.3s;
        background: #f8fafc;
    }

    .form-input:focus, .form-select:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52,152,219,0.2);
        background: white;
    }

    textarea.form-input {
        min-height: 100px;
    }

    .action-buttons {
        display: flex;
        gap: 15px;
        margin-top: 30px;
    }

    .btn-submit {
        background: linear-gradient(135deg, #2ecc71, #27ae60);
        color: white;
        border: none;
        border-radius: 25px;
        padding: 12px 25px;
        font-size: 16px;
        font-weight: 500;
        flex: 1;
        box-shadow: 0 3px 10px rgba(46,204,113,0.3);
    }

    .btn-cancel {
        background: white;
        color: #6c757d;
        border: 1px solid #e0e6ed;
        border-radius: 25px;
        padding: 12px 25px;
        font-size: 16px;
        font-weight: 500;
        flex: 1;
        transition: all 0.3s;
    }

    .btn-cancel:hover {
        background: #f8f9fa;
        border-color: #d6d8db;
    }

    /* 动画效果 */
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .record-card {
        animation: fadeIn 0.5s ease forwards;
    }

    .record-card:nth-child(odd) {
        animation-delay: 0.1s;
    }

    /* 加载指示器 */
    .loading {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 3px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        border-top-color: white;
        animation: spin 1s ease-in-out infinite;
        margin-right: 10px;
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }
}

/* ====== 移动端友好表格方案 ====== */
/* 在文件最后添加以下代码，覆盖之前的冲突样式 */

/* ====== 修复移动端表格显示问题 ====== */
@media (max-width: 768px) {
    /* 确保表格容器可见 */
    .table-responsive {
        display: block !important;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 确保表格本身可见 */
    .finance-table {
        display: table !important;
        width: 100%;
        min-width: 600px; /* 保证表格完整显示的最小宽度 */
    }

    /* 重置之前可能隐藏表格的样式 */
    .mobile-records {
        display: none !important; /* 隐藏卡片式布局 */
    }

    /* 表格行样式调整 */
    .finance-table tr {
        display: table-row;
        margin-bottom: 0;
        box-shadow: none;
        border-left: none;
    }

    /* 表格单元格样式调整 */
    .finance-table td {
        display: table-cell;
        padding: 10px 8px;
        text-align: center;
        border: 1px solid #e0e0e0;
    }

    /* 移除伪元素标签 */
    .finance-table td::before {
        display: none !important;
    }

    /* 确保表头可见 */
    .finance-table thead {
        display: table-header-group !important;
    }

    /* 调整按钮大小 */
    .btn-danger {
        padding: 6px 10px;
        font-size: 13px;
        width: auto;
    }
}

    /* 添加按钮样式 */
    .add-btn-container {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 100;
    }

    .btn-add {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(135deg, #2ecc71, #27ae60);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 5px 15px rgba(46,204,113,0.3);
        font-size: 24px;
        border: none;
    }
}

/* 响应式表格列标签定义 */
@media (max-width: 768px) {
    .finance-table td:nth-child(1)::before { content: "日期"; }
    .finance-table td:nth-child(2)::before { content: "在职人数"; }
    .finance-table td:nth-child(3)::before { content: "退休人数"; }
    .finance-table td:nth-child(4)::before { content: "参保人数"; }
    .finance-table td:nth-child(5)::before { content: "新增参保"; }
    .finance-table td:nth-child(6)::before { content: "新增退休"; }
    .finance-table td:nth-child(7)::before { content: "转移人数"; }
    .finance-table td:nth-child(8)::before { content: "转移资金"; }
    .finance-table td:nth-child(9)::before { content: "备注"; }
}