/* 全局样式 */
:root {
    --primary-color: #4e73df;
    --secondary-color: #1cc88a;
    --background-color: #f0f2f5;
    --card-color: #ffffff;
    --text-color: #5a5c69;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-radius: 10px;
    --neumorphic-shadow: 10px 10px 20px #d1d9e6, -10px -10px 20px #ffffff;
    --neumorphic-shadow-hover: 15px 15px 30px #d1d9e6, -15px -15px 30px #ffffff;
    --neumorphic-shadow-inset: inset 5px 5px 10px #e6e6e6, inset -5px -5px 10px #ffffff;
    --neumorphic-shadow-small: 5px 5px 10px #d1d9e6, -5px -5px 10px #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 新拟态风格卡片 */
.card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow);
    margin: 5px 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--neumorphic-shadow-hover);
}

.card-inner {
    padding: 15px;
}

/* 仪表盘样式 */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard .card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
}

.dashboard .card p {
    margin-bottom: 20px;
    color: #858796;
}

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

header h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
    box-shadow: var(--neumorphic-shadow-small);
}

.btn:hover {
    background-color: #3a5ccc;
    box-shadow: 3px 3px 5px #d1d9e6, -3px -3px 5px #ffffff;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 信息网格样式 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-item {
    padding: 15px;
    background-color: #f8f9fc;
    border-radius: 15px;
    box-shadow: var(--neumorphic-shadow-inset);
}

.info-label {
    font-weight: 600;
    color: var(--primary-color);
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding: 20px 0;
    margin-top: 20px;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    height: 100%;
    width: 4px;
    background: #e3e6f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    z-index: 1;
    box-shadow: var(--neumorphic-shadow-small);
}

.timeline-badge.rework {
    background-color: #e74a3b;
}

.timeline-content {
    margin-left: 60px;
    padding: 15px;
    background-color: #f8f9fc;
    border-radius: 15px;
    box-shadow: var(--neumorphic-shadow-small);
}

.timeline-content h4 {
    margin-top: 0;
    color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-success {
    background-color: var(--secondary-color);
}

.btn-danger {
    background-color: #e74a3b;
}

/* 仪表盘样式 */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard .card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
}

.dashboard .card p {
    margin-bottom: 20px;
    color: #858796;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d1d3e2;
    border-radius: var(--border-radius);
    background-color: #f8f9fc;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--neumorphic-shadow-small);
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e3e6f0;
}

table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background-color: #f8f9fc;
}

/* 信息网格样式 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-item {
    padding: 15px;
    background-color: #f8f9fc;
    border-radius: 15px;
    box-shadow: var(--neumorphic-shadow-inset);
}

.info-label {
    font-weight: 600;
    color: var(--primary-color);
}


/* 警告提示 */
.alert {
    display: block; /* 确保作为块级元素显示 */
    max-width: 600px; /* 设置最大宽度，防止过宽 */
    margin-left: auto; /* 水平居中 */
    margin-right: auto; /* 水平居中 */
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    border-left: 4px solid transparent;
}

.alert-danger {
    background-color: #fff5f5;
    border-left-color: #e74a3b;
    color: #e74a3b;
}

.alert-success {
    background-color: #f0fff4;
    border-left-color: #1cc88a;
    color: #1cc88a;
}





/* 登录页面样式 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* 扫码页面样式 */
.scan-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.scan-tabs {
    display: flex;
    width: 100%;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow-small);
    overflow: hidden;
}

.scan-tab-btn {
    flex: 1;
    padding: 12px 15px;
    background-color: #f8f9fc;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.scan-tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--neumorphic-shadow-inset);
}

.scan-area {
    width: 100%;
    margin: 20px 0;
    text-align: center;
}

.scan-tab-content {
    display: none;
    width: 100%;
}

.scan-tab-content.active {
    display: block;
}

.qr-reader {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

#video {
    width: 100%;
    height: auto;
    display: block;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.scan-area-marker {
    border: 3px solid yellow;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 30%;
    z-index: 10;
}

#scan-result-message {
    margin-top: 10px;
}

.camera-controls {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.camera-controls button {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.camera-controls button:hover {
    background-color: #e0e0e0;
}

.scan-result {
    margin-top: 20px;
    width: 100%;
}

/* 卡片内标题样式 */
.card h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
}

.card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
}

/* 表格响应式优化 */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    table {
        font-size: 0.9rem;
    }
    
    /* 紧凑型表格 */
    .table-compact th,
    .table-compact td {
        padding: 6px 4px;
    }
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    /* 已有的响应式代码 */
    header {
        flex-direction: column;
        text-align: center;
    }
    
    header h1 {
        margin-bottom: 15px;
        font-size: 1.2rem; /* 减小标题字体大小 */
    }
    
    /* 优化容器内边距 */
    .container {
        padding: 10px;
    }
    
    /* 优化卡片内边距 */
    .card-inner {
        padding: 10px;
    }
    
    /* 优化按钮大小和间距 */
    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    /* 优化表格显示 */
    .table-container {
        margin-top: 10px;
    }
    
    table th, table td {
        padding: 8px 6px;
        font-size: 0.9rem;
    }
    
    /* 优化表单元素 */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    /* 优化信息网格 */
    .info-grid {
        gap: 8px;
        margin-top: 10px;
    }
    
    .info-item {
        padding: 10px;
    }
    
    /* 优化时间线 */
    .timeline:before {
        left: 15px;
    }
    
    .timeline-badge {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 0.8rem;
    }
    
    .timeline-content {
        margin-left: 40px;
        padding: 10px;
    }
    
    /* 优化统计网格 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-item {
        padding: 10px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* 优化操作按钮组 */
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .action-buttons .btn {
        margin-bottom: 5px;
    }
}

/* 添加更小屏幕的优化 */
@media (max-width: 480px) {
    .dashboard {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .user-info {
        gap: 5px;
    }
    
    .user-info span {
        font-size: 0.8rem;
    }
    
    /* 优化模态框 */
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 15px;
    }
    
    /* 优化扫码区域 */
    .qr-reader {
        height: 200px;
    }
    
    /* 优化表格显示 */
    table th, table td {
        padding: 6px 4px;
        font-size: 0.8rem;
    }
    
    /* 文本截断优化 */
    .text-truncate {
        max-width: 120px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    
    header h1 {
        margin-bottom: 15px;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
    }
    
    th, td {
        padding: 8px 10px;
    }
    
    .btn-sm {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-content {
        margin-left: 50px;
    }
    
    /* 扫码页面响应式样式 */
    .scan-container {
        max-width: 100%;
    }
    
    @media (max-width: 768px) {
        .scan-area {
            margin: 10px 0;
        }
        
        .qr-reader {
            height: auto;
            aspect-ratio: 1/1;
            max-height: 70vh;
        }
        
        .scan-area-marker {
            width: 70%;
            height: 25%;
        }
    }
    
    .scan-tabs {
        flex-direction: row;
    }
    
    .scan-tab-btn {
        padding: 10px;

/* 提取的内联样式 */
.text-center {
    text-align: center;
}

.hidden {
    display: none;
}

.text-truncate {
    display: inline-block;
    max-width: 200px;
    word-break: break-word;
    white-space: normal;
}
        font-size: 14px;
    }
    
    .qr-reader {
        height: 250px;
    }
}

/* 头部按钮组样式 */
.header-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .header-buttons {
        justify-content: center;
    }
}

/* 字体大小和行高优化 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        line-height: 1.4;
    }
    
    h1 {
        font-size: 1.4rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    p {
        margin-bottom: 0.8em;
    }
}

/* 触摸友好元素 */
@media (max-width: 768px) {
    /* 增大按钮点击区域 */
    .btn, button, a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 表单元素触摸友好 */
    input[type="checkbox"], input[type="radio"] {
        min-width: 20px;
        min-height: 20px;
    }
    
    /* 增大表单元素间距 */
    .form-group {
        margin-bottom: 15px;
    }
}

/* 登录页面优化 */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }
    
    .login-card {
        padding: 20px;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 10px;
        right: 10px;
    }
}