:root {
	--bg: #f7f9fc;
	--card: #ffffff;
	--muted: #6b7280;
	--text: #1e293b;
	--accent: #434343;
	--ok: #16a34a;
	--line: #e2e8f0;
	--chip: #f1f5f9;
	--has: #e0f2fe;
	--has-txt: #0369a1;
	--total: #fef3c7;
	--total-txt: #92400e;
	--tag-bg: #eef2ff;
	--tag-txt: #3730a3;
	--radius: 12px;
	  --brand: #2d2d2d;
  --brand-hover: #457fb1;
}

* {
	box-sizing: border-box;
}

html,body {
	height: 100%;
  width: 100%;
  min-width: 800px;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 14px/1.6 -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'PingFang SC','Microsoft YaHei','Noto Sans SC',sans-serif;
}

.wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 20px;
}

.site-header,.site-footer {
	background: #f8fafc;
	border-bottom: 1px solid var(--line);
}

.site-footer {
	border-top: 1px solid var(--line);
	border-bottom: none;
	margin-top: 24px;
	color: var(--muted);
	text-align: center;
	font-size: 13px;
}





/* === 重绘月度统计表格线条：取消 border-bottom，用行伪元素画 === */

/* 1. 取消单元格自带的 border-bottom */
.table tbody td,
.table tbody th {
  border-bottom: none !important;
}

/* 2. 给每一行加一条独立的横线（完全笔直、跨列绘制） */
.table tbody tr {
  position: relative;
}
.table tbody tr::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line);
  pointer-events: none;
  z-index: 1; /* 线在色块上方，但不盖文字 */
}




h1 {
	font-size: 20px;
	margin: 0;
	padding: 14px 0;
	color: var(--text);
}

.card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 4px 12px rgba(0,0,0,.05);
	padding: 16px 16px 10px;
	margin: 16px 0;
}

.card-head {
	display: flex;
	align-items: center;
	margin-bottom: 10px;
}

.badge {
	background: var(--chip);
	color: var(--muted);
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
}

.spacer {
	flex: 1;
}

.grid {
	display: grid;
	gap: 10px;
	align-items: center;
}

.g-date {
	grid-template-columns: 100px 220px 120px;
}

.rows-container {
	border-top: 1px dashed var(--line);
	border-bottom: 1px dashed var(--line);
	margin-top: 10px;
	margin-bottom: 12px;
	padding-top: 6px;
	padding-bottom: 6px;
}

.row {
	display: grid;
	grid-template-columns: 130px 1fr 150px 120px 1fr auto;
	gap: 10px;
	align-items: center;
	border-bottom: 1px dashed var(--line);
	padding: 12px 0;
}

.row:last-of-type {
	border-bottom: none;
}

select, input[type="text"], input[type="number"], input[type="date"], input[type="month"], button, .badge, .datalist-list, .cell-has, .cell-total {
	border-radius: var(--radius);
}

input,select,button {
	font: inherit;
}

select, input[type="text"], input[type="number"], input[type="date"], input[type="month"] {
	width: 100%;
	padding: 9px 10px;
	background: #fff;
	color: var(--text);
	border: 1px solid var(--line);
	outline: none;
	transition: border-color .2s ease;
}

select:focus,input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(37,99,235,.2);
}

button {
	padding: 8px 14px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: #f8fafc;
	color: var(--text);
	cursor: pointer;
	transition: all .15s ease;
}

button:hover {
	background: #f1f5f9;
}

button.primary {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

button.primary:hover {
	background: #5b5b5b;
}

button.ghost {
	background: #434343;
	color: #ffffff;
}

button.ghost:hover {
  background: #5b5b5b;
  color: #fff;
}

button.danger {
	color: #b91c1c;
	border-color: #fca5a5;
	background: #fef2f2;
}

.row > div:last-child {
	display: flex;
	gap: 8px;
}

.toolbar {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-top: 10px;
}

#status {
	color: var(--muted);
}

.datalist {
	position: relative;
}

.datalist-list {
	position: absolute;
	z-index: 9999;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	margin-top: 4px;
	max-height: 220px;
	overflow: auto;
	box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.datalist-item {
	padding: 8px 10px;
	cursor: pointer;
}

.datalist-item:hover {
	background: #f1f5f9;
}

.table {
	width: 100%;
	border-collapse: separate;
	margin-top: 8px;
}

.table th,.table td {
	border-bottom: 1px solid var(--line);
	padding: 8px 10px;
	text-align: left;
	vertical-align: top;
}

.table thead th {
	color: var(--muted);
	background: #eff0f3;
	position: sticky;
	top: 0;
}

.cat-title {
	margin-top: 16px;
	font-weight: 600;
	color: var(--text);
	font-size: 16px;
	padding: 0 0 0 8px;
}

.type-divider {
	border-top: 1px dashed var(--line);
	margin: 16px 0;
}


.cell-total {
	background: var(--total);
	color: var(--total-txt);
	font-weight: 600;
}

:root {
	--w-teacher: 140px;
	--w-qty: 96px;
	--w-total: 96px;
}

.table.t-four {
	table-layout: fixed;
	width: 100%;
}

.table.t-four col.col-teacher {
	width: var(--w-teacher);
}

.table.t-four col.col-qty {
	width: var(--w-qty);
}

.table.t-four col.col-total {
	width: var(--w-total);
}

.table.t-four col.col-total {
	width: var(--w-total);
}

.table.t-four col.col-remark {
	width: 100%;
}

.table.t-four th:nth-child(3), .table.t-four td:nth-child(3) {
	white-space: nowrap;
	overflow: hidden;
}

.remark-chips {
	display: block;
	white-space: nowrap;
	overflow: hidden;
} /* 备注标签：更大、更柔和的颜色搭配 */ /* 父容器允许多标签占满可用空间 */.remark-chips {
	display: flex;
	flex-wrap: nowrap;
	overflow: hidden;
	white-space: nowrap;
	gap: 6px;
} /* 每个标签默认完整显示，但会在空间不足时自动截断 */.tag {
	display: inline-block;
	flex-shrink: 1;
 /* ✅ 允许被压缩 */
	min-width: 40px;
	background: #dbeafe;
	color: #1e3a8a;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.4;
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	transition: background-color 0.15s ease;
	vertical-align: middle;
} /* 鼠标悬停显示完整备注（tooltip） */.tag:hover {
	background: #bfdbfe;
}

.tag:last-child {
	margin-right: 0;
}

.table .empty-row td {
	color: #9ca3af;
	text-align: center;
}




/* 让 td 成为层叠上下文，文本天然在 z=0 层 */
.table td.cell-has,
.table td.cell-total {
  position: relative;
  z-index: 0;                     /* 关键：建立上下文 */
  background: transparent !important;
  text-align: left;
  font-weight: 600;
}

/* 伪元素当作“内嵌色块”放到更低一层 */
.table td.cell-has::before,
.table td.cell-total::before {
  content: "";
  position: absolute;
  top: 4px;                       /* 四周留白 */
  right: 6px;
  bottom: 6px;                    /* 离下边线 6px，避免“弯曲错觉” */
  left: 6px;
  border-radius: 6px;
  z-index: -1;                    /* 关键：在文本下面 */
  pointer-events: none;           /* 不挡鼠标事件 */
}

/* 使用你的变量，没定义时有兜底 */
:root{
  --has: #e0f2fe;
  --has-txt: #0369a1;
  --total: #fef3c7;
  --total-txt: #92400e;
}

.table td.cell-has        { color: var(--has-txt,   #0369a1); }
.table td.cell-total      { color: var(--total-txt, #92400e); }
.table td.cell-has::before{ background: var(--has,  #e0f2fe); }
.table td.cell-total::before{ background: var(--total, #fef3c7); }



/* === 取消表头固定 === */
.table thead th{
  position: static !important;
  top: auto !important;
}










/* ===== ToolBox 顶部标题栏（无冲突命名） ===== */
.tb-page { max-width: 1060px; margin: 0 auto; padding: 50px 0 0 0; }

/* 标题栏容器 */
.tb-banner{
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,.2));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
}

/* 品牌区 */
.tb-brand{ display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.tb-badge{
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-hover)); color: #fff; font-size: 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.tb-title{ display: flex; flex-direction: column; line-height: 1.2; gap: 4px; }
.tb-title .main{ font-size: 17px; color: var(--text); font-weight: 700; }
.tb-title .sub{  font-size: 12px; color: var(--muted); font-weight: 400; }

/* 返回按钮 */
.tb-back{
  font-weight: 600; font-size: 14px; color: var(--brand);
  border: 1px solid color-mix(in hsl, var(--brand) 25%, var(--line));
  background: color-mix(in hsl, var(--brand) 4%, transparent);
  padding: 8px 16px; border-radius: 10px; text-decoration: none;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.tb-back::before{ content: "←"; font-size: 15px; line-height: 1; }
.tb-back:hover{ background: color-mix(in hsl, var(--brand) 12%, transparent); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.08); }

/* 页面最小宽度（你刚才的全站需求） */
html, body { min-width: 800px; }


.tabs { display: flex; gap: 8px; margin: 6px 0 8px; flex-wrap: wrap; }
.tab-link {
  display: inline-block; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 8px; /* 6px */
  background: #fff; color: var(--text); text-decoration: none;
  transition: all .15s ease; font-size: 13px; line-height: 1.4;
}
.tab-link:hover { background: #f8fafc; border-color: #dbeafe; }
.tab-link.is-active {
  background: #000000; color: #ffffff; border-color: #000000; font-weight: 600;
}