/* 全局样式文件 v2.0 - 移动端导航修复 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding-top: 150px; /* 为固定header预留空间 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部导航 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 998;
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    /* 移除z-index，避免阻挡汉堡按钮 */
}

header h1 {
    text-align: center;
    margin: 0;
    flex: 1;
    font-size: 1.5rem;
}

/* 导航切换按钮(汉堡菜单)- 保持简单的三横线，不变换为X */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10002 !important;
    position: relative;
    transition: opacity 0.3s, visibility 0.3s;
}

.nav-toggle span {
    width: 30px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: none; /* 移除动画效果 */
}

/* 菜单展开时隐藏汉堡按钮 */
.nav-toggle.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 移除汉堡按钮的X变换效果 */

/* 导航关闭按钮 */
.nav-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: white;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    z-index: 10003 !important;
    padding: 0;
    transition: transform 0.2s, color 0.2s;
}

.nav-close:hover {
    transform: scale(1.1);
    color: #3498db;
}

/* 主导航 */
.main-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background-color: #34495e;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: #4a6278;
}

.main-nav a.active {
    background-color: #3498db;
}

/* 退出登录按钮样式 */
.main-nav a.access-logout-link {
    color: #bcb1be;
    font-weight: normal;
}

/* 兼容旧版本的nav选择器 - 桌面端样式 */
header nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

header nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background-color: #34495e;
    border-radius: 5px;
    transition: background-color 0.3s;
}

header nav a:hover {
    background-color: #4a6278;
}

header nav a.active {
    background-color: #3498db;
}

/* 卡片容器 */
.card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: visible; /* 确保下拉框不被裁剪 */
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
    position: relative; /* 为绝对定位的下拉框提供定位上下文 */
    overflow: visible; /* 确保下拉框不被裁剪 */
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
    vertical-align: middle;
}

.form-group input[type="checkbox"] + label,
.form-group input[type="radio"] + label {
    display: inline;
    font-weight: normal;
    cursor: pointer;
    vertical-align: middle;
    margin-bottom: 0;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

table th,
table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
}

table th {
    background-color: #34495e;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #2c3e50;
}

table tbody tr {
    transition: background-color 0.2s;
}

table tbody tr:hover {
    background-color: #f8f9fa;
}

table tr:nth-child(even) {
    background-color: #fafafa;
}

table tr:nth-child(even):hover {
    background-color: #f8f9fa;
}

/* 表格对齐样式 */
table td:first-child,
table th:first-child {
    padding-left: 12px;
}

table td:last-child,
table th:last-child {
    padding-right: 12px;
}

/* 数字列右对齐 */
table td[style*="text-align: right"],
table th[style*="text-align: right"] {
    text-align: right !important;
}

/* 居中对齐 */
table td[style*="text-align: center"],
table th[style*="text-align: center"] {
    text-align: center !important;
}

/* 表格页脚（汇总行）*/
table tfoot tr {
    background-color: #e8f4f8 !important;
    font-weight: bold;
    font-size: 14px;
    border-top: 2px solid #3498db;
}

table tfoot td {
    padding: 12px;
    border-bottom: none;
}

/* 表格工具类 */
.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.font-bold {
    font-weight: bold !important;
}

.text-success {
    color: #27ae60 !important;
}

.text-danger {
    color: #e74c3c !important;
}

.text-warning {
    color: #f39c12 !important;
}

.text-muted {
    color: #95a5a6 !important;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    display: inline-block;
    text-decoration: none;
    margin: 0 2px;
}

/* 消息提示 */
.alert {
    display: none !important;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ========================================
   Toast 提示样式
   ======================================== */

/* Toast 容器 */
.toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Toast 项 */
.toast {
    min-width: 250px;
    max-width: 400px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 16px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(-100px);
    transition: all 0.3s ease;
    border-left: 4px solid #3498db;
}

/* Toast 显示状态 */
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Toast 淡出状态 */
.toast.hide {
    opacity: 0;
    transform: translateY(-100px);
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    max-height: 0;
}

/* Toast 图标 */
.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

/* Toast 内容 */
.toast-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

/* Toast 关闭按钮 */
.toast-close {
    font-size: 20px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    flex-shrink: 0;
    line-height: 1;
    font-weight: bold;
}

.toast-close:hover {
    color: #333;
}

/* Toast 类型样式 */
.toast-success {
    background-color: rgba(212, 237, 218, 0.95);
    color: #155724;
    border-left-color: #28a745;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-error {
    background-color: rgba(248, 215, 218, 0.95);
    color: #721c24;
    border-left-color: #dc3545;
}

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-info {
    background-color: rgba(209, 236, 241, 0.95);
    color: #0c5460;
    border-left-color: #17a2b8;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

.toast-warning {
    background-color: rgba(255, 243, 205, 0.95);
    color: #856404;
    border-left-color: #ffc107;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .toast-container {
        top: 80px; /* 调整为在固定header下方 */
        left: 10px;
        right: 10px;
        max-width: none;
        transform: none;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        font-size: 13px;
    }
    
    .toast-icon {
        font-size: 20px;
    }
}

/* 首页卡片网格 */
.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.home-card {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.home-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.home-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.home-card p {
    color: #7f8c8d;
    font-size: 14px;
}

.home-card .icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #3498db;
}

/* 报表汇总 */
.summary-box {
    background-color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    border-left: 4px solid #3498db;
}

.summary-box h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #bdc3c7;
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 18px;
    color: #e74c3c;
}

/* 计件记录卡片列表 */
.record-cards {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.record-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.record-date-header {
    background-color: #34495e;
    color: white;
    padding: 6px 12px;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.record-date-header .header-actions {
    display: flex;
    gap: 6px;
}

.record-date-header .btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    text-decoration: none;
    color: white;
    transition: opacity 0.2s;
}

.record-date-header .btn-sm:hover {
    opacity: 0.9;
}

/* 通用小按钮样式 */
.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    text-decoration: none;
    color: white;
    transition: opacity 0.2s;
    display: inline-block;
}

.btn-sm:hover {
    opacity: 0.9;
}

.record-card table {
    margin: 0;
    box-shadow: none;
    table-layout: fixed;
    width: 100%;
}

.record-card table tbody tr {
    background: white;
}

.record-card table tbody tr:hover {
    background: #fafafa;
}

.record-card table th {
    background-color: #ecf0f1;
    color: #2c3e50;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    width: 20%;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.record-card table td {
    padding: 6px 10px;
    font-size: 13px;
    border-bottom: 1px solid #e0e0e0;
    width: 30%;
}

.record-card table tbody tr:last-child th,
.record-card table tbody tr:last-child td {
    border-bottom: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 移动端为固定header预留空间 */
    body {
        padding-top: 70px;
    }
    
    /* 显示汉堡菜单按钮 */
    .nav-toggle {
        display: flex;
    }
    
    /* 显示导航关闭按钮 */
    .nav-close {
        display: block;
    }
    
    /* 隐藏标题中的Emoji以节省空间 */
    header h1 {
        font-size: 1.2rem;
    }
    
    .header-container {
        padding: 0 15px;
    }
    
    /* 移动端导航样式 */
    .main-nav {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 280px !important;
        height: 100vh !important;
        background-color: #2c3e50 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: -3px 0 10px rgba(0,0,0,0.3) !important;
        transition: right 0.3s ease !important;
        z-index: 10001 !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: stretch !important;
    }
    
    .main-nav.active {
        right: 0 !important;
    }
    
    .main-nav a {
        border-radius: 0;
        padding: 15px 25px;
        text-align: left;
        border-bottom: 1px solid #34495e;
        flex-shrink: 0;
        position: relative;
    }
    
    .main-nav a:hover {
        background-color: #34495e;
    }
    
    .main-nav a.active {
        background-color: #3498db;
    }
    
    .main-nav a.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background-color: white;
    }
    
    /* 兼容旧导航样式 - 移动端 */
    header nav {
        flex-direction: column !important;
    }
    
    header nav a {
        text-align: center;
    }
    
    .home-grid {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 6px 8px;
    }
    
    .query-form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .query-form-button {
        grid-column: 1 !important;
    }
    
    /* 卡片式记录移动端优化 */
    .record-date-header {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .record-date-header .btn-sm {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .record-card table th {
        font-size: 11px;
        padding: 4px 8px;
        width: 25%;
    }
    
    .record-card table td {
        padding: 4px 8px;
        font-size: 11px;
        width: 25%;
    }
}

/* 分页样式 */
.pagination-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* 查询表单样式 */
.query-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.query-form-button {
    display: flex;
    align-items: flex-end;
}

.pagination-info {
    color: #7f8c8d;
    font-size: 14px;
}

.pagination {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-link {
    padding: 8px 12px;
    background-color: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
    min-width: 36px;
    text-align: center;
}

.page-link:hover:not(.disabled):not(.active) {
    background-color: #3498db;
    color: white;
}

.page-link.active {
    background-color: #3498db;
    color: white;
    font-weight: bold;
}

.page-link.disabled {
    background-color: #ecf0f1;
    color: #95a5a6;
    cursor: not-allowed;
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.per-page-selector label {
    color: #7f8c8d;
    font-size: 14px;
}

.per-page-link {
    padding: 6px 12px;
    background-color: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s;
}

.per-page-link:hover {
    background-color: #bdc3c7;
}

.per-page-link.active {
    background-color: #27ae60;
    color: white;
    font-weight: bold;
}

/* ========================================
   可搜索下拉菜单样式
   ======================================== */

/* 主容器 */
.searchable-select-wrapper {
    position: relative;
    width: 100%;
    z-index: 10; /* 基础z-index，确保高于普通内容 */
}

/* 打开状态提升z-index */
.searchable-select-wrapper.open {
    z-index: 3000; /* 打开时提升到最高，确保在所有其他元素之上 */
}

/* 隐藏原始 select 元素，但保持表单验证功能 */
.searchable-select-wrapper select.searchable-select-initialized {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    width: 1px;
    height: 1px;
}

/* 显示框 */
.searchable-select-display {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.3s, box-shadow 0.3s;
    position: relative;
    z-index: 1;
}

.searchable-select-display:hover {
    border-color: #3498db;
}

.searchable-select-wrapper.open .searchable-select-display {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* 显示值 */
.searchable-select-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchable-select-value.placeholder {
    color: #999;
}

/* 箭头 */
.searchable-select-arrow {
    margin-left: 8px;
    color: #666;
    font-size: 12px;
    transition: transform 0.3s;
}

.searchable-select-wrapper.open .searchable-select-arrow {
    transform: rotate(180deg);
}

/* 下拉面板 */
.searchable-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 3001; /* 确保在打开状态的容器之上 */
    display: none;
    overflow: hidden; /* 保持hidden以保留圆角效果 */
    pointer-events: auto; /* 确保可以接收鼠标事件 */
    /* 移除 touch-action: none，否则会阻止输入框的所有触摸交互 */
}

.searchable-select-wrapper.open .searchable-select-dropdown {
    display: block;
    pointer-events: auto; /* 打开时确保可以接收鼠标事件 */
}

/* 搜索输入框 */
.searchable-select-search {
    width: 100%;
    padding: 10px;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    outline: none;
}

.searchable-select-search:focus {
    border-bottom-color: #3498db;
}

/* 选项列表容器 */
.searchable-select-options {
    height: 280px; /* 增加高度以确保最后一个选项完整显示 */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
    overscroll-behavior: contain; /* 防止滚动穿透 */
    touch-action: pan-y; /* 允许竖直滚动 */
    scroll-behavior: smooth; /* 平滑滚动 */
    padding-bottom: 4px; /* 添加底部内边距，确保最后一项有足够空间 */
}

/* 自定义滚动条 */
.searchable-select-options::-webkit-scrollbar {
    width: 8px;
}

.searchable-select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.searchable-select-options::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.searchable-select-options::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 单个选项 */
.searchable-select-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none; /* 防止文本选择 */
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent; /* 移除iOS点击高亮 */
}

.searchable-select-option:hover {
    background-color: #ecf0f1;
}

.searchable-select-option.selected {
    background-color: #e8f4f8;
    color: #3498db;
    font-weight: bold;
}

.searchable-select-option.disabled {
    color: #999;
    cursor: not-allowed;
    background-color: #f9f9f9;
}

.searchable-select-option.disabled:hover {
    background-color: #f9f9f9;
}

/* 无结果提示 */
.searchable-select-no-result {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .searchable-select-dropdown {
        /* 移除max-height限制，让选项列表决定高度 */
    }
    
    .searchable-select-options {
        height: 320px; /* 移动端使用固定高度，稍大一些以显示更多选项 */
        overflow-y: auto !important; /* 使用auto，只在需要时显示滚动条 */
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important; /* iOS平滑滚动 */
        overscroll-behavior: contain !important; /* 防止滚动穿透 */
        touch-action: pan-y !important; /* 允许竖直滚动，这是关键 */
        padding-bottom: 8px !important; /* 底部内边距，确保最后一项完整显示 */
    }
    
    /* 移动端下拉框选项触摸优化 */
    .searchable-select-option {
        padding: 12px 15px; /* 增大触摸区域 */
        min-height: 44px; /* iOS推荐的最小触摸区域 */
        display: flex;
        align-items: center;
        font-size: 14px; /* 明确设置字体大小 */
        line-height: 1.5; /* 明确设置行高 */
        color: #333; /* 明确设置文字颜色 */
        flex-shrink: 0; /* 防止flex压缩 */
        /* 移除 touch-action: none，以允许触摸滚动 */
        -webkit-tap-highlight-color: transparent; /* 移除iOS点击高亮 */
    }
}

/* ========================================
   表单标签和链接样式
   ======================================== */

.form-label-with-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.form-label-with-link label {
    margin-bottom: 0;
}

.form-label-with-link .add-link {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    font-weight: normal;
    transition: color 0.3s;
}

.form-label-with-link .add-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ========================================
   模态框样式
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
}
