/* 药品追溯码管理系统 - 自定义样式 */

body {
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* 卡片样式优化 */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 统计卡片 */
.card .display-4 {
    font-size: 2.5rem;
    font-weight: 600;
}

/* 表格样式 */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}

/* 代码样式 */
code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* 图片预览 */
.card-img-top {
    border-bottom: 1px solid #dee2e6;
}

/* 导航栏 */
.navbar-brand {
    font-size: 1.25rem;
}

/* 按钮样式 */
.btn {
    border-radius: 5px;
}

/* 表单样式 */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* 警告框 */
.alert {
    border-radius: 5px;
}

/* 粘性表头 */
.sticky-top {
    z-index: 100;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .card .display-4 {
        font-size: 1.75rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* 文件列表 */
#fileList ul {
    padding-left: 1.2rem;
}

#fileList li {
    margin-bottom: 2px;
}

/* 页脚 */
footer {
    border-top: 1px solid #dee2e6;
}

/* ===== 药品搜索页样式 ===== */

/* 下拉建议 */
#suggestionsDropdown .list-group-item {
    cursor: pointer;
    border-left: none;
    border-right: none;
    padding: 10px 16px;
    transition: background-color 0.15s;
}
#suggestionsDropdown .list-group-item:first-child {
    border-top: none;
}
#suggestionsDropdown .list-group-item:hover {
    background-color: #e9ecef;
}
#suggestionsDropdown .list-group-item.active {
    background-color: #0d6efd;
    color: #fff;
}

/* 搜索结果卡片 */
.drug-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}
.drug-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.drug-card .drug-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 4px;
}
.drug-card .placeholder-image {
    width: 100px;
    height: 100px;
    background: #f0f0f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 2rem;
}

/* 编辑模态框 - 图片网格 */
.edit-image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.edit-image-item {
    width: 120px;
    height: 120px;
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}
.edit-image-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f9fa;
}
.edit-image-item .delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 24px;
    height: 24px;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}
.edit-image-item .delete-btn:hover {
    opacity: 1;
}

/* 加载动画 */
#searchSpinner {
    display: none;
}
