/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f4f7fa;
}
.red {
	color: red;
}
.green {
	color: green;
}

a {
    text-decoration: none;
}

/* 登录样式 */
	.login-container {
		background-color: #fff;
		padding: 20px;
		border-radius: 5px;
		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
		width: 350px;
	}

	.login-container h2 {
		text-align: center;
	}

	.error {
		color: red;
		text-align: center;
		margin-bottom: 10px;
	}

	/* 媒体查询，适用于手机端 */
	@media (max-width: 768px) {
			.login-container {
				background-color: #f4f7fa;
				box-shadow: 0 0 0px rgba(0, 0, 0, 0.1);
			}
	}

/* 头部样式 */
	header {
		background-color: #1b85cb;
		color: white;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 10px 20px;
		box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	}

	.logo {
		font-size: 24px;
		font-weight: bold;
		letter-spacing: 1px;
	}

	.menu-toggle {
		display: none;
		font-size: 24px;
		cursor: pointer;
	}

	.nav-menu ul {
		list-style-type: none;
		margin: 0;
		padding: 0;
		display: flex;
	}

	.nav-menu ul li {
		margin-left: 20px;
	}

	.nav-menu ul li a {
		color: white;
		text-decoration: none;
		transition: color 0.3s ease;
		position: relative;
	}

	.nav-menu ul li a::after {
		content: '';
		position: absolute;
		width: 0;
		height: 2px;
		bottom: -5px;
		left: 0;
		background-color: #3498db;
		transition: width 0.3s ease;
	}

	/* .nav-menu ul li a:hover {
		color: #3498db;
	} */

	.nav-menu ul li a:hover::after {
		width: 100%;
	}

	/* 媒体查询，适用于手机端 */
	@media (max-width: 768px) {
		.menu-toggle {
			display: block;
		}

		.nav-menu {
			display: none;
		}

		.nav-menu.active {
			display: block;
			position: absolute;
			top: 50px;
			left: 0;
			width: 100%;
			background-color: #2899e3;
			box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
		}

		.nav-menu ul {
			flex-direction: column;
		}

		.nav-menu ul li {
			margin: 0;
			padding: 15px 20px;
			border-bottom: 1px solid rgba(255, 255, 255, 0.1);
		}
	}

/* 主内容区域样式 */
main {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* 搜索容器样式 */
.search-container {
    margin-bottom: 20px;
}

.search-container input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 70%;
    box-sizing: border-box;
}

.search-container button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-container button:hover {
    background-color: #2980b9;
}



/* 客户列表样式 */

	.kehu-container {
		margin: 0 auto;
		box-sizing: border-box;
	}

	@media (max-width: 1200px) {
		.kehu-container {
			width: 100%;
			padding: 0 20px;
		}
	}

	.company-list {
		width: 100%;
	}
  .company-list table {
        width: 100%; /* 指定表格宽度，可根据实际情况调整 */
        border-collapse: collapse;
        margin: 0 auto; /* 表格水平居中 */
		margin-top: 30px;
    }
  .company-list th,
  .company-list td {
		text-align: center;
        padding: 8px 4px; 
        border: 1px solid #ccc;
    }
	
	.company-list th {
		background-color: #f2f2f2;
	}

	.company-list tr:hover {
		background-color: #f5f5f5;
	}

	/* 单独指定每列宽度 */
	.company-list th:nth-child(1),
	.company-list td:nth-child(1) {
		width: 20px; /* ID 列宽度 */
	}
	.company-list th:nth-child(2),
	.company-list td:nth-child(2) {
		width: 300px; /* 企业名称列宽度，可根据需求调整 */
	}
	.company-list th:nth-child(3),
	.company-list td:nth-child(3) {
		width: 100px; /* 联系人列宽度 */
	}
	.company-list th:nth-child(4),
	.company-list td:nth-child(4) {
		width: 120px; /* 联系电话列宽度 */
	}
	.company-list th:nth-child(5),
	.company-list td:nth-child(5) {
		width: 50px; /* 客户等级列宽度 */
	}
	.company-list th:nth-child(6),
	.company-list td:nth-child(6) {
		width: 80px; /* 是否添加微信列宽度 */
	}
	.company-list th:nth-child(7),
	.company-list td:nth-child(7) {
		width: 80px; /* 是否约见列宽度 */
	}
	.company-list th:nth-child(8),
	.company-list td:nth-child(8) {
		width: 150px; /* 公司位置列宽度 */
	}
	.company-list th:nth-child(9),
	.company-list td:nth-child(9) {
		width: 80px; /* 历史跟进列宽度 */
	}
	.company-list th:nth-child(10),
	.company-list td:nth-child(10) {
		width: 120px; /* 录入时间列宽度 */
	}
	.company-list th:nth-child(11),
	.company-list td:nth-child(11) {
		width: 60px; /* 所属用户列宽度 */
	}
	.company-list th:nth-child(12),
	.company-list td:nth-child(12) {
		width: 50px; /* 修改列宽度 */
	}

	.company-list td:nth-child(2),
	.company-list td:nth-child(8){
		text-align: left;
		padding-left: 12px;
	}	

	/* 卡片样式 */
	.company-card {
		border: 1px solid #ddd;
		border-radius: 4px;
		padding: 20px;
		margin-bottom: 20px;
		box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
		
		display: flex;
		flex-wrap: wrap; 
	}

	.itema {
		/* 每个子元素宽度为父容器宽度的 100% */
		width: 100%; 
	}

	.itemb {
		/* 每个子元素宽度为父容器宽度的 50% */
		width: 50%; 
	}
	
	.company-card h3 {
		margin-top: 0;
		margin-bottom: 15px;
		color: #333;
	}

	.company-card p {
		margin: 8px 0;
		color: #666;
	}

	.card-footer {
		width: 100%;
		display: flex;
		align-items: center;
		margin-top: 10px;
	}

	.card-footer span {
		width: 70%; 
		font-size: 14px;
		color: #999;
		/* 文字不换行 */
		white-space: nowrap; 
		/* 隐藏超出部分 */
		overflow: hidden; 
		/* 超出部分用省略号表示 */
		text-overflow: ellipsis; 
	}

	.card-footer span:nth-child(2) {
		width: 30%; 
		text-align: right;
	}

	.card-footer a {
		color: #3498db;
		text-decoration: none;
		transition: color 0.3s ease;
	}

	.card-footer a:hover {
		text-decoration: underline;
		color: #2980b9;
	}


	/* 桌面端隐藏卡片，显示表格 */
	@media (min-width: 769px) {
		.company-card {
			display: none;
		}

		.company-list table {
			display: table;
		}
	}

	/* 手机端隐藏表格，显示卡片 */
	@media (max-width: 768px) {
		.company-list table {
			display: none;
		}

		.company-card {
			/* display: block; */
			margin-top: 10px;
		}
	}


/* 团队列表表格样式 */
	.team-list {
		width: 100%;
		max-width: 1200px;
		margin: 20px auto;
		border-collapse: collapse;
	}

	.team-list th,
	.team-list td {
		text-align: center;
		padding: 10px;
		border: 1px solid #ccc;
	}

	.team-list th {
		background-color: #f0f0f0;
	}

/* 表单样式 */
.form-container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    width: 100%;
    text-align: left;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

/* 只给下拉框添加箭头样式 */
.form-input.select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="50"><polygon points="0,0 100,0 50,50" style="fill:%23666666;"/></svg>');
    background-size: 10px;
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center; /* 调整箭头位置，往左移动 */
}

.form-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.form-checkbox {
    margin-top: 8px;
    margin-right: 0;
    align-self: flex-start;
}

.form-button {
    padding: 12px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
}

.form-button:hover {
    background-color: #2980b9;
}

.form-button:active {
    transform: scale(0.98);
}

/* 媒体查询，适用于手机端 */
@media (max-width: 768px) {
    .form-container {
        width: 98%;
        max-width: none;
        padding: 15px;
    }

    main {
        padding: 15px;
    }
}

/* 页脚样式 */
footer {
    background-color: #1b85cb;
    color: white;
    text-align: center;
}

/* 分页样式 */
.page-jump-form .form-input {
	margin-left: 10px;
}


/* .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.pagination a {
    color: #3498db;
    text-decoration: none;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 8px;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background-color: #f5f5f5;
}

.pagination .active {
    background-color: #3498db;
    color: white;
}

.page-jump-form .form-input {
	height: 40px;
} */

/* 搜索框 */
	.search-and-add-wrapper {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 100%; /* 让父容器宽度和列表一致 */
	}

	.search-wrapper {
		flex: 1;
	}

	.add-company-wrapper {
		display: flex;
		justify-content: flex-end;
	}

	.search-form {
		display: flex;
		align-items: center;
	}
	.search-form input[type="text"] {
		width: 300px; /* 可根据实际情况调整输入框宽度 */
		margin-right: 10px;
	}
	/* 条件筛选框 */
	.search-form input[type="date"] {
		width: 300px; /* 可根据实际情况调整输入框宽度 */
		margin-right: 10px;
	}
	.search-form select {
		width: 300px; /* 可根据实际情况调整输入框宽度 */
		margin-right: 10px;
	}
	
	.search-form button {
		width: auto;
	}

	.add-company-button {
		background-color: #10a910;
	}

	.add-company-button:hover {
		background-color: #0ba10b;
	}

	@media (max-width: 768px) {
		.search-form input[type="text"] {
			width: 170px; /* 可根据实际情况调整输入框宽度 */
			margin-right: 5px;
		}
		
		/* 条件筛选框 */
		.search-form input[type="date"] {
			display: none; /* 手机下不显示 */
		}
		.search-form select {
			display: none; /* 手机下不显示 */
		}
		
	}





.limit-and-pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px; /* 把分页放到列表下方 */
}

.limit-form {
    display: flex;
    align-items: center;
}

.limit-form label {
    margin-right: 5px;
}

.pagination {
    display: flex;
    align-items: center;
}

.pagination a {
    margin: 0 5px;
}

.mobile-pagination-form {
    display: flex;
    align-items: center;
}

.mobile-pagination-form label {
    margin-right: 5px;
}

/* 确保页码和每页记录数垂直居中 */
.limit-form .form-input,
.pagination a,
.mobile-pagination-form .form-input {
    display: flex;
    align-items: center;
    height: 36px; /* 根据实际按钮高度调整 */
}

/*添加跟进记录*/


.add-record-form-container {
    width: 600px;
    margin: 20px 0;
    box-sizing: border-box;
}

@media only screen and (max-width: 768px) {
    .add-record-form-container {
        width: 100%;
    }
}

.add-record-form-container .form-input {
    width: 100%;
    box-sizing: border-box;
}

.back-button {
    background-color: #ccc;
    color: #333;
    margin-bottom: 20px;
    display: inline-block;
}

.action-button {
    width: 100%;
    margin-top: 10px;
    box-sizing: border-box;
}

.add-record-form-container .button-row {
    display: flex;
    flex-wrap: nowrap;
    margin-top: 10px;
    gap: 10px; /* 添加按钮之间的间距 */
}

.add-record-form-container .action-button {
    width: auto; /* 让按钮宽度自适应内容 */
    margin-right: 0; /* 移除之前的右边距 */
}

.record-list {
    list-style-type: disc;
    padding: 0;
    width: 100%;
}

.record-list li {
    border-bottom: 1px solid #ccc;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.record-content {
    margin-bottom: 10px;
}

.record-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.record-info {
    text-align: left;
	color: #888888;
}

.edit-record-textarea {
    width: 100%; /* 让文本框宽度占满父容器 */
    max-width: 400px; /* 设置最大宽度，避免在大屏幕上太宽 */
}

.edit-button {
    width: auto;
    margin-left: auto;
    display: inline-block;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: nowrap; /* 防止按钮换行 */
}

.button-group .form-button {
	text-align: center;
    white-space: nowrap; /* 防止按钮文字换行 */
}