/* ERP H5 应用样式 */

/* ==================== 页面通用头部 ==================== */
.page-header {
    background-color: #fff;
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* ==================== 卡片 ==================== */
.card {
    background-color: #fff;
    border-radius: 8px;
    margin: 10px;
    padding: 15px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* ==================== 列表 ==================== */
.list {
    background-color: #fff;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #e5e5e5;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:active {
    background-color: #f5f5f5;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.list-item-desc {
    font-size: 12px;
    color: #999;
}

.list-item-arrow {
    color: #ccc;
    font-size: 12px;
}

/* ==================== 表单 ==================== */
.form {
    background-color: #fff;
}

.form-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #e5e5e5;
}

.form-label {
    width: 80px;
    font-size: 14px;
    color: #333;
}

.form-content {
    flex: 1;
}

.form-input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: #1890ff;
}

.form-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.form-select {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.btn-primary {
    background-color: #1890ff;
    color: #fff;
}

.btn-primary:active {
    background-color: #40a9ff;
}

.btn-default {
    background-color: #fff;
    color: #333;
    border: 1px solid #e5e5e5;
}

.btn-danger {
    background-color: #f56c6c;
    color: #fff;
}

.btn-block {
    display: flex;
    width: 100%;
    margin: 20px 15px;
}

/* ==================== 搜索栏 ==================== */
.search-bar {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #fff;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.search-input {
    flex: 1;
    height: 100%;
    border: none;
    background: none;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
}

.search-btn {
    margin-left: 10px;
    padding: 0 15px;
    height: 36px;
    background-color: #1890ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
}

/* ==================== 空状态 ==================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-text {
    font-size: 14px;
    color: #999;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background-color: #fff;
}

.pagination-btn {
    padding: 8px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    cursor: pointer;
}

.pagination-btn:active {
    background-color: #f5f5f5;
}

.pagination-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.pagination-info {
    margin: 0 15px;
    font-size: 14px;
    color: #666;
}

/* ==================== 筛选工具栏 ==================== */
.filter-toolbar {
    background-color: #fff;
    padding: 10px 15px;
    border-bottom: 1px solid #e5e5e5;
}

.filter-section {
    margin-bottom: 10px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-button {
    padding: 6px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    background-color: #fff;
    cursor: pointer;
}

.filter-button.active {
    border-color: #1890ff;
    color: #1890ff;
    background-color: #e6f7ff;
}

/* ==================== 徽章 ==================== */
.badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 12px;
    color: #fff;
    background-color: #f56c6c;
    text-align: center;
    line-height: 18px;
}

/* ==================== 标签 ==================== */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.tag-primary {
    color: #1890ff;
    background-color: #e6f7ff;
}

.tag-success {
    color: #67c23a;
    background-color: #f0f9eb;
}

.tag-warning {
    color: #e6a23c;
    background-color: #fdf6ec;
}

.tag-danger {
    color: #f56c6c;
    background-color: #fef0f0;
}

/* ==================== 表格 ==================== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    font-size: 14px;
}

.table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.table tr:active {
    background-color: #f5f5f5;
}

/* ==================== 加载更多 ==================== */
.load-more {
    text-align: center;
    padding: 15px;
    color: #999;
    font-size: 14px;
}

.load-more.loading::after {
    content: '加载中...';
}

/* ==================== 响应式 ==================== */
@media screen and (max-width: 375px) {
    html {
        font-size: 13px;
    }
    
    .card {
        margin: 8px;
        padding: 12px;
    }
    
    .form-item {
        padding: 10px 12px;
    }
    
    .btn {
        height: 40px;
        font-size: 15px;
    }
}

@media screen and (min-width: 768px) {
    html {
        font-size: 16px;
    }
    
    #page-container {
        max-width: 750px;
        margin: 0 auto;
    }
    
    #tabbar {
        max-width: 750px;
        left: 50%;
        transform: translateX(-50%);
    }
}
