* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.admin-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(352deg, #a4ea66 0%, #c5efab 100%);
    min-height: 100vh;
   
}

/* 前端查询页面样式 */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.t-header{width: 100%;padding: 30px 20px;background-image: url(../img/headbg.jpg);background-size: cover;}
.t-header h1{color: #fff;}
.t-header p{color: #fff;}

.subtitle{display: flex;margin-top: 10px;}
.t-icon{color: #fff;font-size: 15px;display: flex;margin-right: 30px;}
.t-icon img{width: 24px;height: 24px;margin-right: 5px;}

.header {
    background:#2cbb44;
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 16px;
    
}

.query-section {
    padding: 30px;
    background: #f8f9fa;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #2cbb44;
}

.input-group button {
    padding: 15px 30px;
    background: #2cbb44;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.input-group button:hover {
    background: #5568d3;
}

.scan-hint {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.result-container {
    background-color: #2cbb44;
}

.result-card {
      border-radius: 15px 15px 0px 0px;
    background-color: #fff;
    overflow: hidden;
}

.producttitle{color: #2cbb44;font-size: 20px;font-weight: bold;}

.result-header {
  
   
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-header h2 {
    font-size: 24px;
}

.code-badge {
    background: #2cbb44;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 16px;
	font-weight: bold;
	color: #fff;
}

.result-content {
    padding: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    padding: 15px;
    background: #f8f9fa;
    
   
}

.info-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.info-value {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.info-title{font-size: 20px;font-weight: bold;}

/* 查询提示信息样式 */
.query-notice {
    margin: 15px 0;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.query-notice-safe {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.query-notice-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
}

/* 地图展示区域 */
.map-section {
    padding: 20px;
    margin: 20px 0px;
    background: #f8f9fa;
    border-radius: 15px;
    
}

.map-section h2 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #2cbb44;
}

.map-description {
    color: #555;
    margin-bottom: 20px;
    font-size: 16px;
}

.map-wrapper {
    width: 100%;
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    background: #fff;
}

#mapContainer {
    width: 100%;
    height: 100%;
    border: none;
}

.result-footer {
    padding:20px 20px 40px 20px;
   
   
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-hr{padding:0px 20px;display: flex;}
.result-hr i{width: 100%;height: 1px;background-color: #e6e6e6;display: inline-block;}

.query-stats {
    display: flex;
	flex-direction: column;
	align-items: center;
    gap: 10px;
   align-items: center;
	flex-direction: column;
    
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    color: #666;
    font-size: 16px;
}

.stat-value {
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

.timestamp {
    color: #666;
    font-size: 14px;
}

.error-container {
    padding: 30px;
}

.error-message {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.error-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.error-message p {
    color: #856404;
    font-size: 16px;
}

.footer {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
}

.admin-link {
    color: #2cbb44;
    text-decoration: none;
    font-size: 14px;
}

.admin-link:hover {
    text-decoration: underline;
}

/* 后台管理页面样式 */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.admin-header {
    background:#2cbb44;
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 28px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.admin-content {
    padding: 30px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #2cbb44;
}

.tab-btn.active {
    color: #2cbb44;
    border-bottom-color: #2cbb44;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.products-header {
    flex-wrap: wrap;
    gap: 10px;
}

.product-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.section-header h2 {
    font-size: 24px;
    color: #333;
}

.btn-primary {
    padding: 10px 20px;
    background: #2cbb44;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 6px 12px;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
}

.btn-small:hover {
    background: #138496;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.fields-list {
    display: grid;
    gap: 15px;
}

.field-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #2cbb44;
}

.field-info {
    flex: 1;
}

.field-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.field-meta {
    font-size: 12px;
    color: #666;
}

.field-actions {
    display: flex;
    gap: 10px;
}

.batch-form {
    max-width: 600px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2cbb44;
}

.form-group textarea {
    resize: vertical;
    font-family: monospace;
}

.input-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #777;
    line-height: 1.4;
}

.readonly-field {
    background: #f2f2f2;
    color: #666;
    cursor: not-allowed;
}

.required {
    color: #dc3545;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    color: #333;
}

.close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.batch-download-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.qrcode-preview {
    text-align: center;
    padding: 20px;
}

.qrcode-preview canvas {
    margin: 20px auto;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    background: white;
}

.qrcode-preview p {
    margin: 15px 0;
    color: #666;
    font-size: 14px;
    word-break: break-all;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 24px;
    }
    
    .input-group {
        flex-direction: column;
    }

    /* 移动端隐藏查询编码模块，仅保留扫码提示 */
    .query-section {
        display: none;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
}

