/* ==========================================================================
   yc_portal_table.css —— 采购门户"表格视图"皮肤 + 移动端导航按钮修复
   07_webshop 补丁加载于全站 head（不修改任何系统源码/模板）
   ========================================================================== */

/* --------------------------------------------------------------------------
   2026-06 修复：移动端右上角导航开关只剩"小白框"
   原因：navbar 模板里的 <use href="#icon-menu"> 依赖异步拉取的 lucide
   图标 sprite，竞态/失败时按钮图标空白。这里改为不依赖 sprite：
   直接用 data-URI 在按钮上画三条线，并隐藏内部 svg。
   -------------------------------------------------------------------------- */
.navbar .navbar-toggler {
	width: 40px;
	height: 40px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.28) !important;
	border-radius: 8px;
	background-color: rgba(255, 255, 255, 0.06) !important;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M4 17h16'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	background-size: 22px 22px !important;
}
.navbar .navbar-toggler > svg,
.navbar .navbar-toggler > .icon {
	display: none !important;
}
/* 浅色 navbar（系统默认风格）下的兜底：深色线条 + 浅色边框 */
.navbar:not(.navbar-dark) .navbar-toggler,
.bg-light .navbar-toggler {
	border-color: rgba(15, 17, 21, 0.25) !important;
	background-color: rgba(15, 17, 21, 0.04) !important;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%2311141b' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M4 17h16'/%3E%3C/svg%3E") !important;
}

/* --------------------------------------------------------------------------
   门户表格（仿 Desk 列表：工具栏 + 表格 + 分页）
   -------------------------------------------------------------------------- */
.yc-ptable {
	margin: 18px 0 36px;
	font-size: 14px;
	color: #2b2f36;
}
.yc-ptable * { box-sizing: border-box; }

.yc-ptable .yc-ptable-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-bottom: 12px;
}
.yc-ptable .yc-ptable-search {
	position: relative;
	flex: 1 1 260px;
	max-width: 420px;
}
.yc-ptable .yc-ptable-search input {
	width: 100%;
	height: 36px;
	padding: 0 12px 0 34px;
	border: 1px solid #d6d9dd;
	border-radius: 8px;
	background: #fff
		url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a909b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E")
		no-repeat 11px center;
	outline: none;
	font-size: 14px;
}
.yc-ptable .yc-ptable-search input:focus {
	border-color: #2490ef;
	box-shadow: 0 0 0 2px rgba(36, 144, 239, 0.15);
}
.yc-ptable select {
	height: 36px;
	padding: 0 28px 0 10px;
	border: 1px solid #d6d9dd;
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	color: #2b2f36;
}
.yc-ptable .yc-ptable-spacer { flex: 1 1 auto; }
.yc-ptable .yc-ptable-count {
	color: #707783;
	font-size: 13px;
	white-space: nowrap;
}

.yc-ptable .yc-ptable-wrap {
	width: 100%;
	overflow-x: auto;
	border: 1px solid #e3e5e8;
	border-radius: 10px;
	background: #fff;
}
.yc-ptable table {
	width: 100%;
	border-collapse: collapse;
	min-width: 640px;
}
.yc-ptable thead th {
	position: sticky;
	top: 0;
	background: #f7f8fa;
	color: #555c66;
	font-weight: 600;
	text-align: left;
	padding: 10px 14px;
	border-bottom: 1px solid #e3e5e8;
	white-space: nowrap;
}
.yc-ptable tbody td {
	padding: 11px 14px;
	border-bottom: 1px solid #f0f1f3;
	vertical-align: middle;
}
.yc-ptable tbody tr:last-child td { border-bottom: none; }
.yc-ptable tbody tr { cursor: pointer; transition: background-color .12s; }
.yc-ptable tbody tr:hover { background: #f4f9ff; }
.yc-ptable td.col-number a {
	color: #2490ef;
	font-weight: 600;
	text-decoration: none;
}
.yc-ptable td.col-number a:hover { text-decoration: underline; }
.yc-ptable td.col-total,
.yc-ptable th.col-total { text-align: right; white-space: nowrap; }
.yc-ptable td.col-action,
.yc-ptable th.col-action { text-align: center; width: 72px; }
.yc-ptable td.col-items {
	max-width: 320px;
	color: #555c66;
	font-size: 13px;
}
.yc-ptable td.col-party { white-space: nowrap; color: #555c66; }
.yc-ptable .yc-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1.6;
	white-space: nowrap;
}
.yc-badge.st-draft, .yc-badge.st-draftdocstatus { background: #eceef1; color: #555c66; }
.yc-badge.st-completed, .yc-badge.st-paid, .yc-badge.st-replied,
.yc-badge.st-ordered, .yc-badge.st-submitted {
	background: #e6f6ec; color: #1a7a3c;
}
.yc-badge.st-tobill, .yc-badge.st-toreceive,
.yc-badge.st-toreceiveandbill, .yc-badge.st-open,
.yc-badge.st-partlypaid, .yc-badge.st-unpaid {
	background: #fff3e0; color: #9a5b00;
}
.yc-badge.st-closed, .yc-badge.st-expired, .yc-badge.st-cancelled,
.yc-badge.st-return, .yc-badge.st-overdue,
.yc-badge.st-debitnoteissued {
	background: #fdeaea; color: #b42318;
}
.yc-ptable .yc-link-btn {
	color: #2490ef;
	font-size: 13px;
	text-decoration: none;
	white-space: nowrap;
}
.yc-ptable .yc-link-btn:hover { text-decoration: underline; }

.yc-ptable .yc-ptable-empty {
	padding: 46px 0;
	text-align: center;
	color: #8a909b;
}
.yc-ptable .yc-ptable-empty .yc-empty-ic {
	font-size: 34px;
	display: block;
	margin-bottom: 8px;
	opacity: .55;
}

.yc-ptable .yc-ptable-pager {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
	margin-top: 12px;
}
.yc-ptable .yc-pg-btn {
	min-width: 32px;
	height: 32px;
	padding: 0 9px;
	border: 1px solid #d6d9dd;
	border-radius: 7px;
	background: #fff;
	color: #2b2f36;
	font-size: 13px;
	cursor: pointer;
}
.yc-ptable .yc-pg-btn:hover:not([disabled]) { border-color: #2490ef; color: #2490ef; }
.yc-ptable .yc-pg-btn[disabled] { opacity: .45; cursor: not-allowed; }
.yc-ptable .yc-pg-btn.is-active {
	background: #2490ef;
	border-color: #2490ef;
	color: #fff;
}
.yc-ptable .yc-pg-info { color: #707783; font-size: 13px; margin-right: 6px; }

.yc-ptable.is-loading .yc-ptable-wrap {
	opacity: .55;
	pointer-events: none;
}

@media (max-width: 576px) {
	.yc-ptable .yc-ptable-count { display: none; }
	.yc-ptable thead th, .yc-ptable tbody td { padding: 9px 10px; }
}
