/* 全局样式重置+基础样式 - 核心适配所有分辨率 优先级最高 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-width: auto !important;
    overflow-x: hidden !important;
}
#login-view {
    position: fixed !important;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100vh !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background-color: #f0f2f5 !important;
    margin: 0 !important;
    padding: 0 !important;
}
#login-view .card {
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    float: none !important;
}
#login-view button {
    width: 100% !important;
    height: 38px !important;
    line-height: 38px !important;
    padding: 0 !important;
    margin: 10px 0 0 0 !important;
    text-align: center !important;
    border-radius: 6px !important;
    background-color: #3498db !important;
}
#login-view button:hover {
    background-color: #2980b9 !important;
}
h1, h2, h3 {
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 18px;
    font-weight: normal;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 13px;
}
/* 输入框/文本域 全局样式 - 统一高度+完美适配 */
input, textarea {
    width: 100%;
    padding: 8px;
	border: 1px solid #ccc;
	border-radius: 8px;
	font-size: 13px;
	height: 34px; /* 和按钮统一高度，全页面表单控件对齐 */
	outline: none;
}
input:focus, textarea:focus {
	border-color: #3498db;
}
textarea {
	min-height: 80px;
	resize: vertical;
	height: auto; /* 文本域取消固定高度，自适应内容 */
}
/* select下拉框 重点优化 - 高度对齐+20%宽度生效+适配所有分辨率+无挤压 */
/* 筛选下拉框 自适应宽度+选项完整显示+小屏不挤压 */
select {
	width: auto !important; /* 覆盖原20%固定宽度，跟随文本自适应 */
	min-width: 150px !important; /* 小屏兜底，不被压缩 */
	max-width: 300px !important; /* 大屏不拉伸太宽 */
	padding: 8px 24px 8px 8px !important; /* 右侧留空间给下拉箭头 */
	position: relative;
	border-radius: 10px;
	border:1px solid #ccc;
	height:34px;
	outline:none;
}
/* 解决原生下拉箭头被遮挡问题 */
select::after {
	content: "▼";
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: #666;
	font-size: 10px;
}
/* 全局按钮样式 - 保留原有逻辑+自适应宽度+统一高度+鼠标悬浮变色+点击变色 核心修改 */
button:not(.btn-logout):not(.btn-secondary):not(.btn-danger):not(.btn-save-config) {
	width: auto;
	border-radius: 8px;
	background-color: #3498db;
	color: white;
	border: none;
	cursor: pointer;
	font-size: 13px;
	padding: 8px 20px;
	height: 34px; /* 统一高度，全页面按钮对齐 */
	white-space: nowrap; /* 按钮文字不换行 */
	transition: background-color .2s ease;
}
button:not(.btn-logout):hover {
	background-color: #2980b9; /* 鼠标悬浮 变深蓝 */
}
button:not(.btn-logout):active {
	background-color: #196799; /* 鼠标点击 变更深的蓝色 */
}

/* 主体布局 核心响应式 - 侧边栏+内容区 完美适配所有分辨率 */
.app-container {
	width:100%;
	display: flex;
	min-height: 100vh;
}
/* 侧边栏 响应式优化 - 宽度自适应+小屏友好+动画流畅 */
.sidebar {
	width: 250px;
	flex-shrink: 0; /* 侧边栏永不被压缩 */
	background-color: #2c3e50;
	color: white;
	padding: 20px 0;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	visibility: hidden;
	opacity: 0;
}
.sidebar:not(.hidden) {
	visibility: visible;
	opacity: 1;
	width: 230px; /* 优化宽度，小屏更友好 */
}
.sidebar-header {
	padding: 0 20px 20px;
	border-bottom: 1px solid #34495e;
}
.sidebar-header h2 {
	color: #ecf0f1;
	margin-top: 0;
	text-align: left;
	font-size: 18px;
	border: none;
}
.nav-menu {
	list-style: none;
	padding: 0;
	margin: 20px 0;
	flex-grow: 1;
}
.nav-menu li a {
	display: block;
	padding: 10px 20px;
	color: #bdc3c7;
	text-decoration: none;
	transition: background-color 0.3s, color 0.3s;
	border-left: 3px solid transparent;
	font-size: 13px;
	white-space: nowrap; /* 菜单文字不换行 */
}
.nav-menu li a:hover, .nav-menu li a.active {
	background-color: #34495e;
	color: #ffffff;
	border-left-color: #3498db;
}
.nav-menu li a i {
	margin-right: 10px;
	width: 16px;
	text-align: center;
}
.sidebar-footer {
	padding: 20px;
	border-top: 1px solid #34495e;
	text-align: center;
}
.btn-logout {
	background-color: #e74c3c;
	color: white;
	border: none;
	padding: 12px 15px;
	border-radius: 4px;
	cursor: pointer;
	width: 100%;
	transition: background-color 0.3s;
	font-size: 13px;
	margin-bottom: 10px;
}
.btn-logout:hover { background-color: #c0392b; }
.btn-logout:active { background-color: #a82f22; }

/* 主内容区 核心适配 - 大屏不拉伸，小屏有边距，永不溢出 */
.content {
	flex-grow: 1;
	padding: 20px;
	overflow-y: auto;
	position: relative;
	max-width: calc(100% - 180px); /* 适配侧边栏宽度，无空白 */
}
.container {
	width: 100%;
	max-width: 1920px; /* 大屏最大宽度限制，内容不拉伸 */
	margin: 0 auto;
}

/* 卡片样式 优化适配 */
.card {
	background: white;
	padding: 15px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	margin-bottom: 12px;
	width: 100%;
}

/* 登录页样式 保留+优化 */
#login-view {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #ffffff;
	transition: all 0.3s ease;
	z-index: 10;
}
#login-view .card {
	width: 100%;
	max-width: 360px;
	padding: 40px;
	border: 2px solid #e5e5e5;
	box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}
#login-view h2 {
	text-align: center;
	border: none;
	padding: 0;
	margin-bottom: 30px;
	font-size: 24px;
	font-weight: 300;
	color: #333;
}
#login-view .form-group {
	margin-bottom: 20px;
}
#login-view input {
	border: none;
	border-bottom: 1px solid #ddd;
	border-radius: 5px;
	padding: 12px 5px;
	background-color: transparent;
}
#login-view input:focus {
	border-bottom-color: #333;
	box-shadow: none;
}
#login-view button {
	width: 100%;
	padding: 12px;
	margin-top: 10px;
	background-color: #3498db;
	border-radius: 10px;
	font-weight: 400;
	letter-spacing: 1px;
	transition: background-color .2s ease;
}
#login-view button:hover {
	background-color: #2980b9;
}
#login-view button:active {
	background-color: #196799;
}

/* 隐藏类 最高优先级 */
.hidden { display: none !important; }

/* 表单组 完美适配 - flex布局+间距优化+所有分辨率对齐 */
.form-group {
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	gap: 10px; /* 替代margin，更灵活 */
	flex-wrap: wrap; /* 小屏自动换行，内容不挤 */
}

/* 弹窗模态框 核心优化 - 适配所有分辨率居中+永不溢出+小屏缩小 */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px; /* 小屏留边距，弹窗不贴边 */
}
.modal-mask {
	position: absolute;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	cursor: pointer;
}
.modal-card {
	position: relative;
	width: 100%;
	max-width: 500px; /* 弹窗最大宽度，大屏不拉伸 */
	min-width: 320px; /* 小屏最小宽度，内容不变形 */
	background-color: #fff;
	border-radius: 8px;
	padding: 20px;
	box-sizing: border-box;
	box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* 错误提示 */
.error {
	color: red;
	text-align: center;
	margin: 8px 0;
	font-size: 13px;
}

/* 表格容器+表格 重中之重优化 - 适配所有分辨率+表头粘性兼容+不溢出+滚动流畅 */
.table-container {
	width: 100%;
	height: calc(65vh - 20px);
	max-height: 700px; /* 大屏表格高度限制，不拉伸 */
	min-height: 300px; /* 小屏表格最小高度，内容不挤 */
	overflow-y: auto;
	overflow-x: auto;
	border-radius: 10px;
	background: #ffffff;
	margin-top: 10px;
	border: none;
	border-top: 1px solid #e5e5e5;
	border-bottom: 1px solid #e5e5e5;
}
.data-table {
	width: 100%;
	border-collapse: collapse;
	text-align: center;
	font-size: 13px;
	min-width: 900px; /* 表格最小宽度，列不挤压 */
}
.data-table input[type="checkbox"] {
	width: 16px !important;  /* 标准复选框宽度，精致不占地 */
	height: 16px !important; /* 标准复选框高度，和文字居中对齐 */
	flex-shrink: 0 !important;
	padding: 0 !important;   /* 清空全局的8px内边距，复选框不需要内边距 */
	border: none !important; /* 清空全局的灰色边框，保留原生样式 */
	border-radius: 2px !important; /* 复选框小圆角，更美观 */
	margin: 0 auto !important; /* 单元格中水平居中 */
	vertical-align: middle !important;
}
.data-table th, .data-table td {
	border: none;
	border-bottom: 1px solid #f0f0f0;
	padding: 12px 8px; /* 优化内边距，小屏更紧凑 */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.data-table thead th {
	position: sticky;
	top: 0;
	background-color: #ffffff;
	z-index: 10;
	font-weight: 500;
	color: #666;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 1px solid #333;
	padding: 14px 8px;
}
.data-table tbody tr {
	transition: background-color 0.2s ease;
}
.data-table tbody tr:nth-child(even) { background-color: transparent; }
.data-table tbody tr:hover { background-color: #fafafa; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* 表单操作区 */
.form-actions {
	margin-top: 15px;
	display: flex;
	gap: 8px;
	justify-content: flex-end;
    flex-wrap: wrap; /* 小屏按钮自动换行 */
}

/* 按钮样式合集 - 统一高度+对齐+鼠标悬浮变色+点击变色 核心修改 全部按钮生效 */
.btn-secondary {
	background-color: #7f8c8d;
	font-size: 13px;
	padding: 8px 12px;
	border-radius: 8px;
	color:#fff;
	border:none;
	cursor:pointer;
	height:34px;
	white-space: nowrap;
	transition: background-color .2s ease;
}
.btn-secondary:hover { background-color: #6c7a7b; } /* 灰色按钮悬浮 变深灰 */
.btn-secondary:active { background-color: #596465; } /* 灰色按钮点击 更深灰 */
.btn-danger {
	background-color: #e74c3c;
	font-size: 13px;
	padding: 8px 12px;
	border-radius:8px;
	color:#fff;
	border:none;
	cursor:pointer;
	height:34px;
	white-space: nowrap;
	transition: background-color .2s ease;
}
.btn-danger:hover { background-color: #c0392b; } /* 红色按钮悬浮 变深红 */
.btn-danger:active { background-color: #a82f22; } /* 红色按钮点击 更深红 */
.btn-save-config{
	margin-left: 80px;
	max-width: 120px;
	height:34px;
	background-color: #3498db;
	color:#fff;
	border:none;
	border-radius:8px;
	transition: background-color .2s ease;
}
.btn-save-config:hover { background-color: #2980b9; }
.btn-save-config:active { background-color: #196799; }

/* 公告样式 */
.announcement-item {
	border-bottom: 1px solid #eee;
	padding: 12px 0;
}
.announcement-item:last-child { border-bottom: none; }
.announcement-title {
	font-weight: bold;
	font-size: 14px;
	margin-bottom: 4px;
}
.announcement-meta {
	color: #7f8c8d;
	font-size: 12px;
	margin-bottom: 8px;
}

/* 状态徽章 */
.status-badge {
	display: inline-block;
	padding: 3px 6px;
	border-radius: 4px;
	font-size: 12px;
	color: #fff;
}
.status-sold { background-color: #4c6ef5; }
.status-pending { background-color: #fcc068; color: #842f00; }
.status-rejected { background-color: #e74c3c; }

/* 分页样式 优化适配 - 小屏不挤，大屏美观 + 分页按钮悬浮变色 */
.pagination {
	background: #ffffff;
	margin-top: 15px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	font-size: 13px;
	padding: 10px 10px;
    flex-wrap: wrap; /* 小屏分页按钮自动换行 */
}
.pagination button, .pagination a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
	color: #333;
	white-space: nowrap;
	padding: 6px 12px !important;
    margin: 0 3px !important;
    box-sizing: border-box !important;
	transition: all .2s ease;
}
.pagination button:hover, .pagination a:hover {
	background-color: #f5fbff !important;
	border-color: #3498db !important;
	color: #3498db !important;
}
.pagination button.active, .pagination a.active {
    background-color: #2980b9 !important;
    color: #fff !important;
    font-weight: bold;
    border-color: #2980b9 !important;
}
.pagination button:disabled {
	background-color: #f1f1f1 !important;
	cursor: not-allowed !important;
	opacity: 0.5 !important;
	border-color: #ddd !important;
	color: #999 !important;
}

.pagination .page-info {
	margin: 0 15px 0 8px !important;
	display: flex;
	align-items: center;
	color: #666;
	white-space: nowrap;
}

/* 表格操作按钮组 + 表格小按钮悬浮变色 */
.action-buttons {
	display: flex;
	justify-content: center;
	gap: 8px;
	align-items: center;
}
.action-buttons button {
	padding: 4px 8px;
	font-size: 12px;
	height: auto;
	border:none;
	border-radius:4px;
	color:#fff;
	transition: background-color .2s ease;
}
.action-buttons button:nth-child(1) {background: #3498db;}
.action-buttons button:nth-child(1):hover {background: #2980b9;}
.action-buttons button:nth-child(2) {background: #e74c3c;}
.action-buttons button:nth-child(2):hover {background: #c0392b;}
.action-buttons button:nth-child(3) {background: #7f8c8d;}
.action-buttons button:nth-child(3):hover {background: #6c7a7b;}

/* 搜索容器 核心响应式优化 - 搜索/清空/刷新按钮 悬浮变色 必生效 优先级最高 */
.search-container {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 15px;
	gap: 20px;
    flex-wrap: wrap; /* 小屏下 左区在上，右区在下，不挤在一起 */
}
.left-search-container {
    flex: 1;
	min-width: 300px; /* 左区最小宽度 */
	display: flex;
	gap: 15px;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
}
.right-search-container {
    flex: 1;
	min-width: 300px; /* 右区最小宽度 */
	display: flex;
	gap: 15px;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
}
.search-input {
	flex-grow: 1;
	max-width: 300px;
	min-width: 200px; /* 搜索框最小宽度，不被压缩 */
}
/* 搜索/清空/刷新按钮 强制悬浮变色 兜底兼容 确保必生效 */
.search-container button {
	transition: background-color .2s ease !important;
}
.search-container button:nth-child(2) {background: #3498db !important;color:#fff !important;border:none;border-radius:8px;}
.search-container button:nth-child(2):hover {background: #2980b9 !important;}
.search-container button:nth-child(3) {background: #e74c3c !important;color:#fff !important;border:none;border-radius:8px;}
.search-container button:nth-child(3):hover {background: #c0392b !important;}
.search-container button:nth-child(4) {background: #7f8c8d !important;color:#fff !important;border:none;border-radius:8px;}
.search-container button:nth-child(4):hover {background: #6c7a7b !important;}

/* 配置项样式 */
.config-item {
	display: flex;
	align-items: center;
	gap:10px;
	flex-wrap: wrap;
}
.config-label {
	font-weight: 500;
	width: 120px;
	flex-shrink:0;
}
.config-input {
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	flex-grow: 1;
	max-width: 200px;
	min-width: 150px;
	height:34px;
}

/* Switch开关样式 */
.switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 24px;
	margin-right: 10px;
}
.switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: .4s;
	border-radius: 24px;
}
.slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: .4s;
	border-radius: 50%;
}
input:checked + .slider { background-color: #2196F3; }
input:focus + .slider { box-shadow: 0 0 1px #2196F3; }
input:checked + .slider:before { transform: translateX(26px); }

/* 统计卡片 响应式优化 - 大屏多列，小屏少列，自动适配 */
.stats-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* 核心：自动适配列数 */
	gap: 15px;
	margin-top: 20px;
}
.stat-card {
	background: white;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	display: flex;
	align-items: center;
	transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.stat-icon {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 24px;
	margin-right: 20px;
	flex-shrink: 0;
}
.stat-content { flex: 1; }
.stat-title {
	font-size: 14px;
	color: #7f8c8d;
	margin-bottom: 8px;
}
.stat-value {
	font-size: 28px;
	font-weight: bold;
	color: #2c3e50;
	margin-bottom: 5px;
}
.stat-subtitle {
	font-size: 12px;
	color: #95a5a6;
}