.tp-inventory-wrap { margin-top: 16px; }

.tp-selected-bar {
	position: sticky; top: 0; z-index: 100;
	background: #f0f6fc; border: 1px solid #c3c4c7;
	padding: 10px 14px; border-radius: 4px;
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px;
}
.tp-selected-bar strong { color: #2271b1; }
.tp-selected-bar .button-primary,
.tp-selected-bar .button-secondary {
	background: #2271b1; border-color: #2271b1; color: #fff;
	padding: 6px 14px; font-size: 13px; white-space: nowrap;
	min-width: 160px; text-align: center;
}
.tp-selected-bar .button-primary:hover,
.tp-selected-bar .button-secondary:hover { background: #135e96; }
.tp-selected-bar .button-secondary {
	background: #f6f7f7; color: #3c434a; border-color: #dcdcde;
}
.tp-selected-bar .button-secondary:hover { background: #f0f0f1; }

.tp-selected-bar button,
.tp-selected-bar button.button,
.tp-selected-bar button.button-primary {
	min-width: 180px;
	white-space: nowrap;
	font-size: 14px;
	font-weight: 500;
	padding: 8px 16px;
	line-height: 1.4;
	height: auto;
	border-radius: 4px;
}

.tp-table-top {
	display: flex; justify-content: space-between; align-items: center;
	gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.tp-table-top .tp-length { flex: 0 0 auto; }
.tp-table-top .tp-length .dataTables_length label {
	display: flex; align-items: center; gap: 6px; font-size: 13px; color: #555;
}
.tp-table-top .tp-length select {
	padding: 5px 32px 5px 10px; border: 1px solid #dcdcde; border-radius: 4px;
	font-size: 13px; background-color: #fff;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-repeat: no-repeat; background-position: right 10px center;
	min-width: 70px;
	appearance: none; -webkit-appearance: none; cursor: pointer;
}
.tp-table-top .tp-filters { flex: 1 1 auto; min-width: 220px; }
.tp-table-top .tp-filter-buttons { flex-shrink: 0; }
.tp-table-top .dataTables_filter label {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tp-table-top .dataTables_filter input[type="search"] {
	padding: 6px 10px; border: 1px solid #dcdcde; border-radius: 4px;
	font-size: 13px; min-width: 200px; width: auto;
}

.tp-filter-row {
	display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center;
}
.tp-filter-row select, .tp-filter-row input[type="number"] {
	padding: 6px 10px; border: 1px solid #dcdcde; border-radius: 4px;
	font-size: 13px; background: #fff;
}
.tp-filter-row select { min-width: 140px; max-width: 180px; }
.tp-filter-row input[type="number"] { width: 120px; min-width: 100px; }
.tp-filter-row .button {
	padding: 6px 14px; font-size: 13px;
	background: #2271b1; color: #fff; border: 1px solid #2271b1; border-radius: 4px;
	cursor: pointer;
}
.tp-filter-row .button:hover { background: #135e96; }
.tp-filter-row .button#tp-filter-reset {
	background: #f6f7f7; color: #3c434a; border-color: #dcdcde;
}
.tp-filter-row .button#tp-filter-reset:hover { background: #f0f0f1; }

.tp-table-container {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

#tp-inventory-table_wrapper { margin-top: 12px; }

#tp-inventory-table.dataTable {
	border-collapse: collapse;
	width: 100%;
	font-size: 13px;
}

#tp-inventory-table.dataTable thead th {
	background: #f5f6f7;
	font-weight: 500;
	font-size: 12px;
	white-space: nowrap;
	padding-top: 8px;
	padding-bottom: 8px;
	padding-left: 10px;
	text-align: center;
	vertical-align: middle;
	border-bottom: 2px solid #ddd;
	color: #444;
}

#tp-inventory-table.dataTable thead th.tp-checkbox-col {
	padding-right: 10px;
	padding-left: 10px;
}

#tp-inventory-table.dataTable tbody td {
	padding: 8px 10px;
	border-bottom: 1px solid #eee;
	white-space: nowrap;
	font-size: 13px;
	text-align: center;
	vertical-align: middle;
}

#tp-inventory-table.dataTable tbody tr:hover td { background: #f8f9fa; }
#tp-inventory-table.dataTable tbody tr.selected td { background: #e8f0fe; }

#tp-inventory-table.dataTable td.tp-checkbox-col,
#tp-inventory-table.dataTable th.tp-checkbox-col {
	width: 36px;
	min-width: 36px;
	max-width: 36px;
	text-align: center;
	vertical-align: middle;
}

#tp-inventory-table .dataTables_info,
#tp-inventory-table .dataTables_paginate {
	font-size: 12px; padding: 8px 4px;
}
.dataTables_paginate .paginate_button {
	padding: 4px 10px; margin: 0 2px; border-radius: 3px;
	border: 1px solid #dcdcde; cursor: pointer; font-size: 13px;
}
.dataTables_paginate .paginate_button.current {
	background: #2271b1; color: #fff; border-color: #2271b1;
}
.dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
	background: #f0f0f0;
}
.dataTables_paginate .paginate_button.disabled {
	color: #ccc; cursor: not-allowed;
}

.tp-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; }
.tp-modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); }
.tp-modal-content {
	position: relative; background: #fff; margin: 40px auto;
	max-width: 720px; width: calc(100% - 32px); max-height: 85vh;
	overflow-y: auto; padding: 24px; border-radius: 6px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.tp-modal-close {
	position: absolute; top: 12px; right: 16px; font-size: 28px;
	border: 0; background: transparent; cursor: pointer; line-height: 1; color: #666;
}
.tp-modal-close:hover { color: #000; }

.tp-inquiry-preview {
	margin: 12px 0 18px; padding: 14px;
	background: #f0f6fc; border: 1px solid #c3c4c7; border-radius: 6px;
}
.tp-inquiry-preview-count {
	font-size: 13px; color: #1a1a1a; margin-bottom: 8px;
}
.tp-inquiry-item {
	display: flex; align-items: center; gap: 8px;
	padding: 8px 10px; margin-bottom: 6px;
	background: #fff; border: 1px solid #e0e0e0; border-radius: 4px;
	font-size: 13px; line-height: 1.4; flex-wrap: wrap;
}
.tp-inquiry-item:last-child { margin-bottom: 0; }
.tp-inquiry-vid {
	background: #2271b1; color: #fff;
	padding: 2px 8px; border-radius: 3px;
	font-size: 11px; font-weight: 600; white-space: nowrap;
}
.tp-inquiry-spec { flex: 1 1 200px; color: #333; }
.tp-inquiry-pid { color: #999; font-size: 12px; }

@media (max-width: 768px) {
	.tp-selected-bar { padding: 8px 12px; gap: 8px; }

	.tp-table-top .tp-filters { flex-basis: 100%; }
	.tp-table-top .dataTables_filter input[type="search"] { min-width: 160px; }

	.tp-filter-row select { min-width: 120px; max-width: 140px; }
	.tp-filter-row input[type="number"] { width: 100px; }

	#tp-inventory-table.dataTable thead th { font-size: 11px; padding: 6px 8px; }
	#tp-inventory-table.dataTable tbody td { font-size: 12px; padding: 6px 8px; }
}

@media (max-width: 480px) {
	#tp-inventory-table.dataTable thead th { font-size: 10px; padding: 5px 6px; }
	#tp-inventory-table.dataTable tbody td { font-size: 11px; padding: 5px 6px; }

	.tp-filter-row select,
	.tp-filter-row input[type="number"],
	.tp-filter-row .button { width: 100%; }
	.tp-filter-row { gap: 6px; }
}
