* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f5ff;
    color: #333;
    line-height: 1.6;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部区域 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-type-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.admin-badge {
    background-color: #e74c3c;
}

.user-badge {
    background-color: #3498db;
}

.logout-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 主要内容区域 */
.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
    height: fit-content;
}

/* 查询面板 */
.query-panel-with-button {
    display: flex;
    gap: 20px;
    align-items: flex-end; /* 改为底部对齐 */
    flex-wrap: nowrap; /* 防止换行 */
}

.query-panel {
    display: flex;
    flex-direction: column;
    gap: 8px; /* 更紧凑的间隙 */
    flex: 1;
    min-width: 250px;
    height: auto; /* 自动高度 */
    justify-content: flex-start; /* 从顶部开始排列 */
    margin-bottom: 0;
    align-self: stretch; /* 拉伸以匹配按钮高度 */
}

.form-group {
    flex: 0 0 auto; /* 取消弹性，固定大小 */
    width: 100%; /* 占满宽度 */
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.required::after {
    content: " *";
    color: #e74c3c;
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.25);
    transition: border-color 0.3s, box-shadow 0.3s;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* 搜索按钮容器 */
.search-button-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 400px;
    flex-shrink: 0;
    align-self: stretch; /* 确保与左侧等高 */
    height: auto; /* 自动高度 */
    align-items: end; /* 按钮在底部对齐 */
}

.button-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-end; /* 按钮在列底部 */
    height: 100%; /* 继承父容器高度 */
}

.button-column .btn {
    width: 100%;
    margin-top: auto; /* 推到底部 */
}

/* 通用按钮样式 */
.btn {
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    background-color: #3a5a80;
}

.btn-success {
    background-color: #27ae60;
}

.btn-success:hover {
    background-color: #219653;
}

.btn-secondary {
    background-color: #7f8c8d;
}

.btn-secondary:hover {
    background-color: #6c7b7d;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-info {
    background-color: #3498db;
    color: white;
}

.btn-info:hover {
    background-color: #2980b9;
}

/* 数据表格 */
.results-container {
    border: 1px solid #eee;
    border-radius: 6px;
    margin-top: 20px;
    overflow: hidden;
}

.results-header {
    font-weight: bold;
    color: #2c3e50;
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    max-height: 500px;
    overflow-y: auto;
    display: block;
}

.data-table thead {
    background-color: #f1f5fd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.data-table th {
    padding: 15px 12px;
    text-align: left;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid #e0e6f0;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background-color: #f8faff;
}

.data-table td {
    vertical-align: top;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.no-data {
    text-align: center;
    color: #95a5a6;
    padding: 30px;
    font-style: italic;
}

/* 玻璃类型标签 */
.glass-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.igu-badge {
    background-color: #e8f4fd;
    color: #2980b9;
}

.laminated-badge {
    background-color: #e8f8f0;
    color: #27ae60;
}

/* 搜索摘要 */
.search-summary {
    background-color: #f1f5fd;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

/* 登录界面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f5ff;
}

.login-box {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
}

.login-box h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

.login-btn {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
}

.login-note {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #7f8c8d;
    text-align: center;
}

/* 模态框（弹窗） */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #95a5a6;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* 下拉列表自定义样式 */
.datalist-container {
    position: relative;
}

/* 搜索建议框样式 */
.datalist-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    z-index: 8888;
    display: none;
}

.datalist-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f0f5ff;
}

.suggestion-item.none-option {
    color: #7f8c8d;
    font-style: italic;
}

.suggestion-item.more-option {
    text-align: center;
    background-color: #f8f9fa;
    font-size: 0.85rem;
    cursor: default;
}

.suggestion-item.more-option:hover {
    background-color: #f8f9fa;
}

/* 输入框聚焦时的高亮样式 */
input:focus {
    border-color: #4a6fa5 !important;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.25) !important;
}

/* 移动端搜索建议框调整 */
@media (max-width: 768px) {
    .datalist-suggestions {
        max-height: 200px;
        font-size: 0.9rem;
    }
    
    .suggestion-item {
        padding: 8px 12px;
    }
}

/* 玻璃组成列样式 */
.glass-composition {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box; /* 旧版WebKit兼容 */
    display: box;
    -webkit-line-clamp: 3; /* 限制最多显示3行 */
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    transition: all 0.2s ease;
    max-height: 4.2em; /* 3行 * 1.4的行高，作为备用限制 */
    word-break: break-word; /* 长单词或URL自动换行 */
}

.glass-composition:hover {
    -webkit-line-clamp: unset; /* 取消行数限制 */
    line-clamp: unset;
    max-height: 500px; /* 设置一个足够大的最大高度 */
    overflow-y: auto; /* 如果内容极高，允许滚动 */
    background-color: #eef2f7;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    position: relative;
    white-space: pre-wrap; /* 保留文本中的换行符和空格 */
}

/* STC数值列样式 */
.stc-value {
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    border-radius: 4px;
    padding: 4px 8px !important; /* 使用 !important 覆盖表格td的内边距 */
    display: inline-block;
    min-width: 50px;
}

/* STC值颜色编码：0-30(红)，31-50(橙)，51-70(黄)，71-100(绿) */
.stc-value.low { background-color: #ffeaea; color: #c33; } /* 0-30 */
.stc-value.medium { background-color: #fff3e0; color: #e67e22; } /* 31-50 */
.stc-value.good { background-color: #f9f9e0; color: #f1c40f; } /* 51-70 */
.stc-value.excellent { background-color: #e8f6e8; color: #27ae60; } /* 71-100 */

/* 操作按钮容器 */
.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
    min-height: 40px;
}

/* 编辑/删除按钮优化 */
.edit-btn, .delete-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.edit-btn {
    background-color: #e3f2fd;
    color: #1976d2;
    border-color: #bbdefb;
}

.edit-btn:hover {
    background-color: #bbdefb;
    transform: translateY(-1px);
}

.delete-btn {
    background-color: #ffebee;
    color: #d32f2f;
    border-color: #ffcdd2;
}

.delete-btn:hover {
    background-color: #ffcdd2;
    transform: translateY(-1px);
}

/* 禁用按钮样式 */
.edit-btn.disabled, .delete-btn.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #f5f5f5 !important;
    border-color: #ddd !important;
    color: #999 !important;
    pointer-events: none !important;
}

/* 证书编号列样式 */
.certificate-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.certificate-link {
    color: #3498db;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 0; /* 允许内容收缩 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.certificate-link:hover {
    color: #2980b9;
    background-color: #eef2f7;
    text-decoration: none;
}

.link-icon {
    font-size: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.certificate-link:hover .link-icon {
    opacity: 1;
}

/* 复制证书按钮样式 */
.copy-certificate-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.6;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0; /* 防止按钮被压缩 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.copy-certificate-btn:hover {
    opacity: 1;
    background-color: #f0f0f0;
    color: #3498db;
}

/* 通知 */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: #27ae60;
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.error {
    background-color: #e74c3c;
}

.notification.warning {
    background-color: #f39c12;
}

/* 详情模态框样式 */
.detail-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #2c3e50;
    width: 100px;
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
    color: #555;
    word-break: break-word;
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    /* 调整容器和全局样式 */
    .container {
        padding: 0 15px;
        max-width: 100%;
    }
    
    body {
        font-size: 14px;
        overflow-x: hidden;
    }
    
    /* 头部调整 */
    header {
        padding: 12px 0;
        margin-bottom: 15px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    h1 {
        font-size: 1.2rem;
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .user-info {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    /* 登录界面调整 */
    .login-container {
        padding: 15px;
    }
    
    .login-box {
        padding: 20px 15px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 8px;
    }
    
    /* 查询面板重构 */
    .query-panel-with-button {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .query-panel {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        flex-direction: column;
    }
    
    .search-button-container {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .button-column {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    /* 表格和卡片切换 */
    .results-container {
        border: none;
        margin-top: 15px;
        overflow: hidden;
    }
    
    .results-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .data-table {
        display: none; /* 隐藏传统表格 */
    }
    
    .mobile-data-list {
        display: block !important; /* 强制显示移动端卡片 */
        margin-top: 10px;
    }
    
    /* 移动端卡片式列表 */
    .mobile-data-card {
        background: white;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 10px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        border-left: 4px solid #4a6fa5;
        transition: transform 0.2s;
    }
    
    .mobile-data-card:active {
        transform: translateY(2px);
    }
    
    .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .card-title {
        font-weight: 600;
        color: #2c3e50;
        font-size: 1rem;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding-right: 8px;
    }
    
    .card-stc {
        background-color: #f0f5ff;
        padding: 4px 8px;
        border-radius: 12px;
        font-weight: bold;
        font-size: 0.85rem;
        min-width: 40px;
        text-align: center;
    }
    
    .card-details {
        display: grid;
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .card-row {
        display: flex;
        align-items: flex-start;
        padding: 4px 0;
    }
    
    .card-label {
        color: #7f8c8d;
        font-size: 0.8rem;
        width: 70px;
        flex-shrink: 0;
    }
    
    .card-value {
        flex: 1;
        color: #333;
        font-size: 0.85rem;
        text-align: left;
        word-break: break-word;
        line-height: 1.4;
    }
    
    .card-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
        gap: 8px;
    }
    
    .card-certificate {
        color: #3498db;
        font-size: 0.8rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1;
        min-width: 0;
    }
    
    .card-buttons {
        display: flex;
        gap: 6px;
        flex-shrink: 0;
    }
    
    /* 移动端按钮样式 */
    .card-buttons .btn-small {
        padding: 6px 8px !important;
        font-size: 0.75rem !important;
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 模态框移动端优化 */
    .modal {
        width: 95%;
        max-width: 95%;
        max-height: 85vh;
        margin: 10px;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-direction: row;
        gap: 10px;
    }
    
    .modal-footer .btn {
        flex: 1;
    }
    
    /* 表单在移动端改为单列 */
    .modal-body form > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* 搜索统计 */
    .search-summary {
        padding: 10px;
        font-size: 0.85rem;
        margin-top: 10px;
    }
    
    /* 通知位置调整 */
    .notification {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    /* 底部调整 */
    footer {
        font-size: 0.8rem;
        padding: 12px 0;
        margin-top: 20px;
    }
}

/* 小屏幕手机特别优化 */
@media (max-width: 480px) {
    .query-panel {
        gap: 8px;
    }
    
    .button-column {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    h1 {
        font-size: 1.1rem;
    }
    
    .modal {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .mobile-data-card {
        padding: 10px;
    }
    
    .card-title {
        font-size: 0.95rem;
    }
    
    .card-label {
        width: 60px;
    }
    
    .card-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .card-buttons .btn-small {
        width: 100%;
        justify-content: center;
    }
    
    /* 登录表单调整 */
    .login-box h2 {
        font-size: 1.3rem;
    }
}

/* 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .query-panel {
        width: 280px;
    }
    
    .search-button-container {
        width: 350px;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn, 
    .suggestion-item,
    .action-buttons button,
    .card-buttons button {
        min-height: 44px !important; /* 触摸友好尺寸 */
        min-width: 44px !important;
    }
    
    input, 
    select, 
    textarea {
        font-size: 16px !important; /* 防止iOS自动缩放 */
    }
    
    .modal-close {
        min-width: 44px;
        min-height: 44px;
    }
}

/* 移动端标题栏调整 */
@media (max-width: 768px) {
    /* 头部调整 */
    header {
        padding: 10px 15px !important; /* 增加左右内边距 */
        margin-bottom: 15px;
        background-color: #2c3e50;
    }
    
    .container {
        padding: 0 !important; /* 移除容器内边距，让header-content控制 */
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch; /* 改为拉伸以适应宽度 */
        gap: 12px;
        text-align: center;
        padding: 0 8px; /* 增加内边距，让内容离边界远一点 */
    }
    
    /* 加大标题大小 */
    h1 {
        font-size: 1.8rem !important;
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 8px 0;
        margin: 0;
        line-height: 1.3;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    h1 i {
        font-size: 1.6rem !important;
        margin-right: 8px;
    }
    
    /* 用户信息区域调整 */
    .user-info {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 5px;
        padding: 0 5px; /* 增加内边距，让按钮离边界更远 */
        gap: 10px; /* 按钮之间的间距 */
    }
    
    /* 身份胶囊样式调整 */
    .user-type-badge {
        padding: 8px 12px !important; /* 增加内边距，让胶囊更大一点 */
        font-size: 0.9rem !important;
        border-radius: 20px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0; /* 防止胶囊被压缩 */
        white-space: nowrap;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-left: 0; /* 确保没有左边距 */
    }
    
    /* 退出登录按钮调整 */
    .logout-btn {
        padding: 8px 15px !important; /* 增加内边距 */
        font-size: 0.9rem !important;
        border-radius: 8px !important;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0; /* 防止按钮被压缩 */
        white-space: nowrap;
        border: 1px solid rgba(255, 255, 255, 0.3);
        background-color: rgba(255, 255, 255, 0.15) !important;
        transition: all 0.3s ease;
        margin-right: 0; /* 确保没有右边距 */
    }
    
    .logout-btn:hover {
        background-color: rgba(255, 255, 255, 0.25) !important;
        transform: translateY(-1px);
    }
    
    .logout-btn:active {
        transform: translateY(0);
    }
    
    /* 按钮图标调整 */
    .logout-btn i {
        margin-right: 6px;
        font-size: 0.9rem;
    }
    
    /* 胶囊颜色调整 */
    .admin-badge {
        background-color: #e74c3c !important;
        color: white !important;
        font-weight: 600;
    }
    
    .user-badge {
        background-color: #3498db !important;
        color: white !important;
        font-weight: 600;
    }
}

/* 移动端按钮布局 */
@media (max-width: 768px) {
    .search-button-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }
    
    .button-column-left,
    .button-column-right {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-text {
        display: inline;
    }
    
    /* 超小屏幕调整 */
    @media (max-width: 400px) {
        .btn-text {
            font-size: 0.75rem;
        }
    }
}

/* 移动端卡片禁用按钮样式 */
.card-buttons .btn.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #f5f5f5 !important;
    border-color: #ddd !important;
    color: #999 !important;
    pointer-events: none !important;
}

/* 移动端卡片证书区域样式优化 */
.card-certificate {
    display: flex;
    align-items: center;
    color: #3498db;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    cursor: default; /* 默认不显示手型光标 */
}

.card-certificate .certificate-text {
    cursor: pointer;
    transition: color 0.2s;
}

.card-certificate .certificate-text:hover {
    color: #2980b9;
}

/* 证书文字悬停效果 */
.certificate-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 30px);
}

/* 移动端玻璃组成样式 */
.glass-composition-mobile {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    line-height: 1.4;
    word-break: break-word;
    cursor: pointer;
    transition: background-color 0.2s;
}

.glass-composition-mobile:hover {
    background-color: #eef2f7;
}

/* 移动端卡片动作区域优化 */
.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    gap: 8px;
}

/* 移动端按钮组样式 */
.card-buttons {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* 移动端按钮样式 */
.card-buttons .btn-small {
    padding: 6px !important;
    font-size: 0.75rem !important;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 查看详情按钮样式 */
.card-buttons .btn-info {
    background-color: #3498db !important;
    border-color: #2980b9 !important;
}

.card-buttons .btn-info:hover {
    background-color: #2980b9 !important;
}

/* 编辑按钮样式 */
.card-buttons .btn:not(.btn-info):not(.btn-danger):not(.disabled) {
    background-color: #e3f2fd !important;
    border-color: #bbdefb !important;
    color: #1976d2 !important;
}

.card-buttons .btn:not(.btn-info):not(.btn-danger):not(.disabled):hover {
    background-color: #bbdefb !important;
}

/* 删除按钮样式 */
.card-buttons .btn-danger:not(.disabled) {
    background-color: #ffebee !important;
    border-color: #ffcdd2 !important;
    color: #d32f2f !important;
}

.card-buttons .btn-danger:not(.disabled):hover {
    background-color: #ffcdd2 !important;
}

/* 移动端卡片悬停效果 */
.mobile-data-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.mobile-data-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 小屏幕手机特别优化 */
@media (max-width: 480px) {
    .card-buttons {
        gap: 4px;
    }
    
    .card-buttons .btn-small {
        min-width: 32px;
        min-height: 32px;
        padding: 4px !important;
    }
    
    .card-certificate {
        font-size: 0.75rem;
    }
    
    .certificate-text {
        max-width: calc(100% - 25px);
    }
}

/* 排序相关样式 */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable-header:hover {
    background-color: #e8eff7;
}

.sortable-header.sorted {
    background-color: #e0e8f4;
}

.sort-icons {
    margin-left: 5px;
    display: inline-flex;
    flex-direction: column;
    vertical-align: middle;
    position: relative;
    width: 12px;
    height: 20px;
}

.sort-icons i {
    position: absolute;
    font-size: 0.8em;
    line-height: 1;
}

.sort-asc {
    top: 0;
}

.sort-desc {
    bottom: 0;
}

.sort-default {
    opacity: 0.3;
}

.sortable-header.sort-asc .sort-asc,
.sortable-header.sort-desc .sort-desc {
    display: inline !important;
    opacity: 1;
    color: #4a6fa5;
}

.sortable-header.sort-asc .sort-default,
.sortable-header.sort-desc .sort-default {
    display: none !important;
}

/* 文件选择器样式 */
input[type="file"] {
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.3s;
}

input[type="file"]:hover {
    border-color: #4a6fa5;
}

input[type="file"]:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.25);
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 40px;
    color: #7f8c8d;
    font-size: 0.9rem;
    padding: 20px 0;
    border-top: 1px solid #e0e6f0;
}

/* 导出JSON按钮 - 紫色，数据输出 */
#downloadJsonBtn {
    background-color: #8e44ad;
    border-color: #7d3c98;
}

/* 导出Excel按钮  */
#downloadExcelBtn {
    background-color: #8e44ad;
    border-color: #7d3c98;
}

/* 分页控件样式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    margin-top: 20px;
    background-color: #f8f9fa;
    border-radius: 0 0 6px 6px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-info select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-info {
    padding: 5px 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-small {
    padding: 5px 10px !important;
    font-size: 0.9rem !important;
    min-width: 36px !important;
    min-height: 36px !important;
}

/* 移动端分页样式 */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .pagination-info, .pagination-buttons {
        width: 100%;
        justify-content: center;
    }
}